Repository navigation
Fix fm-dod-lib lint on carry and flag partial changed-file lint - #43
Merged
Merged
Conversation
This was referenced Nov 17, 2026
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.
Closes #39
GitHub only acts on closing keywords when a PR merges into the repository's default branch (
mainhere). This PR targetscarry, so merging it will not close issue 39 on its own; close the issue by hand after the merge.What changes
bin/fm-dod-lib.sh:fm_brief_switch_deliverykeeps the three old and three new contract fragments in two indexed arrays,oldandnew, read by index. There is no${!name}indirection left, so ShellCheck sees every read. Behaviour is unchanged.bin/fm-dod-lib.sh:FM_BRIEF_SWITCH_FROMkeeps a reasoned# shellcheck disable=SC2034comment naming its reader,bin/fm-control.sh, which checks it after the call returns. Removing the global would changefm-control.sh's interface, so it stays.bin/fm-lint.sh: a no-argument run in local changed-file mode now ends with two lines. The first saysNOT A FULL LINTand names the codes it did not check (SC1091, SC2034, SC2153, SC2329). The second gives the exact explicit-path command that checks them for the same files. Exit status, file selection and analysis flags are unchanged. Explicit-path, CI, partition andmainruns print nothing new.firstmate-coding-guidelinesandCONTRIBUTING.md: before calling a script change done, runbin/fm-lint.shwith every changed shell file as an explicit path, and never report a no-argument branch run alone as lint passing.Lint at the PR head (ShellCheck 0.11.0, the pinned version)
Before this change, at
origin/carry28336ef, the same command exits 1 with the seven SC2034 warnings the issue lists (lines 409, 426 and 428).bin/fm-lint.sh bin/fm-promote.sh bin/fm-brief.sh bin/fm-control.sh bin/fm-lint.sh tests/fm-lint.test.shalso exits 0.Full canonical lint at the PR head, run the way CI runs it (
bin/fm-lint.sh --partition 1of2and--partition 2of2): partition 1 exits 0. Partition 2 exits 1, and its only findings are intests/fm-daemon.test.sh(see the last section). No topic-board file has a finding.Why PR 26's lint passed
bin/fm-lint.sh(pinned ShellCheck 0.11.0 and actionlint 1.7.12) printslocal changed-file mode; ShellCheck source following disabled, lints 30 changed files includingbin/fm-dod-lib.sh, and exits 0.bin/fm-lint.sh bin/fm-dod-lib.shat the same commit exits 1 with the seven warnings.main.bin/fm-lint.shas passing.carryruns lint automatically..github/workflows/ci.ymltriggers only formain, and the fork has no active GitHub workflows (the Actions workflows API lists none).What this does and does not fix
This narrows the gap and does not close it. A worker that follows the guideline, or reads the new closing lines, runs the source-aware check, but nothing enforces it on PRs to
carryuntil a lint check runs on them. That needs a repository setting and is outside this PR. The no-mistakes lint step uses the same changed-file mode, so it gets the same notice and has the same limit.The generated worker instructions (
bin/fm-brief.sh,bin/fm-dod-lib.sh) name no lint command, so they needed no correction.On this fork the changed-file base is fixed to
origin/main, so the command the notice prints covers the wholecarrydelta (37 to 38 shell files), not just the branch's own diff. Measured on this machine, that source-aware run took 2m59s with a peak process RSS of about 12.7 GB. This PR does not change the base.Tests
bash tests/fm-lint.test.sh: 50 ok, exit 0. The newtest_changed_mode_ends_by_naming_the_unchecked_codes_and_full_commandchecks the notice text, checks that the last line is the exact explicit-path command for the changed files, and checks that an explicit-path run does not print it. Two existing assertions that a changed-mode run reports no SC2034 or SC2329 finding now match ShellCheck's finding form (SC2034 () instead of the bare code, which the notice itself names.bash tests/fm-dod-lib.test.sh: all pass. Changing the replacement to always use the first new fragment makes it fail.bin/fm-doc-audience-check.sh: ok.Reported, not changed
bin/fm-lint.sh --partition 2of2reportstests/fm-daemon.test.shlines 1592 and 1598 (SC2329) and line 1617 (SC2031). The file is byte-identical to upstreammainand these lines come from upstream fix(supervision): surface overdue worker pauses kunchenguid/firstmate#8036, so this is a different kind of failure and this PR leaves it alone.