Repository navigation
fix(bin): clarify scratch guidance and dirty teardown refusals - #6505
Merged
kunchenguid merged 3 commits intoOct 4, 2026
Merged
Conversation
Keep ship proof material outside the task worktree and distinguish untracked-only leftovers from tracked edits without changing cleanup guards. Fixes kunchenguid#6319
Fixes #6319
Merged ship cleanup correctly refuses dirty worktrees, but worker scratch can leave a finished task blocked with an ambiguous refusal.
--forcebehavior are unchanged; no files are automatically discarded or relocated.Validation passed: teardown and brief suites (146 checks), three production mutations, pinned lint, documentation checks, and stock macOS Bash parsing.
The pipeline additionally passed eight focused checks and six live CLI scenarios, including successful cleanup with proof outside the worktree and preservation of dirty or unpushed work on refusal.
The promotion follow-up passed all 27 delivery tests and five mutation checks. The bounded path list is intentional and remains unchanged.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-brief.sh:664- The requirement to “keep proof and scratch under data/<id>/ or a temp dir and leave the worktree clean before done” misses promoted ships. The new rule is emitted only by the ordinary ship scaffold. A scout promoted through bin/fm-promote.sh retains the conflicting worktree-only rule from bin/fm-brief.sh:590 because promotion preserves other instructions (bin/fm-promote.sh:244). It can therefore create proof logs inside the worktree, finish and merge, and encounter the same refusal. Emit this guidance through the shared ship-contract renderer in bin/fm-dod-lib.sh, including promotion instructions (bin/fm-promote.sh:282) and the persisted relaunch brief (bin/fm-promote.sh:296), explicitly superseding the scout restriction. The clean-before-done rule at bin/fm-brief.sh:666 and ownership pointer at docs/architecture.md:11 must remain consistent.bin/fm-teardown.sh:1871- Simplification: the ten-path listing, counter and truncation notice exceed the requested optional distinction between untracked-only leftovers and tracked edits. No stated requirement needs a filename inventory. Remove that component and retain the two classifications. Related introduced sites are bin/fm-teardown.sh:69 (listing contract), bin/fm-teardown.sh:1876 (listing and truncation output), tests/fm-teardown.test.sh:1235 (overflow fixture), and tests/fm-teardown.test.sh:1256 (listing expectations).✅ **Test** - passed
✅ No issues found.
Verified target3b5b5d6422207a289c2c656f59a9bd00ed290b9dand inspected its scoped diff against the supplied base.Ran eight focused cases throughbash tests/.fm-6319-selected-qa.sh: untracked, tracked, mixed, and unpushed refusal checks.Ran the untracked diagnostic regression against base1f3e769616fdf9f31f85f4c3e6a9f71606634238; it failed at the expected missing-classification assertion.Ranpython3 ~/.no-mistakes/evidence/01M418J4Y0Z6WQQPFEBCJ3HQNR/live-cli-validation.py: real brief generation, Git repositories, Treehouse pool operations, teardown commands, and tasks-axi state checks.Compared file hashes, Git status, HEAD, branches, and task records across refusals; verified retained proof and available pool slots after successful cleanup.Removed disposable fixtures and temporary runners; confirmedgit status --shortwas empty.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.