Repository navigation
fix: flag unrunnable validation checks as environment faults - #3989
AgardnerAU wants to merge 7 commits into
Conversation
…fault A no-mistakes gate finding reporting that a configured check COULD NOT RUN is not a code finding: it is an environment fault, and it means nothing was checked. Firstmate's own current-state line rendered it identically to a real product decision - "1 finding(s) (ask-user: authority decision)" - so the only thing standing between an unrun check and an approval was a tired reader noticing the difference in the finding prose. Add fm_nm_unrunnable_check_finding to the shared run-record library as the one detector for that case, and name it in fm-crew-state's parked-gate detail as "environment fault: a configured check could not run - NOTHING WAS CHECKED; not approvable". Pair it with the decision rule in ask-user-authority, which now owns the policy that such a finding is never answered by approval and is repaired in the copy the gate is actually validating. Regression cases drive the real helper over both 2026-09-08 recurrences with their verbatim recorded descriptions, over an unrunnable check hiding behind a genuine finding, and over an ordinary product decision that must stay unflagged.
…lete validation accurately
…dency safety rationale
|
…assifying only finding descriptions. The regression failed before the fix and passed afterwards. Crew-state tests, repository lint, and git diff --check passed. CI and Require no-mistakes reported action_required with zero jobs; neither exposed a code failure
…belled product failures as environment faults. Regression reproduced before the fix; crew-state tests, targeted ShellCheck, documentation checks and diff checks now pass. CI and Require no-mistakes ended with action_required and zero jobs, not code failures. No pipeline controls were invoked
|
Speaking as Kun's firstmate: Reviewed tip VISION.md (each rule)
Contract-class: restore (promised: incomplete/unrunnable checks are not benign approvals). Attestation: MATCH. Fork CI+NM approved this tip (runs |
Keep the unrunnable-check environment-fault naming alongside upstream's positional ask-user decision component. The metadata regression now asserts the decision component only where the action column is provable, matching upstream's deliberate withholding when a quoted field precedes it.
|
Merged current main into this branch (head b6f6651); conflicts are resolved and it is up to date with main and ready for CI. |
Intent
On 2026-09-30, after a review of every comment on the fleet's open kunchenguid/firstmate pull requests, the captain approved one upstream refresh pass: bring each conflicting PR up to date with upstream main, post one short note on each PR, and post no reminder comments.
This task covers #3989 ("fix: flag unrunnable validation checks as environment faults"), on branch
fm/fm-pipeline-worktree-missing-depsfrom the forkAgardnerAU/firstmateintokunchenguid:main, current heada97b4f4da1ad486713748b7f362da0de45d9dc62. Reuse that branch and that PR; never replace them.Context: upstream closes a PR after 14 days of author silence, and only an author push or comment resets that clock; a stale close is irreversible. Every earlier maintainer request on this PR has been addressed, and the no-mistakes attestation in its body matches its current head. The maintainer triages on author activity, and test runs on fork PRs wait for maintainer approval.
This PR was last touched on 2026-09-08. Its checks passed then and the maintainer named it a candidate to merge on their own next pass, but it now conflicts with main. Two automated review comments from 2026-09-08 (tooling-like words in a finding's id or file field, and broad nouns such as command, install, format or test, classifying a product finding as an environment fault) predate the last commit, which narrowed those matches.
What Changed
fm_nm_finding_descriptionsandfm_nm_unrunnable_check_findingtobin/fm-nm-run-lib.sh. The first function reads only the description column of the gate findings table, so finding IDs and file paths are not used for classification. The second function matches descriptions that report a configured check, linter, formatter or test runner could not run, including "command not found".bin/fm-crew-state.shnow marks a parked gate with such a finding as an environment fault: "a configured check did not run - validation is incomplete; not approvable". It no longer shows this finding only as a decision to approve.ask-user-authorityskill now states the policy. Firstmate never accepts, waives or escalates a finding that a check could not run. The only answer is Fix: install dependencies from the frozen lockfile in the gate's own worktree and run the real checks. New cases intests/fm-crew-state.test.shcover recorded missing-dependency findings, mixed findings and product failures that must not be classified as environment faults.🤖 Generated with Claude Code
Risk Assessment
✅ Low: The merge (parents a97b4f4 PR head and eb77f02 upstream main) resolves cleanly with no conflict markers, the branch's net diff against main is limited to the already-reviewed, narrowed detector plus its behavioural tests and skill text, and the detector correctly selects only the description column (header-ordered, quote-aware) and requires a tooling token together with an execution-failure phrase, so the recorded incidents are detected and product findings like 'Administrators cannot run exports' are not.
Testing
I ran the targeted fm-crew-state test file, which drives the real fm-crew-state.sh CLI against fake axi status fixtures, and all tests passed. The parked state line for both verbatim incident findings reads "environment fault: a configured check did not run - validation is incomplete; not approvable". A direct detector transcript shows that both incidents are detected and that product findings, including ones with tooling words in the id or file field, are not. The merge commit has no conflict markers and contains upstream main. No Herdr or tmux lab was needed: the change affects only shell classification of
axi statusoutput.Evidence: fm-crew-state test log with state lines for the incident fixtures
Source: fm-crew-state test log with state lines for the incident fixtures
Evidence: Detector transcript for incident and adversarial product findings
Source: Detector transcript for incident and adversarial product findings
Incident 1 (ESLint and Prettier could not run, dependencies absent) -> ENVIRONMENT FAULT Incident 2 (... Command not found) -> ENVIRONMENT FAULT Administrators cannot run exports -> not an environment fault id=test, file=src/lint/x.go, Administrators cannot run exports -> not an environment fault Users cannot run the optional plugin install -> not an environment fault The export format cannot be run by administrators -> not an environment fault Search is unavailable to administrators -> not an environment faultPipeline
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.
FM_TEST_EVIDENCE=1 bash tests/fm-crew-state.test.sh(full crew-state test file; it drives bin/fm-crew-state.sh end-to-end with fake axi status output, rc=0)Direct transcript: sourcebin/fm-nm-run-lib.shand callfm_nm_unrunnable_check_findingon axi status TOON built from both incident descriptions and from adversarial product findings (Administrators cannot run exports, a tooling word in the id/file field,Users cannot run the optional plugin install,The export format cannot be run by administrators,Search is unavailable to administrators)git grep FM_NM_UNRUNNABLE_CHECK_RE bin/(confirms that the environment override is removed)git grepfor conflict markers andgit merge-base --is-ancestor eb77f02b HEAD(confirms that the merge with upstream is clean)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.