fix: keep minted backlog task IDs dispatchable - #7
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
Align minted Firstmate backlog task IDs with runtime validation so a freshly minted ID can never be rejected at dispatch. Keep 64 as the single authoritative creation maximum where fm_task_id_creation_valid lives. Because external tasks-axi 0.2.3 has no configurable mint maximum and an optional prefix can produce 65 characters, add a small Firstmate-owned creation wrapper that stages tasks-axi minting, safely fits only overlong minted heads while preserving the two-hex uniqueness suffix, rejects invalid explicit IDs before backlog mutation, and delegates valid creation back to tasks-axi. Cover overlong minting, the passing 64-character boundary, and a clear creation-time 65-character failure. Keep the change focused with no drive-by refactors; validate through PR and CI, with the captain retaining merge authority.
What Changed
Risk Assessment
✅ Low: Captain, the branch is focused, satisfies the task-ID creation intent, and the prior correctness and contract findings are resolved without introducing a material new risk.
Testing
The previously completed full baseline and focused task-ID/captain-hold suites passed; manual CLI verification with tasks-axi 0.2.3 demonstrated a fitted 64-character mint accepted by dispatch validation, a persisted 64-character boundary ID, and a clear creation-time 65-character rejection with no backlog mutation.
Evidence: Task ID creation and dispatch CLI transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed (2) ✅
bin/fm-task-add.sh:40- The wrapper invokes tasks-axi from the caller’s current directory instead of the active FM_HOME. A normal absolute-path invocation after changing directories can therefore read or create the wrong backlog; resolve FM_HOME and run all target-backlog tasks-axi commands from there, while preserving explicit --file overrides.bin/fm-task-add.sh:146- Under the supported Bash 3.2 withset -u, expanding an initialized-but-empty array raises an unbound-variable error. The documentedfm-task-add.sh "<title>" --mintcall has no STORE_ARGS, so it aborts here before creation; use the repository’s${array[@]+"${array[@]}"}compatibility form and cover minting without optional flags.AGENTS.md:426- The intent requires the wrapper to “reject invalid explicit IDs before backlog mutation,” and this changed contract says every backlog item is created through it, butbin/fm-decision-hold.sh:268still callstasks_axi adddirectly. Its<origin>-decision-<key>IDs can exceed 64 characters and mutate the backlog without the authoritative creation check; captain, confirm whether captain-decision items are intentionally exempt or migrate that creation call.🔧 Fix: Fix task creation and captain-hold exemptions, captain
1 error still open:
bin/fm-pr-lib.sh:46- The captain explicitly required an “ownership/exemption note where the 64-character contract lives,” but this authoritative comment still says every creation entrypoint must enforce 64 characters whilefm-decision-hold.shintentionally creates overlong captain items. Update this contract besidefm_task_id_creation_validto scope the maximum to dispatchable items and name the deterministic captain-item exemption; the AGENTS.md note alone does not satisfy the requested placement.🔧 Fix: Document captain-hold task ID exemption
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"Configured baseline:command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"bash tests/fm-task-add.test.shbash tests/fm-decision-hold-lifecycle.test.shManual CLI evidence usingtasks-axi 0.2.3: minted an overlong prefixed ID throughbin/fm-task-add.sh, verified the fitted 64-character ID and preserved two-hex suffix, passed it intobin/fm-spawn.shuntil the later brief check, persisted an explicit 64-character ID, and confirmed an explicit 65-character ID failed with exit 2 before backlog mutation✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.