Repository navigation
fix: add explicit-home retry hints and preserve handled steers - #13
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
I approve of the improvements 1-4 approach as recommended.
Context, item 3: move tool-contract gotchas into the scripts instead of memory. Evidence and reviews: data/env-retro-2026-10-10/report.md, data/fm-improve-xreview-fable/report.md (item 3) and data/fm-improve-xreview-astra/report.md (item 3). Hold reasons with parentheses are already fixed upstream and in the fork, so they are out of scope. The approved approach is to build in firstmate and propose upstream later.
What Changed
fm-sendorfm-controlrefuses a missingFM_HOME, provided the candidate home has a state directory.Risk Assessment
✅ Low: The changes are bounded, preserve explicit-home refusals, and archive handled steers before remote secondmate home deletion without adding unnecessary machinery.
Testing
Send/control regressions passed, and isolated live cleanup proved byte preservation, collision handling, deduplication, and recovery from archive failure. Cleanup regressions exposed a fixture-location restriction; guard refusals prevented remaining live scenarios. CLI evidence was saved and temporary fixtures removed.
Evidence: Live archive and failure-recovery transcript
Source: Live archive and failure-recovery transcript
Evidence: Actual archived message bytes
Source: Actual archived message bytes
Evidence: Live isolation-guard refusals
Source: Live isolation-guard refusals
Evidence: Remote retirement fixture restriction
Source: Remote retirement fixture restriction
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
bin/fm-teardown.sh:3827- Remote secondmate retirement silently skips archiving. Its handled messages live under TARGET_HOME/state/parent-route, but remove_firstmate_home at bin/fm-teardown.sh:3738 deletes that home before the new archive call. The missing-directory check at bin/fm-teardown.sh:3809 then returns success, losing every handled steer. Archive before deleting the containing home and use a destination that survives retirement. The same preservation promise appears at bin/fm-teardown.sh:95 and docs/configuration.md:81.🔧 Fix applied.
✅ Re-checked - no issues remain.
TMPDIR="$PWD/.test-tmp" bash tests/fm-send-strict.test.sh— passedTMPDIR="$PWD/.test-tmp" bash tests/fm-control.test.sh— passedTMPDIR="$PWD/.test-tmp" bash tests/fm-teardown-endpoint-safety.test.sh— stopped on an unsafe in-repository secondmate fixtureFocused archive and remote-retirement regression functions — archive passed; remote fixture refusedbash ~/.no-mistakes/evidence/01M4HG8J0V5TEX93CF7T52EKM0/live-archive.sh— real scripts, marked lab home, private tmux socket, archive obstruction and retrybash ~/.no-mistakes/evidence/01M4HG8J0V5TEX93CF7T52EKM0/guard-attempts.sh— confirmed live validation restrictionsRemoved temporary fixtures and stopped identified fixture tmux servers;git status --shortclean✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Not live-validated
These scenarios could not be driven live because gate isolation rules block them; each is covered by the automated regression tests:
fm-sendwithoutFM_HOMErefuses and prints the exact quoted retry command.fm-controlwithoutFM_HOMErefuses and prints the retry command.Related upstream work
The brief-heading cutoff diagnostic is intentionally not part of this change: upstream kunchenguid#6101 already covers it and will be taken when it lands.