Files
fusion/packages/engine
semih 9cad8ff716 fix(executor): contamination detector reads origin/<baseBranch>, not stale local main
v0.29.0's classifyForeignCommits() defaults mainRef="main" — the LOCAL main branch.
For Fusion setups where main is never auto-updated (e.g. Fusion writes only to
origin/dev with humans merging dev→main on a separate branch), local main drifts
behind quickly. Each task created after the drift fails with:

  Branch fusion/fn-XXX contains N foreign task-attributed commits since base SHA
  [recovery] contamination classification: already-upstream=[none] unique=[14 SHAs]

All "unique" SHAs are legitimate merged dev commits that ARE on origin/main and
origin/dev — the detector just can't see that because it's comparing against
stale local main.

Resolution order at the call site:
1. origin/<baseBranch> (settings: baseBranch + worktreeRebaseRemote remote name)
2. origin/main (matches the audit script's default)
3. "main" (legacy default — preserves behavior for projects without those settings)

Logs the resolved mainRef so future drift is observable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 12:00:14 +03:00
..
2026-05-13 21:39:15 -07:00
2026-05-13 21:39:15 -07:00