Repository navigation
feat(bin): resolve a per-run no-mistakes lint skip at task intake - #22
Merged
Merged
Conversation
Carry nmskip registry preferences through brief, spawn, promotion, and relaunch contracts without changing repository lint configuration. Limit intake skips to lint, test, and document and merge Gerrit publication skips into the driving instruction. Verified 2026-10-03: five focused behavior suites pass (FM_TEST_SUMMARY total=5 failed=0 skipped_gate=0); canonical local and explicit source-aware fm-lint pass with ShellCheck 0.11.0 and actionlint 1.7.12; documentation audience and coverage guards pass. Existing no-skip renderer output remains byte-identical across five delivery/forge combinations and both wait settings.
…ct-management docs
) * test(calm): pin Pi's regular TUI mode where pane assertions read scrollback Pi 1.0.0 defaults its TUI to a fullscreen alternate-screen mode whose scrollable transcript is application-owned, so rows that leave the viewport never enter terminal scrollback and tmux capture-pane -S can no longer see them. The Pi Calm e2e launches now pass --tui-mode regular wherever the flag exists so the transcript assertions keep reading real scrollback on both the Pi 1.0.0 line and earlier Pi lines, which have no such flag and render regular-only anyway. * no-mistakes(document): Correct Pi TUI documentation and scrollback rationale (cherry picked from commit 349e189)
…t.sh, not in this PR's code. CI installs the latest Pi, and this run got 1.0.1. The base commit passed CI on Pi 0.99.2, and upstream main passes on 1.0.0. In 1.0.1, Pi renamed the lookup that `createToolHtmlRenderer` reads from `deps.getToolDefinition` to `deps.getToolRenderers`. The tests passed only `getToolDefinition`. Under 1.0.1, the lookup call throws, the renderer catches the error and returns `undefined`, and the test fails with "grep disappeared from /export calm.html HTML while calm mode was on". Invariant: every renderer the tests build must give the installed Pi its tool lookup under the name that version reads. Four test sites build this renderer, and I changed all four the same way: each passes the same lookup under both `getToolDefinition` (Pi before 1.0.1) and `getToolRenderers` (1.0.1). Older versions ignore the new name, so nothing changes for them. Two sites are in tests/fm-calm-pi-extension.test.sh: `assertStockHtmlRendering` and `unmatchedRenderer`. They share one `findTool` lookup. The other two are in tests/fm-pi-branch-extension.test.sh (`stockHtml` and `actualHtml`). That test expects `undefined`, and under 1.0.1 it was passing only because the lookup threw. Now it passes because the renderer really defers to Pi's own fallback. I changed no production code. Verification: I installed Pi 1.0.1 under /tmp in the same layout a global npm install uses and pointed `FM_PI_PACKAGE_DIR` at it. Before the fix, the CI failure reproduced exactly. After the fix, 14 steps of fm-calm-pi-extension pass, including the export step that failed in CI and the tmux follow-up, queued-row and geometry cases. fm-pi-branch-extension passes in full (51 ok, rc=0). Under the local Pi 0.87.1, both tests give the same results: 14 ok, and 51 ok with rc=0. Two local-only limits: 1. My ~/.tmux.conf sets `default-shell /bin/fish`, which can't parse the test's bash launch command, so the tmux cases fail locally whatever the change. I ran with `HOME` pointed at an empty temp directory to avoid that. This explains the "did not reach the ready composer" failure reported in the previous round. 2. No Chrome or Chromium is on PATH here, so the last rendered-export-DOM step in fm-calm-pi-extension did not run locally. Under both Pi versions it stops at that step with "Chrome or Chromium is required". The CI runner has Chrome, so CI will be the first run of that step under 1.0.1
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
also do the lint skip per run by firstmate.
On the lint row of the stage table in the same review: set to zero token path but also this is already enforced by the ci/cd at ado. and we have lint rules already built into repo.
Context the ask refers to (no-mistakes outline review, 2026-10-03): the gate's lint step on Mosaiq-line repositories runs the configured commands.lint, a dotnet Release build that is already token-free but costs the build's wall time on every run, while the Azure DevOps PR validation enforces the same Release build with warnings-as-errors and the repository's own analyzers. The agreed answer is to skip the lint step per run, decided by firstmate at intake for repositories whose CI build is the lint gate, and never by removing commands.lint from a repository config, because an empty lint command makes the gate run an agent lint pass that costs tokens. The accepted trade-off: a compile error then surfaces in the Test step's own build or at CI, where the repair is an agent round instead of a free local rerun; the lifetime count of lint-fix turns on this machine is 4.
What Changed
nmskip=lintregistry token.fm-project-mode.sh --nm-skip <project>reads it and prints it, or prints an empty line when the token is absent. Any value other thanlintis refused with exit status 3. The sharedfm_nm_skip_validcheck infm-dod-lib.shallows onlylintor an empty value, so no other pipeline step can be skipped at intake.fm-brief.sh,fm-spawn.sh, andfm-promote.shaccept an explicit--nm-skip lintonly for no-mistakes ship tasks. The value is passed intofm_dod_block, so the delivery contract recordsskip=lintand the worker is told to pass--skip linton everyno-mistakes axi run, including reattaches. On Gerrit this becomes--skip push,pr,ci,lint.nm_skip=in ship task metadata. Spawn refuses when the brief'sskip=field doesn't match--nm-skip, and relaunch reuses the recorded value; passing--nm-skipwith--relaunchis refused. Spawn prints a notice, without refusing, when a no-mistakes task's skip differs from the registry. The AGENTS.md intake rules, the project-management skill,docs/configuration.md,docs/scripts.mdand the Gerrit integration doc now describe the token, with tests covering each script.🤖 Generated with Claude Code
Risk Assessment
Testing
I drove the real firstmate scripts in a disposable lab home made with
bin/fm-lab-home.sh. Spawns ran on a privatetmux -L fm-labserver, with treehouse rooted inside the lab and a harmlesssleepraw launch command standing in for the crewmate. Covered: registry parsing, brief rendering, ship spawns, relaunch and scout promotion, each with happy-path and adversarial cases. All scenarios passed, and briefs without a skip are byte-identical to the base commit. I also rantests/fm-dod-lib.test.sh, which passed. The lab, task temp dirs and base archive were all removed afterwards. CLI transcripts are saved as evidence; there is no UI surface to screenshot. One part was not exercised live: an actual no-mistakes run honoring--skip lint. The gate phase forbids invokingaxi run. Upstream source confirmslintis a valid skip step and that--skipis not refused when reattaching to an active run.[no-mistakes nmskip=lint]withfm-project-mode.sh --nm-skipand getslint. Plain, empty-token and unregistered projects return an empty line, and the default/f…nmskip=testornmskip=lint,testis refused with exit 3 and an actionable 'use lint only' error on every query form (default, --raw, --forge, --branch-prefix, --nm-ski…fm-brief.sh --mode no-mistakes --nm-skip lintwritesDelivery contract: mode=no-mistakes skip=lintand tells the worker to pass--skip linton every axi run, including reattach--nm-skip lintgives the worker the merged--skip push,pr,ci,lintand the contractforge=gerrit shape=squash skip=lint--nm-skipvalues test/document/review/push/lint,test, and refuses--nm-skip lintwith direct-PR, local-only or --scout; no brief is written--nm-skip linton an nmskip=lint project launches, recordsnm_skip=lintin state/<id>.meta, prints no deviation notice, and the worker's launch-brief carries--skip lint--nm-skip test,--nm-skip lint,test, direct-PR+--nm-skip, scout+--nm-skip and--relaunch --nm-skipare each refused, with no metadata writtennm_skip=lintin metadata (only spawn_gen changes) and in the regenerated launch-brief. Tampered metadata (nm_skip=test, ornm_skip=linton a dir…--mode no-mistakes --nm-skip lintwritesnm_skip=lintmetadata and Gerrit ship instructions with--skip push,pr,ci,lint. Invalid or out-of-scope --nm-skip promotions…no-mistakes axi run --skip lintand the gate's lint step (commands.lint) is skipped for that run, while reattaching with the same flag keeps driving the active runno-mistakes axi run. This gate phase explicitly forbids invoking it, and nested pipeline control is refused inside an active run. Upstream s…Evidence: Registry --nm-skip resolution and invalid-token refusals (exit 3 on every query)
Source: Registry --nm-skip resolution and invalid-token refusals (exit 3 on every query)
Evidence: fm-brief --nm-skip lint contract lines (plain and Gerrit merged skip) and refusals
Source: fm-brief --nm-skip lint contract lines (plain and Gerrit merged skip) and refusals
Evidence: No-skip briefs byte-identical to base commit 4aa6c57 across 5 mode/forge combos
Source: No-skip briefs byte-identical to base commit 4aa6c57 across 5 mode/forge combos
Evidence: Live lab spawn: mismatch refusal, nm_skip metadata, launch-brief --skip lint, notice scoping, adversarial and relaunch checks
Source: Live lab spawn: mismatch refusal, nm_skip metadata, launch-brief --skip lint, notice scoping, adversarial and relaunch checks
Evidence: Live scout promotion carrying --nm-skip lint into Gerrit ship instructions and metadata
Source: Live scout promotion carrying --nm-skip lint into Gerrit ship instructions and metadata
Evidence: Worker launch brief excerpt
Pipeline
Updates from git push no-mistakes