quick-fix tests the wrong change: a stale .osf/change.json committed to the target repo names someone else's change #98
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happened
Run
run_01M3JCM259FPD9PG96ZRYBN7HK(quick-fix, cmoriarty/soundcheck#29, a docs-only brief) spent itsagent.test.unitstep (9 min) fixing 57 lint violations in the tests of an unrelated, already-archived change.The step's prompt said:
and the agent concluded "the
.osfbrief is stale (a docs run); the step prompt is authoritative", then went to work on the other change's.osf/test/unit.jsonlint failures.Why
soundcheck's
maintracks the run state of earlier runs:.osf/change.json,.osf/test/unit.json,.osf/test/e2e.json,.osf/review/**,.osf/summary.md,.osf/budget.json,.osf/workspace.jsonand more (last touched by c65c915 "propose: the change, its specs, its tasks and its estimate").change_id_or_none(src/osf/engine/prompts.py) deliberately avoids guessing fromopenspec/changes/, but still trusts.osf/change.json— and in a clone of that repo, the file is the previous run's.Expected
A run never reads another run's
.osf/state. Either:script.brief(orgit.clone) clears per-run files inherited from the base branch before any step reads them, orchange_id_or_noneignores.osf/change.jsonwhen the pipeline declaresuses.openspec: false, and the test/summary prompts read nothing else from.osf/that the run did not write.The first fixes every pipeline; the second only quick-fix. Also worth deciding whether per-run state should be committed to the target's
mainat all.Acceptance
.osf/change.jsonfrom an earlier run gets a test prompt with no change id and no delta specs.Shipped in
a657dad(changeruns-start-without-old-run-state, archived in55ffb6e)..osf/that the base branch carries, except the repository's own.osf/pipeline.yamland.osf/pipelines/, before any step runs. A worktree reused after a restart is left alone.git.clonesayscleared N file(s) an earlier run left in .osf/ on <base>; the deletions ride in the run's first full commit, so a repository's leftover state is replaced rather than accumulating.test/,review/andsummary.mdwere inherited too.git.clonereports the count, and the #98 case — a quick-fix unit-test prompt built on a branch tracking another run'schange.jsonnames no change. Each fails without the fix. Full lane green (backend 1863, UI unit 444, browser 108).Note: the built-in
git.clonecommand changed, so any repository with an older committed copy of.osf/pipeline.yamlneeds it refreshed (soundcheck has none).