Skip to content

ci: exclude the Pi calm-mode test from every CI lane - #13

Merged
beardedgingerdesigns merged 3 commits into
mainfrom
fm/fm-ci-skip-pi-calm-test
Oct 5, 2026
Merged

beardedgingerdesigns merged 3 commits into
mainfrom
fm/fm-ci-skip-pi-calm-test

Conversation

@beardedgingerdesigns

@beardedgingerdesigns beardedgingerdesigns commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Intent

Go ahead and remove for now.

Context: that answers an offer to take the Pi calm-mode test out of this repository's CI so it stops coming up. tests/fm-calm-pi-extension.test.sh fails the CI check "Behavior portable serial 2" on this fork (seen twice on 2026-10-04 on PR #12: "grep disappeared from /export calm.html HTML while calm mode was on"), and it also fails locally on main at a different step inside the installed Pi package. Pi is not used here: calm mode runs through a Claude mod. While the test stays in CI, every pull request on this repository shows that check red and cannot merge without the check being waived by name.

What Changed

  • bin/fm-test-run.sh gains a CI_EXCLUDED_TESTS list (currently only tests/fm-calm-pi-extension.test.sh) and an is_ci_excluded helper. list_portable_serial skips listed scripts, so the Pi calm-mode test is no longer in the portable serial lane or its CI shards. The test file itself is kept.
  • The coverage guard (--check-coverage) now compares the lanes against the test inventory minus CI_EXCLUDED_TESTS, and tests/fm-test-run.test.sh counts the excluded script when checking that the lane union equals --list --all.
  • docs/fm-test-portable-shards.md, docs/calm.md, CONTRIBUTING.md, and the coverage-guard comment in .github/workflows/ci.yml now describe the exclusion and point to CI_EXCLUDED_TESTS as its owner.

Risk Assessment

✅ Low: A 13-line, CI-lane-only exclusion of one named test that leaves the file in place; listing every lane confirms the Pi test is absent from all of them and the coverage guard still passes, with no other CI job invoking it.

Testing

Drove the real test runner (bin/fm-test-run.sh), which owns CI lane membership, at base and target: listed all 13 lanes on both sides and diffed the CI unions, ran the coverage guard CI runs, confirmed the file is still selectable by path, by --all and by family, and ran the runner's own test file through the runner (40 checks ok, exit 0). In throwaway copies of the target tree, emptying the exclusion list put the test back in shard 2 with the guard passing at 244, and reverting only the guard filter made the guard fail naming the Pi test. A local run of the whole shard 2 lane was started and stopped unfinished: this Mac was 13 minutes into the first script (4 minutes on CI), so it would have run about an hour for a macOS stand-in of an Ubuntu check; its partial log was discarded. No UI surface, so no screenshots. Worktree left clean.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
CI's 'Behavior portable serial 2' lane no longer runs the Pi calm-mode test: listing portable-serial-2of9 showed the test at base and does not show it at target, and no other lane picked it up ✅ pass live lane-membership-base-vs-target.txt (base: portable-serial-2of9 contains_pi_calm_test=YES; target: every lane =no)
Adversarial: only that one test left CI. Diffing the union of all CI lanes at base vs target shows exactly one dropped script and none added, so similarly named Pi tests still run ✅ pass live lane-membership-base-vs-target.txt (base CI total 244, target 243, dropped: tests/fm-calm-pi-extension.test.sh, added: none)
CI's coverage check stays green with the test excluded: bin/fm-test-run.sh --check-coverage prints 'FM_TEST_COVERAGE ok' and exits 0 ✅ pass live coverage-guard-and-file-stays.txt (FM_TEST_COVERAGE ok total=243 serial=203 serial_shards=9, exit=0)
Adversarial: the coverage guard was not weakened. A test dropped from the lanes without being declared excluded still fails the guard by name ✅ pass live restore-path-and-guard-teeth.txt (guard filter reverted in a throwaway copy: exit=1, 'missing from union: tests/fm-calm-pi-extension.test.sh')
The test file stays and can still be run on purpose: selecting it by path, by --all, and by its family all still list it ✅ pass live coverage-guard-and-file-stays.txt (file present; --list by path exit=0; --all count 1; family=pure-contract-unit)
'Remove for now' is reversible as documented: emptying CI_EXCLUDED_TESTS puts the test back in portable-serial-2of9 and the guard passes at the old total ✅ pass live restore-path-and-guard-teeth.txt (CI_EXCLUDED_TESTS="": FM_TEST_COVERAGE ok total=244, test in portable-serial-2of9)
The runner's own test file passes with the edited lane-union check ✅ pass live fm-test-run-selftest.log (bin/fm-test-run.sh tests/fm-test-run.test.sh: 40 ok, exit=0, FM_TEST_SUMMARY total=1 failed=0)
On a pull request to this fork, the GitHub check 'Behavior portable serial 2' reports green and the PR can merge without waiving it ⏸️ untested no Needs a real GitHub Actions run on a pushed PR; pushing and CI belong to the outer executor's later phases, not this test phase. The CI phase of this run will show it. A local run of the same lane was…
Evidence: Lane membership, base vs target

