Confirmed via carina production logs (task 6, chat-spawned synthetic test task, 2026-09-02). StageBaselineGate (internal/domain/workflow/implement.go:37) found the repo's gate red at the base commit, spent 405,004 tokens/14 iterations genuinely fixing two broken pre-existing tests, and committed the fix locally via tc.Trees.CommitAll (implement.go:104) -- verified passing. plan and build stages then correctly found nothing else to do for the (synthetic, content-free) task. StageCommitPush -> closeNoChangesIssue (steps.go:56) decides 'no changes' purely from tc.BuildNoChanges, which the build AgentStage sets from its own len(res.Changes)==0 (implement.go:176) -- it has zero awareness that StageBaselineGate already committed real changes two stages earlier. Never pushed, never opened a PR; the entire worktree containing a real, gate-verified fix for genuinely broken tests was discarded when the task closed as 'merged: completed -- no changes required'.
Cost: 669,421 tokens burned to fix a real bug that then evaporated. This recurs: any task that hits the same red baseline pays the identical tax again since the fix never lands. Evidence a prior incident already happened: an orphaned 'fix: baseline gate repair' commit (e49f3cd) sits on a stale, unmerged branch (fix/441-archied-repos-entries-cant-span-more-than-one-forge) from an earlier occurrence.
Design
Fix direction: either (a) StageBaselineGate sets a flag /flips tc.BuildNoChanges appropriately when it commits, or (b) StageCommitPush's no-changes branch checks the worktree's actual diff against the base branch (tc.Trees, similar to StageDiffCap's ChangedLines) instead of trusting tc.BuildNoChanges alone. Prefer (a): cheaper, and keeps the diff-against-base check (which already exists for StageDiffCap) from being computed twice per task.
Acceptance criteria
A task whose baseline-fix stage committed real changes, but whose plan/build stages found nothing further to do, still pushes and opens a PR carrying the baseline-fix commit -- it must never be silently discarded. tc.BuildNoChanges (or StageCommitPush's decision) accounts for what StageBaselineGate already committed, not just the build stage's own diff. Regression test reproduces the exact scenario (baseline-fix commits, build stage reports zero changes) and proves a PR opens. task check passes.
Close reason
Fixed via a new TaskContext.BaselineFixed flag: StageBaselineGate sets it when its own CommitAll reports a real committed change (implement.go:104-111). The build stage's OnResult only sets BuildNoChanges when its own diff is empty AND BaselineFixed is false (implement.go:177), so a baseline-only fix can no longer be masked as 'no changes'. StageCommitPush itself now calls CommitAll directly and pushes whenever either a new commit was made OR BaselineFixed is true (steps.go), instead of erroring on 'nothing to commit' when the real change already sits on the branch from the baseline-fix commit. Two new regression tests (TestStageCommitPushPushesBaselineFixEvenWithNothingNewToCommit, TestStageBaselineGateSetsBaselineFixedWhenItCommits) plus a guard test that the old empty-tree error still fires without a baseline fix. task check clean.
Imported from beads archie-core-95dj · GitHub #682 · type bug · priority P1 · created 2026-09-02 · closed 2026-09-02
Confirmed via carina production logs (task 6, chat-spawned synthetic test task, 2026-09-02). StageBaselineGate (internal/domain/workflow/implement.go:37) found the repo's gate red at the base commit, spent 405,004 tokens/14 iterations genuinely fixing two broken pre-existing tests, and committed the fix locally via tc.Trees.CommitAll (implement.go:104) -- verified passing. plan and build stages then correctly found nothing else to do for the (synthetic, content-free) task. StageCommitPush -> closeNoChangesIssue (steps.go:56) decides 'no changes' purely from tc.BuildNoChanges, which the build AgentStage sets from its own len(res.Changes)==0 (implement.go:176) -- it has zero awareness that StageBaselineGate already committed real changes two stages earlier. Never pushed, never opened a PR; the entire worktree containing a real, gate-verified fix for genuinely broken tests was discarded when the task closed as 'merged: completed -- no changes required'.
Cost: 669,421 tokens burned to fix a real bug that then evaporated. This recurs: any task that hits the same red baseline pays the identical tax again since the fix never lands. Evidence a prior incident already happened: an orphaned 'fix: baseline gate repair' commit (e49f3cd) sits on a stale, unmerged branch (fix/441-archied-repos-entries-cant-span-more-than-one-forge) from an earlier occurrence.
### Design
Fix direction: either (a) StageBaselineGate sets a flag /flips tc.BuildNoChanges appropriately when it commits, or (b) StageCommitPush's no-changes branch checks the worktree's actual diff against the base branch (tc.Trees, similar to StageDiffCap's ChangedLines) instead of trusting tc.BuildNoChanges alone. Prefer (a): cheaper, and keeps the diff-against-base check (which already exists for StageDiffCap) from being computed twice per task.
### Acceptance criteria
A task whose baseline-fix stage committed real changes, but whose plan/build stages found nothing further to do, still pushes and opens a PR carrying the baseline-fix commit -- it must never be silently discarded. tc.BuildNoChanges (or StageCommitPush's decision) accounts for what StageBaselineGate already committed, not just the build stage's own diff. Regression test reproduces the exact scenario (baseline-fix commits, build stage reports zero changes) and proves a PR opens. task check passes.
### Close reason
Fixed via a new TaskContext.BaselineFixed flag: StageBaselineGate sets it when its own CommitAll reports a real committed change (implement.go:104-111). The build stage's OnResult only sets BuildNoChanges when its own diff is empty AND BaselineFixed is false (implement.go:177), so a baseline-only fix can no longer be masked as 'no changes'. StageCommitPush itself now calls CommitAll directly and pushes whenever either a new commit was made OR BaselineFixed is true (steps.go), instead of erroring on 'nothing to commit' when the real change already sits on the branch from the baseline-fix commit. Two new regression tests (TestStageCommitPushPushesBaselineFixEvenWithNothingNewToCommit, TestStageBaselineGateSetsBaselineFixedWhenItCommits) plus a guard test that the old empty-tree error still fires without a baseline fix. task check clean.
---
_Imported from beads `archie-core-95dj` · GitHub #682 · type bug · priority P1 · created 2026-09-02 · closed 2026-09-02_
sam
added the highbug labels 2026-10-27 13:39:26 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Confirmed via carina production logs (task 6, chat-spawned synthetic test task, 2026-09-02). StageBaselineGate (internal/domain/workflow/implement.go:37) found the repo's gate red at the base commit, spent 405,004 tokens/14 iterations genuinely fixing two broken pre-existing tests, and committed the fix locally via tc.Trees.CommitAll (implement.go:104) -- verified passing. plan and build stages then correctly found nothing else to do for the (synthetic, content-free) task. StageCommitPush -> closeNoChangesIssue (steps.go:56) decides 'no changes' purely from tc.BuildNoChanges, which the build AgentStage sets from its own len(res.Changes)==0 (implement.go:176) -- it has zero awareness that StageBaselineGate already committed real changes two stages earlier. Never pushed, never opened a PR; the entire worktree containing a real, gate-verified fix for genuinely broken tests was discarded when the task closed as 'merged: completed -- no changes required'.
Cost: 669,421 tokens burned to fix a real bug that then evaporated. This recurs: any task that hits the same red baseline pays the identical tax again since the fix never lands. Evidence a prior incident already happened: an orphaned 'fix: baseline gate repair' commit (e49f3cd) sits on a stale, unmerged branch (fix/441-archied-repos-entries-cant-span-more-than-one-forge) from an earlier occurrence.
Design
Fix direction: either (a) StageBaselineGate sets a flag /flips tc.BuildNoChanges appropriately when it commits, or (b) StageCommitPush's no-changes branch checks the worktree's actual diff against the base branch (tc.Trees, similar to StageDiffCap's ChangedLines) instead of trusting tc.BuildNoChanges alone. Prefer (a): cheaper, and keeps the diff-against-base check (which already exists for StageDiffCap) from being computed twice per task.
Acceptance criteria
A task whose baseline-fix stage committed real changes, but whose plan/build stages found nothing further to do, still pushes and opens a PR carrying the baseline-fix commit -- it must never be silently discarded. tc.BuildNoChanges (or StageCommitPush's decision) accounts for what StageBaselineGate already committed, not just the build stage's own diff. Regression test reproduces the exact scenario (baseline-fix commits, build stage reports zero changes) and proves a PR opens. task check passes.
Close reason
Fixed via a new TaskContext.BaselineFixed flag: StageBaselineGate sets it when its own CommitAll reports a real committed change (implement.go:104-111). The build stage's OnResult only sets BuildNoChanges when its own diff is empty AND BaselineFixed is false (implement.go:177), so a baseline-only fix can no longer be masked as 'no changes'. StageCommitPush itself now calls CommitAll directly and pushes whenever either a new commit was made OR BaselineFixed is true (steps.go), instead of erroring on 'nothing to commit' when the real change already sits on the branch from the baseline-fix commit. Two new regression tests (TestStageCommitPushPushesBaselineFixEvenWithNothingNewToCommit, TestStageBaselineGateSetsBaselineFixedWhenItCommits) plus a guard test that the old empty-tree error still fires without a baseline fix. task check clean.
Imported from beads
archie-core-95dj· GitHub #682 · type bug · priority P1 · created 2026-09-02 · closed 2026-09-02