You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(bin): refuse tasks-axi add/create --start so In flight always has a dispatch record - #5524
Running the backlog wrapper with add ... --start puts a row In flight although no dispatch record, status file, or inbox exists for it, and nothing later notices, so the live-task count includes work nobody is doing.
Make the wrapper refuse add --start (dispatch is the only path that moves a row to In flight) so a hand-started row cannot exist without dispatch artifacts.
This closes upstream issue #4753.
What Changed
bin/fm-tasks-axi.sh now rejects --start on add and its create alias, exiting with code 2 and pointing the caller to add the row Queued and let bin/fm-spawn.sh dispatch it; start <id> and plain add/create still pass through.
Documented the guard in docs/configuration.md, explaining that a hand-started row would lack the task record, status file, and inbox that dispatch creates and would otherwise count as live work nobody is running.
Added test_wrapper_refuses_add_start covering both spellings' refusal (exit 2, backlog unchanged, message names the dispatch path) and the still-allowed add then start <id> flow.
Risk Assessment
✅ Low: A small, well-bounded wrapper guard that refuses add/create --start with an order-independent check on $1, correct passthrough for start and other commands, accurate scoped docs, and a behavioral regression test that verifies refusal and passthrough.
Testing
Ran the focused suite tests/fm-tasks-axi.test.sh (all green, including the new add/create --start case) and drove a manual end-to-end transcript through the wrapper in an isolated split home. add --start and create --start are both refused with exit 2 and the message naming bin/fm-spawn.sh, and the backlog stays unchanged (no In flight row created). Plain add still writes a Queued row and start <id> still transitions it to In flight, matching the intent's scope. An adversarial flag-first add --start hs-3 is also refused. No UI surface exists for this CLI change; evidence is the CLI transcript.
Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario
Result
Live
Evidence
add --start is refused with exit 2 and leaves no In flight row
\### Scenario 1: add --start is refused (exit 2, names dispatch path)
fm-tasks-axi: add --start would place a row In flight with no dispatch record; add it Queued and let bin/fm-spawn.sh start it
exit=2
\### Scenario 2: create --start alias is also refused
fm-tasks-axi: add --start would place a row In flight with no dispatch record; add it Queued and let bin/fm-spawn.sh start it
exit=2
\### Backlog after refusals (must be unchanged: no In flight row):
## In flight
## Queued
## Done
\### Scenario 3: plain add (no --start) still writes a Queued row
ok: added hs-2 -> Queued
task:
id: hs-2
title: queued work
state: queued
blocked: no
blocked_by: none
held: no
hold_reason: "-"
hold_kind: "-"
hold_until: "-"
kind: task
repo: "-"
priority: "-"
created: 2026-09-24
closed: "-"
deps: none
links: none
body: ""
help[2]:
- Run `tasks-axi start hs-2` to move it to in flight
- Run `tasks-axi block hs-2 --by <other>` to record a dependency
exit=0
\### Scenario 4: start <id> passthrough still moves the row to In flight
ok: start hs-2 -> In flight
help[1]:
- Run `tasks-axi done hs-2 --pr <url>` when it ships
exit=0
\### Final backlog (hs-2 In flight, refused rows never created):
## In flight
- [ ] hs-2 - queued work (since 2026-09-24)
## Queued
## Done
\### Scenario 5 (adversarial): --start before the subcommand id, still refused
fm-tasks-axi: add --start would place a row In flight with no dispatch record; add it Queued and let bin/fm-spawn.sh start it
exit=2
🚨 bin/fm-tasks-axi.sh:102 - The add --start guard only matches the literal command add ([ "${1:-}" = add ]), but tasks-axi add has a documented alias create. I verified tasks-axi create <id> "<title>" --start places the row in_flight identically to add --start, so fm-tasks-axi.sh create hs-1 "x" --start passes the guard untouched and reintroduces the exact In-flight-row-with-no-dispatch-record defect tasks-axi add --start can mark a row In flight with no dispatch record, and nothing ever corrects it #4753 closes. create is an advertised alias on this human/agent-facing wrapper, so it is a reachable intended-usage path, not hypothetical. Earliest shared fix: match both spellings, e.g. case "${1:-}" in add|create). The new test (tests/fm-tasks-axi.test.sh:207) exercises only add, so it does not cover this sibling path; extend it to assert create ... --start is also refused. The remedy corrects what the change already does (fully closing the only path), so it stays auto-fix.
🚨 bin/fm-tasks-axi.sh:102 - The add --start guard only matches the literal command add ([ "${1:-}" = add ]), but tasks-axi add has a documented alias create. I verified tasks-axi create <id> "<title>" --start places the row in_flight identically to add --start, so fm-tasks-axi.sh create hs-1 "x" --start passes the guard untouched and reintroduces the exact In-flight-row-with-no-dispatch-record defect tasks-axi add --start can mark a row In flight with no dispatch record, and nothing ever corrects it #4753 closes. create is an advertised alias on this human/agent-facing wrapper, so it is a reachable intended-usage path, not hypothetical. Earliest shared fix: match both spellings, e.g. case "${1:-}" in add|create). The new test (tests/fm-tasks-axi.test.sh:207) exercises only add, so it does not cover this sibling path; extend it to assert create ... --start is also refused. The remedy corrects what the change already does (fully closing the only path), so it stays auto-fix.
⚠️bin/fm-tasks-axi.sh:101 - The change's stated goal is that "dispatch is the only path that moves a row to In flight" so "a hand-started row cannot exist without dispatch artifacts". The new guard closes add --start/create --start, but tasks-axi start <id> is a sibling command whose sole purpose is "Move a task to In flight (idempotent)" (verified via tasks-axi start --help). The wrapper passes start <id> straight through (line 116 * passthrough), so fm-tasks-axi.sh start hs-2 moves a Queued row to In flight with no dispatch record, status file, or inbox - the exact tasks-axi add --start can mark a row In flight with no dispatch record, and nothing ever corrects it #4753 condition, since those artifacts are created by bin/fm-spawn.sh's orchestration, not by tasks-axi start (dispatch calls fm_backlog_start -> tasks-axi start directly, bypassing this wrapper). The new test even codifies this hole as intended behavior: tests/fm-tasks-axi.test.sh:226 asserts start hs-2 passes through. So the invariant in the intent's rationale is not actually enforced. Whether the wrapper should also refuse start <id> (matching the same refusal for case add|create, plus a start command guard) is a product-scope decision beyond the literal 'refuse add --start' requirement, so this needs your call - the remedy expands the change's behavior, not just corrects it. The literal required constraint (refuse add --start) is satisfied.
🔧 Fix applied.
1 warning still open:
⚠️docs/configuration.md:123 - Fix-round commit f7c1cad claims to 'drop only-path overclaim', but the reworded text retains an equivalent universal claim. docs/configuration.md:123 states 'So a hand-started row cannot exist without dispatch artifacts', and the header comment at bin/fm-tasks-axi.sh:39-40 says refusing add/create --start means 'this wrapper cannot place a row In flight without the dispatch artifacts bin/fm-spawn.sh creates'. Both are false: tasks-axi start <id> places a Queued row In flight with no dispatch record, status file, or inbox, and this same wrapper passes start <id> straight through (bin/fm-tasks-axi.sh:117 * passthrough; codified by tests/fm-tasks-axi.test.sh:226 asserting start hs-2 succeeds). So a hand-started row CAN exist without dispatch artifacts via start <id>. This is the exact 'dispatch is the only path' overclaim the round-2 user instruction said to remove ('must say that add --start and create --start no longer create an In flight row without dispatch artifacts, not that dispatch is the only path'). Sibling sites to correct together: docs/configuration.md:123 (universal 'a hand-started row cannot exist without dispatch artifacts') and bin/fm-tasks-axi.sh:39-40 (universal 'this wrapper cannot place a row In flight without the dispatch artifacts'). Remedy: scope both to add --start / create --start specifically (they no longer place a row In flight without dispatch artifacts) and drop the universal wording, since start <id> remains a documented direct transition the wrapper passes through. Non-functional wording correction of an inaccuracy the change itself introduced, so auto-fix; it narrows, not expands, behavior claims.
🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario
Result
Live
Evidence
add --start is refused with exit 2 and leaves no In flight row
bash tests/fm-tasks-axi.test.sh (test_wrapper_refuses_add_start drives add --start, create --start, plain add, and start <id> through the real wrapper)
Manual CLI transcript through bin/fm-tasks-axi.sh against real tasks-axi in an isolated split home: add --start, create --start, plain add, start <id>, and adversarial flag-first add --start hs-3
Intent
Fixes #4753
Running the backlog wrapper with
add ... --startputs a row In flight although no dispatch record, status file, or inbox exists for it, and nothing later notices, so the live-task count includes work nobody is doing.Make the wrapper refuse
add --start(dispatch is the only path that moves a row to In flight) so a hand-started row cannot exist without dispatch artifacts.This closes upstream issue #4753.
What Changed
bin/fm-tasks-axi.shnow rejects--startonaddand itscreatealias, exiting with code 2 and pointing the caller to add the row Queued and letbin/fm-spawn.shdispatch it;start <id>and plainadd/createstill pass through.docs/configuration.md, explaining that a hand-started row would lack the task record, status file, and inbox that dispatch creates and would otherwise count as live work nobody is running.test_wrapper_refuses_add_startcovering both spellings' refusal (exit 2, backlog unchanged, message names the dispatch path) and the still-allowedaddthenstart <id>flow.Risk Assessment
✅ Low: A small, well-bounded wrapper guard that refuses add/create --start with an order-independent check on $1, correct passthrough for start and other commands, accurate scoped docs, and a behavioral regression test that verifies refusal and passthrough.
Testing
Ran the focused suite tests/fm-tasks-axi.test.sh (all green, including the new add/create --start case) and drove a manual end-to-end transcript through the wrapper in an isolated split home.add --startandcreate --startare both refused with exit 2 and the message naming bin/fm-spawn.sh, and the backlog stays unchanged (no In flight row created). Plainaddstill writes a Queued row andstart <id>still transitions it to In flight, matching the intent's scope. An adversarial flag-firstadd --start hs-3is also refused. No UI surface exists for this CLI change; evidence is the CLI transcript.Evidence: add --start / create --start refusal CLI transcript
Source: add --start / create --start refusal CLI transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed (3) ✅
bin/fm-tasks-axi.sh:102- The add --start guard only matches the literal commandadd([ "${1:-}" = add ]), buttasks-axi addhas a documented aliascreate. I verifiedtasks-axi create <id> "<title>" --startplaces the rowin_flightidentically toadd --start, sofm-tasks-axi.sh create hs-1 "x" --startpasses the guard untouched and reintroduces the exact In-flight-row-with-no-dispatch-record defecttasks-axi add --startcan mark a row In flight with no dispatch record, and nothing ever corrects it #4753 closes.createis an advertised alias on this human/agent-facing wrapper, so it is a reachable intended-usage path, not hypothetical. Earliest shared fix: match both spellings, e.g.case "${1:-}" in add|create). The new test (tests/fm-tasks-axi.test.sh:207) exercises onlyadd, so it does not cover this sibling path; extend it to assertcreate ... --startis also refused. The remedy corrects what the change already does (fully closing the only path), so it stays auto-fix.🔧 Fix applied.
2 issues (1 error, 1 warning) still open:
bin/fm-tasks-axi.sh:102- The add --start guard only matches the literal commandadd([ "${1:-}" = add ]), buttasks-axi addhas a documented aliascreate. I verifiedtasks-axi create <id> "<title>" --startplaces the rowin_flightidentically toadd --start, sofm-tasks-axi.sh create hs-1 "x" --startpasses the guard untouched and reintroduces the exact In-flight-row-with-no-dispatch-record defecttasks-axi add --startcan mark a row In flight with no dispatch record, and nothing ever corrects it #4753 closes.createis an advertised alias on this human/agent-facing wrapper, so it is a reachable intended-usage path, not hypothetical. Earliest shared fix: match both spellings, e.g.case "${1:-}" in add|create). The new test (tests/fm-tasks-axi.test.sh:207) exercises onlyadd, so it does not cover this sibling path; extend it to assertcreate ... --startis also refused. The remedy corrects what the change already does (fully closing the only path), so it stays auto-fix.bin/fm-tasks-axi.sh:101- The change's stated goal is that "dispatch is the only path that moves a row to In flight" so "a hand-started row cannot exist without dispatch artifacts". The new guard closesadd --start/create --start, buttasks-axi start <id>is a sibling command whose sole purpose is "Move a task to In flight (idempotent)" (verified viatasks-axi start --help). The wrapper passesstart <id>straight through (line 116*passthrough), sofm-tasks-axi.sh start hs-2moves a Queued row to In flight with no dispatch record, status file, or inbox - the exacttasks-axi add --startcan mark a row In flight with no dispatch record, and nothing ever corrects it #4753 condition, since those artifacts are created by bin/fm-spawn.sh's orchestration, not bytasks-axi start(dispatch calls fm_backlog_start ->tasks-axi startdirectly, bypassing this wrapper). The new test even codifies this hole as intended behavior: tests/fm-tasks-axi.test.sh:226 assertsstart hs-2passes through. So the invariant in the intent's rationale is not actually enforced. Whether the wrapper should also refusestart <id>(matching the same refusal forcase add|create, plus astartcommand guard) is a product-scope decision beyond the literal 'refuse add --start' requirement, so this needs your call - the remedy expands the change's behavior, not just corrects it. The literal required constraint (refuse add --start) is satisfied.🔧 Fix applied.
1 warning still open:
docs/configuration.md:123- Fix-round commit f7c1cad claims to 'drop only-path overclaim', but the reworded text retains an equivalent universal claim. docs/configuration.md:123 states 'So a hand-started row cannot exist without dispatch artifacts', and the header comment at bin/fm-tasks-axi.sh:39-40 says refusing add/create --start means 'this wrapper cannot place a row In flight without the dispatch artifacts bin/fm-spawn.sh creates'. Both are false:tasks-axi start <id>places a Queued row In flight with no dispatch record, status file, or inbox, and this same wrapper passesstart <id>straight through (bin/fm-tasks-axi.sh:117*passthrough; codified by tests/fm-tasks-axi.test.sh:226 assertingstart hs-2succeeds). So a hand-started row CAN exist without dispatch artifacts viastart <id>. This is the exact 'dispatch is the only path' overclaim the round-2 user instruction said to remove ('must say that add --start and create --start no longer create an In flight row without dispatch artifacts, not that dispatch is the only path'). Sibling sites to correct together: docs/configuration.md:123 (universal 'a hand-started row cannot exist without dispatch artifacts') and bin/fm-tasks-axi.sh:39-40 (universal 'this wrapper cannot place a row In flight without the dispatch artifacts'). Remedy: scope both to add --start / create --start specifically (they no longer place a row In flight without dispatch artifacts) and drop the universal wording, sincestart <id>remains a documented direct transition the wrapper passes through. Non-functional wording correction of an inaccuracy the change itself introduced, so auto-fix; it narrows, not expands, behavior claims.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-tasks-axi.test.sh(test_wrapper_refuses_add_start drives add --start, create --start, plain add, and start <id> through the real wrapper)Manual CLI transcript through bin/fm-tasks-axi.sh against real tasks-axi in an isolated split home:add --start,create --start, plainadd,start <id>, and adversarial flag-firstadd --start hs-3✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.