Source: Lane membership, base vs target

base portable-serial-2of9 scripts=24 contains_pi_calm_test=YES target portable-serial-2of9 scripts=23 contains_pi_calm_test=no (every other lane: no) base CI total: 244 target CI total: 243 dropped from CI: tests/fm-calm-pi-extension.test.sh added to CI: (end)

## Which CI lane holds tests/fm-calm-pi-extension.test.sh — base 63fe176 vs target fa27bda
\### base
portable-parallel-1      scripts=11   contains_pi_calm_test=no
portable-parallel-2      scripts=13   contains_pi_calm_test=no
portable-serial          scripts=204  contains_pi_calm_test=YES
portable-serial-1of9     scripts=10   contains_pi_calm_test=no
portable-serial-2of9     scripts=24   contains_pi_calm_test=YES
portable-serial-3of9     scripts=24   contains_pi_calm_test=no
portable-serial-4of9     scripts=25   contains_pi_calm_test=no
portable-serial-5of9     scripts=25   contains_pi_calm_test=no
portable-serial-6of9     scripts=24   contains_pi_calm_test=no
portable-serial-7of9     scripts=24   contains_pi_calm_test=no
portable-serial-8of9     scripts=24   contains_pi_calm_test=no
portable-serial-9of9     scripts=24   contains_pi_calm_test=no
real-herdr-gated         scripts=16   contains_pi_calm_test=no
\### target
portable-parallel-1      scripts=11   contains_pi_calm_test=no
portable-parallel-2      scripts=13   contains_pi_calm_test=no
portable-serial          scripts=203  contains_pi_calm_test=no
portable-serial-1of9     scripts=10   contains_pi_calm_test=no
portable-serial-2of9     scripts=23   contains_pi_calm_test=no
portable-serial-3of9     scripts=24   contains_pi_calm_test=no
portable-serial-4of9     scripts=24   contains_pi_calm_test=no
portable-serial-5of9     scripts=24   contains_pi_calm_test=no
portable-serial-6of9     scripts=25   contains_pi_calm_test=no
portable-serial-7of9     scripts=24   contains_pi_calm_test=no
portable-serial-8of9     scripts=24   contains_pi_calm_test=no
portable-serial-9of9     scripts=25   contains_pi_calm_test=no
real-herdr-gated         scripts=16   contains_pi_calm_test=no

## Every test CI ran at base but not at target (and vice versa)
base CI total: 244   target CI total: 243
dropped from CI:
  tests/fm-calm-pi-extension.test.sh
added to CI:
  (end)
Evidence: Coverage guard passes; file still selectable

Source: Coverage guard passes; file still selectable

$ bin/fm-test-run.sh --check-coverage FM_TEST_COVERAGE ok total=243 parallel=24 ... serial=203 serial_shards=9 serial_unhinted=20 herdr=16 exit=0 $ bin/fm-test-run.sh --list tests/fm-calm-pi-extension.test.sh tests/fm-calm-pi-extension.test.sh exit=0

$ bin/fm-test-run.sh --check-coverage
FM_TEST_COVERAGE ok total=243 parallel=24 parallel_max_ms=417163 parallel_imbalance_ms=2894 parallel_unhinted=0 serial=203 serial_shards=9 serial_unhinted=20 herdr=16
exit=0

