Conversation
|
Speaking as Kun's firstmate: whole thread read (body; no prior comments/reviews; linked open issue #5044 POS[1] unbound — another executor owns issue triage; tip vs main HEAD: Contract-class:
VISION (short):
Outcome: Security FYI: none material (argument validation only; no workflow/RCE/credential surface). |
Intent
The developer wanted to fix bin/fm-spawn.sh so dispatches missing required arguments fail with a clear, actionable message naming the missing argument instead of a raw “POS[1] unbound variable” shell error. They required reproducing and confirming all reachable unguarded positional reads, including ship and secondmate paths, then adding explicit checks without changing argument grammar, defaults, or unrelated behavior. They also required a colocated regression test for a missing-project ship invocation that verifies nonzero exit, the clear message, and no unbound-variable text.
What Changed
Risk Assessment
✅ Low: The change is narrowly scoped to validating positional arguments before dispatch and lifecycle paths, with matching behavioral coverage and no material regressions identified.
Testing
Live CLI probes and targeted regression tests passed. Herdr lab provisioning was untestable because
herdris unavailable on PATH; no Herdr pass was claimed.herdrexecutable is unavailable. Provide a verified Herdr executable on PATH and rerun through `bin/fm-herdr-…Evidence: Live positional validation transcript
Source: Live positional validation transcript
Evidence: Herdr lab availability check
Source: Herdr lab availability check
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-spawn.sh:1354- Positional checks occur after other guards. For example, a batch with an empty project and an active dispatch profile can fail at the harness backstop instead of naming the missing <project-dir>; single-task checks also occur after lifecycle and backend setup. Validate positional shape immediately after parsing to guarantee the promised actionable error.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
herdrexecutable is unavailable. Provide a verified Herdr executable on PATH and rerun through `bin/fm-herdr-…bash tests/fm-spawn-batch.test.shLive isolatedbin/fm-spawn.shchecks for missing ship/scout/task and empty batch argumentsFocused dispatch-profile and secondmate regression testsbin/fm-herdr-lab.sh prepareavailability check✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Closes #5044