Repository navigation
fix(bin): substitute parentheses in decision-hold reasons - #16
Merged
Merged
Conversation
fm-decision-hold.sh hold now maps ( ) to [ ] before tasks-axi, so natural reason wording works instead of failing; the help says so. Claude-Session: https://claude.ai/code/session_011n1aXyJzpPAmSyvhuHKBjT
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
Bug seen 2026-09-25: bin/fm-decision-hold.sh hold ... --reason "...(merged PRs 5, 6)..." failed with 'reason must not contain parentheses (tasks-axi hold contract)', forcing callers to rephrase. Make the script safely encode or substitute parentheses (e.g. to square brackets) before handing the reason to tasks-axi, so natural wording works, and say so in the script's help. Add colocated tests. Do not change tasks-axi. Decisions: substitute ( -> [ and ) -> ] in the reason only (tasks-axi reserves parentheses for markdown hold tags; verified tasks-axi accepts square brackets in --reason); the title is out of scope. Help is the script header comment printed by --help. The regression test lives in tests/fm-decision-hold-lifecycle.test.sh and exercises real tasks-axi; it deliberately does not assert the help text because help is printed from source comment bytes and repo rules forbid asserting source bytes. Repo rules: never add an agent name as a commit co-author; commit subject plus at most 3 body lines; PR description at most 5 lines plus footer.
What Changed
bin/fm-decision-hold.sh holdno longer rejects a--reasonthat contains parentheses. It now turns(into[and)into]in the reason only, before passing it to tasks-axi. The--helpheader describes the substitution, and tasks-axi is unchanged.test_parenthesized_reason_is_substituted_for_tasks_axi, totests/fm-decision-hold-lifecycle.test.sh. It runs against the real tasks-axi and checks that the reason is stored with square brackets and that an exact retry is idempotent.docs/decision-hold-lifecycle.mdrecords this verification and its test output line.Risk Assessment
✅ Low: This is a small, bounded change. The script now turns ( and ) into [ and ] in the hold reason instead of rejecting them. The title and tasks-axi are unchanged. The help text documents the change, and a colocated test runs it against real tasks-axi, including an idempotent retry.
Testing
I ran the decision-hold lifecycle test file against the real tasks-axi and all 13 cases passed. That includes the new regression case: a reason like "(merged PRs 5, 6)" is now accepted and stored as "[merged PRs 5, 6]", and retrying the same hold works. The existing cases for hold, resolve, completion and teardown also still pass. I checked by hand that
--helpprints the new explanation, and saved the test log and the help output as evidence. This is a CLI change with no UI, so there are no screenshots. The working tree is clean.Evidence: Lifecycle test transcript (real tasks-axi)
ok - hold substitutes reason parentheses with square brackets for tasks-axiEvidence: fm-decision-hold.sh --help output
holdaccepts natural --reason wording: because tasks-axi reserves parentheses for markdown hold tags, it substitutes(and)with[and]before handing the reason over, so "(merged PRs 5, 6)" is stored as "[merged PRs 5, 6]".Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-decision-hold-lifecycle.test.sh(all 13 lifecycle cases pass with exit 0, including the newtest_parenthesized_reason_is_substituted_for_tasks_axi)Checked that the new test runs a hold with the reason "captain follow-up (merged PRs 5, 6) pending" through the real /opt/homebrew/bin/tasks-axi and thattasks-axi showreportshold_reason: "captain follow-up [merged PRs 5, 6] pending", including an idempotent retrybin/fm-decision-hold.sh --help(checked by hand that the header now describes the ( → [ and ) → ] substitution)Reviewedgit diff a0c8f92 d24ccd6: only bin/fm-decision-hold.sh and its colocated test changed, tasks-axi was not touched, and the substitution applies to the reason only✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.