## The file stays and is still selectable on purpose
-rwxr-xr-x@ 1 justinlobaito  staff  235901 Oct  4 19:47 tests/fm-calm-pi-extension.test.sh
$ bin/fm-test-run.sh --list tests/fm-calm-pi-extension.test.sh
tests/fm-calm-pi-extension.test.sh
exit=0
$ bin/fm-test-run.sh --list --all | grep -c calm-pi-extension
1
$ bin/fm-test-run.sh --list --family <its family> | grep calm-pi-extension
family=pure-contract-unit
Evidence: Restore path and guard still failing on a real gap

Source: Restore path and guard still failing on a real gap

CI_EXCLUDED_TESTS="" -> FM_TEST_COVERAGE ok total=244, test back in portable-serial-2of9 guard filter reverted -> fm-test-run: coverage guard: union of portable shards + portable serial + Herdr must equal tests/*.test.sh missing from union: tests/fm-calm-pi-extension.test.sh exit=1

## Documented restore path: empty CI_EXCLUDED_TESTS in a throwaway copy of the target tree
661:CI_EXCLUDED_TESTS=""
$ bin/fm-test-run.sh --check-coverage
FM_TEST_COVERAGE ok total=244 parallel=24 parallel_max_ms=417163 parallel_imbalance_ms=2894 parallel_unhinted=0 serial=204 serial_shards=9 serial_unhinted=20 herdr=16
exit=0
lanes holding the Pi calm test after restore:
  portable-serial-2of9

## Guard still catches a real gap: exclude from the serial lane only (guard filter reverted)
1034:  all_repo_tests | LC_ALL=C sort -u >"$tmp/all"
$ bin/fm-test-run.sh --check-coverage
fm-test-run: coverage guard: union of portable shards + portable serial + Herdr must equal tests/*.test.sh
fm-test-run: missing from union:
tests/fm-calm-pi-extension.test.sh
exit=1
Evidence: Runner self-test log

Source: Runner self-test log

FM_TEST_END tests/fm-test-run.test.sh exit=0 duration_ms=546339 gate_skip=false FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0

FM_TEST_BEGIN 2026-10-05T00:56:03Z tests/fm-test-run.test.sh family=pure-contract-unit expected_gate_skip=none
ok - exact suite coverage: --all lists every tests/*.test.sh once
ok - family selection returns a proper subset of the suite
ok - single-script selection lists exactly that path
ok - changed-file selection stays conservative (never silent full suite)
ok - a task marker refuses execution in the primary checkout and leaves worktrees and inspection alone
ok - runner and its documentation surfaces select their curated family, not just their contract owners
ok - shell line-ending policy selects runner coverage
fm-test-run: no tests selected for changes vs HEAD (map is conservative; use --all for the complete suite)
ok - changed selection covers dependents, fails closed for live unmapped source, and accepts retired unconsumed source
ok - a bin reference selects the referencing scripts, and consumers still select their curated families
ok - changed defaults to bounded automatic scheduling with serial override
ok - Windows emulation exempts only synthetic POSIX modes
ok - a plain script list defaults to bounded automatic concurrency without an automatic timeout
ok - family proofs run concurrently only within separate family phases
ok - empty changed selection emits deterministic text and JSON summaries
ok - timing markers and JSON artifact are valid
ok - aggregate exit reflects any script failure
ok - gate-skip accounting is honest and non-failing
ok - a gate skip records why it skipped
ok - a script that actually ran records no skip reason
ok - live guards are recorded as a capability class, not a bare env opt-in
ok - fail-on-gate-skip converts herdr-not-found into a hard failure
ok - exclude-family drops the named primary family after selection
ok - proven-isolated scheduling ignores parallel hints
ok - family, all, changed, and script selections ignore parallel hints
ok - portable shard union, disjointness, and coverage guard hold
ok - portable parallel lanes are fully hinted and packed within 5% of each other
ok - portable serial shards are a deterministic disjoint cover of the serial lane
ok - coverage guard reports and bounds the unmeasured portable serial share
ok - portable serial shard lanes refuse mismatched, out-of-range, and countless names
ok - --jobs refuses non-proven / stateful selections
ok - --jobs admits and schedules a family with a recorded concurrent proof
ok - an unclassified new test stays serial while the proven residual family runs concurrently
ok - a changed shared test fixture selects its readers while an unread tests/ path still refuses
ok - a concurrent run starts the longest-hint script first
ok - --per-script-timeout-secs turns a hung script into a bounded failure
ok - the automatic --changed bound gives the slow watcher suite at least 1500s
ok - --max-wall-ms fails an over-budget run and refuses a malformed budget
ok - jobs scheduler runs proven scripts; failure propagates; non-proven refused
ok - Herdr CI family-run step times out at 20 min under a 75 min job backstop
ok - aggregate-json merges lane timing artifacts
FM_TEST_END 2026-10-05T01:05:09Z tests/fm-test-run.test.sh exit=0 duration_ms=546339 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=546633
FM_TEST_SUMMARY_FAMILY family=pure-contract-unit count=1 duration_ms=546339 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-test-run.test.sh duration_ms=546339

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 2 infos
  • ℹ️ bin/fm-test-run.sh:659 - The exclusion block is inserted between list_portable_serial's doc comment and the function, so the "portable serial remainder: every tests/.test.sh that is neither proven-isolated nor real-herdr-gated" comment now sits on top of CI_EXCLUDED_TESTS and is no longer true as written. The same claim is repeated and now overstated in docs/fm-test-portable-shards.md:45 and :97 ("cover every tests/.test.sh script"), the guard's failure message at bin/fm-test-run.sh:1126, and the ci.yml comment at .github/workflows/ci.yml:76-78. Move the CI_EXCLUDED_TESTS block above the lane comment and add "except CI_EXCLUDED_TESTS" to those statements so the next reader of a green coverage guard knows one test is deliberately outside it.
  • ℹ️ bin/fm-test-run.sh:661 - The exclusion covers CI lanes only, which is what the intent asks for. Local selections are untouched: bin/fm-test-run.sh --list --changed --base 63fe176 on this very diff selects 45 tests including tests/fm-calm-pi-extension.test.sh (the runner-file map and the .pi/extensions and .claude/mods/firstmate-calm arms at lines 1516/1531/1544 name it), and --all still lists it. The intent says this test also fails locally, so any local --changed run after touching bin/fm-test-run.sh or the calm mod will still go red on it, including this run's own test step if it uses --changed. Not a defect in the change; extending the exclusion to local selections would be a scope decision beyond the stated intent.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
CI's 'Behavior portable serial 2' lane no longer runs the Pi calm-mode test: listing portable-serial-2of9 showed the test at base and does not show it at target, and no other lane picked it up ✅ pass live lane-membership-base-vs-target.txt (base: portable-serial-2of9 contains_pi_calm_test=YES; target: every lane =no)
Adversarial: only that one test left CI. Diffing the union of all CI lanes at base vs target shows exactly one dropped script and none added, so similarly named Pi tests still run ✅ pass live lane-membership-base-vs-target.txt (base CI total 244, target 243, dropped: tests/fm-calm-pi-extension.test.sh, added: none)
CI's coverage check stays green with the test excluded: bin/fm-test-run.sh --check-coverage prints 'FM_TEST_COVERAGE ok' and exits 0 ✅ pass live coverage-guard-and-file-stays.txt (FM_TEST_COVERAGE ok total=243 serial=203 serial_shards=9, exit=0)
Adversarial: the coverage guard was not weakened. A test dropped from the lanes without being declared excluded still fails the guard by name ✅ pass live restore-path-and-guard-teeth.txt (guard filter reverted in a throwaway copy: exit=1, 'missing from union: tests/fm-calm-pi-extension.test.sh')
The test file stays and can still be run on purpose: selecting it by path, by --all, and by its family all still list it ✅ pass live coverage-guard-and-file-stays.txt (file present; --list by path exit=0; --all count 1; family=pure-contract-unit)
'Remove for now' is reversible as documented: emptying CI_EXCLUDED_TESTS puts the test back in portable-serial-2of9 and the guard passes at the old total ✅ pass live restore-path-and-guard-teeth.txt (CI_EXCLUDED_TESTS="": FM_TEST_COVERAGE ok total=244, test in portable-serial-2of9)
The runner's own test file passes with the edited lane-union check ✅ pass live fm-test-run-selftest.log (bin/fm-test-run.sh tests/fm-test-run.test.sh: 40 ok, exit=0, FM_TEST_SUMMARY total=1 failed=0)
On a pull request to this fork, the GitHub check 'Behavior portable serial 2' reports green and the PR can merge without waiving it ⏸️ untested no Needs a real GitHub Actions run on a pushed PR; pushing and CI belong to the outer executor's later phases, not this test phase. The CI phase of this run will show it. A local run of the same lane was…
  • bin/fm-test-run.sh --list --lane &lt;lane&gt; for portable-parallel-1/2, portable-serial, portable-serial-1of9..9of9 and --list --family real-herdr-gated, at base 63fe176 (git archive copy in /tmp) and target fa27bda, then comm on the two CI unions
  • bin/fm-test-run.sh --check-coverage at target (exit 0, total=243)
  • bin/fm-test-run.sh --list tests/fm-calm-pi-extension.test.sh, --list --all, and --list --family pure-contract-unit to confirm the file stays selectable
  • bin/fm-test-run.sh tests/fm-test-run.test.sh (exit 0, 40 ok, includes the edited lane-union and coverage-guard check)
  • Throwaway copy of target with CI_EXCLUDED_TESTS=&#34;&#34;: --check-coverage exit 0 total=244, test back in portable-serial-2of9
  • Throwaway copy of target with the guard's exclusion filter reverted: --check-coverage exit 1, 'missing from union: tests/fm-calm-pi-extension.test.sh'
  • bin/fm-test-run.sh --lane portable-serial-2of9 --fail-on-gate-skip &#39;Pi extension typecheck prerequisite not found&#39; started, stopped unfinished after 13 minutes (not counted as evidence)
⚠️ **Document** - 1 info
  • ℹ️ docs/calm-mode-feasibility.md:19 - The runner comment added by this change says tests/fm-calm-pi-extension.test.sh fails against the current Pi release, and the test is now out of CI. docs/calm-mode-feasibility.md (maintainer-verification) and docs/calm.md still present Pi Calm as verified by that test. I left those evidence records alone: correcting them needs a Pi re-verification, which is outside this change. docs/calm.md now carries a one-line pointer saying CI does not run the test. Follow-up when the exclusion is lifted or made permanent: re-run the test and refresh or retire the Pi evidence.
✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…his PR; I ported upstream's two-line fix, but could not reproduce the race locally, so CI on the next push is the real proof. **What failed:** `tests/fm-remote-secondmate-trace-context.test.sh` and `tests/fm-spawn-compact-adviser-disable-remote.test.sh`, both with `fatal: failed to copy file to '.../.fm-home-provisioning.*/.git/objects/xx/<hash>': No such file or directory` -> `could not clone the remote Firstmate home`. **Not caused by this PR:** the same error failed main CI runs 37075553724 (serial 8), 37075456337, 37074879408 and 37072486298 (serial 7) on 2026-10-02. This PR's exclusion only reshuffled shards so both affected tests now sit in shard 8. **Fix:** `bin/fm-remote-home-provision.sh` now uses `git clone --no-local` for the remote home clone and the project clone, plus upstream's explanatory comment. This is the fix from upstream kunchenguid/firstmate commit e2668de (kunchenguid#6162); the file is now byte-identical to upstream's (`diff` printed `IDENTICAL to upstream`). The cause given in the comment (Git 2.55 on the CI image copying loose objects before the destination directory exists) is upstream's diagnosis, not something I confirmed. **Verification (local, macOS git 2.39.5, with the fix):** - `fm-remote-secondmate-trace-context`: exit=0, 6 ok, 0 not ok - `fm-spawn-compact-adviser-disable-remote`: exit=0, 2 ok, 0 not ok - `fm-remote-secondmate-parent-binding`: exit=0, 6 ok, 0 not ok - `fm-secondmate-sync`: exit=0, 32 ok, 0 not ok - `bash -n` passes; shellcheck reports only SC2034/SC1091 on lines 30, 145 and 147, which this change does not touch. **Not reproduced:** in an `alpine:edge` container with git 2.56.0, 40 local clones and 40 `--no-local` clones of the test fixture all succeeded, so the failure appears specific to the CI image's git 2.55.0. **Other notes:** - That same upstream commit is titled as also restoring Pi rendering in CI, so a future upstream sync may make the Pi test exclusion unnecessary. - Nothing is committed; the change is left in the worktree. - The verification pulled the `alpine:edge` Docker image onto this machine
@beardedgingerdesigns
beardedgingerdesigns merged commit 76b378f into main Oct 5, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant