PYR0D-401: Validation intent: stop workers passing --intent through a shared temp file #46
Loading…
Reference in a new issue
No description provided.
Delete branch "fm/fm-nm-intent-file-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Story: PYR0D-401 - Validation intent: stop workers passing --intent through a shared temp file
Author: airouter-ch/Qwen3.8 via omp
What was wrong. Investigation fm-nm-wrong-intent (report: /home/john/code/firstmate/data/fm-nm-wrong-intent/report.md) traced a forms validation run (FORMS-31) that was validated against Flow PR 153's intent: workers wrote their intent to the host-global /tmp/nm-intent.txt and ran with --intent "$(cat /tmp/nm-intent.txt)"; when one task's write was rejected by the harness, the file still held another task's text, and the run used it. The no-mistakes daemon stored and used exactly what it was given; the defect is the worker-side transport, not the tool.
What changed. The no-mistakes driving contract in bin/fm-dod-lib.sh now:
PID suffix, because each agent shell call gets a new PID and a later cat would silently read nothing;The transport text lives in one helper (fm_nm_intent_transport_block) shared by the driving block and the overlay; the one-owner rule is preserved.
Follow-up (out of scope here). Defence-in-depth for the no-mistakes tool itself: no-mistakes axi run --intent could warn when the supplied intent names a different repo/branch/PR than the run's own repo+branch. The report's section 6 records the rationale; file with no-mistakes as hardening.
Verification. tests/fm-brief.test.sh (new regression asserts the concrete file name, the one-step read-back, the composed-string target, and the cleanup line), tests/fm-dod-lib.test.sh, tests/fm-task-delivery.test.sh all pass; shellcheck clean; the regression was proven to fail against the pre-fix lib and against a mutation dropping the read-back sentence.