fix(bin): make captain decision lookup archive-aware#901
Open
kuan0808 wants to merge 6 commits into
Open
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
Implement the minimal Firstmate-side integration for archive-aware resolved captain-decision lookup using the audited tasks-axi PR 21 pin. Durable decision identity reads must use explicit read-only tasks-axi show --include-archive --full with active-first canonical first-match behavior, while every mutation remains active-only. True absence must require the exact canonical NOT_FOUND envelope and stay distinct from missing or malformed archive-aware tool capability. Preserve active decisions, malformed records, duplicate semantics, privacy-safe output, other backends, and unrelated lifecycle behavior. Add Bash 3.2-compatible focused coverage for active hits, archive fallback, active shadowing, true misses, configured and default archive paths, capability absence, malformed output, archived mutation refusal, and a privacy-safe integration probe of the active local pin. Isolate all real-binary tests from ambient tasks-axi configuration. Keep exact mechanics in the script help/header and tests without changing tasks-axi, pin records, AGENTS.md, or policy unless semantics genuinely require it.
What Changed
NOT_FOUNDhandling.Risk Assessment
✅ Low: Captain, the narrow validator fix correctly prevents malformed duplicate-title output from reaching mutation; only its recorded verification output is stale.
Testing
After inspecting the base-to-target delta and confirming Bash 3.2.57/tasks-axi 0.2.3, all focused, lifecycle, cleanup, projection, and brief suites passed; lifecycle and cleanup were rerun to definitive completion after an initial parallel yield, while a synthetic real-CLI transcript demonstrated archive fallback, active shadowing, exact miss handling, mutation refusal, and unchanged persisted files.
Evidence: Archive-aware lookup end-to-end CLI transcript
Dependency
a2fff7a94f8bad1269e12c47b9866246d8376317suppliesshow --include-archive --fullplus active/archive provenance.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-decision-hold.sh:149- Intent requires malformed archive-aware capability to remain distinct from absence. The new exact-one-field check omitstitle, althoughcommand_holdlater consumes it. A malformed successful response containing duplicatetitle:rows can therefore pass validation and triggertasks-axi hold; addtitleto the validated fields and cover this case before merging.🔧 Fix: Reject duplicate titles before captain hold mutation
1 info still open:
docs/decision-hold-lifecycle.md:79- This block claims to contain the test's exact summarized output, but the newly added regression printsok - duplicate title output refuses active hold mutationand that line is missing here. Add it after the malformed-output case so the verification record remains accurate.✅ **Test** - passed
✅ No issues found.
git diff --name-status 6db3b09b34dc23787969416bc4dde37adb02ac94 5e941fdbe9c3695ae4b2d984c41e0a94fabc5cccplus implementation/test/help inspectionbash --version→ GNU Bash 3.2.57;tasks-axi --version→ 0.2.3bash tests/fm-decision-hold-archive.test.shbash tests/fm-decision-hold-lifecycle.test.shbash tests/fm-teardown.test.shbash tests/fm-fleet-snapshot-view.test.shbash tests/fm-bearings-snapshot.test.shbash tests/fm-brief.test.shIsolated synthetic CLI probe using realtasks-axi: archived lookup and verification, archived mutation refusal with before/after SHA-256 checks, active-first shadowing, and exact canonicalNOT_FOUNDoutputbash bin/fm-decision-hold.sh --helpcontract checksgit status --short --branch✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.