Skip to content

ci: add a tenth portable serial shard and split the supervision host suite - #7587

Closed
kesslerio wants to merge 1 commit into
kunchenguid:mainfrom
kesslerio:ci/portable-serial-shard-10
Closed

kesslerio wants to merge 1 commit into
kunchenguid:mainfrom
kesslerio:ci/portable-serial-shard-10

Conversation

@kesslerio

@kesslerio kesslerio commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

CI-only. The portable serial remainder splits into ten separate-runner shards instead of nine, and the oversized supervision host suite becomes two serial entry points that share their fixtures and case definitions.

  • Add the tenth serial shard to the CI matrix in .github/workflows/ci.yml and to bin/fm-test-run.sh's configured shard count, so a lane whose ofN disagrees with the runner's own count is refused rather than silently dropping tests.
  • Split tests/fm-supervision-host.test.sh into tests/fm-supervision-host.test.sh and tests/fm-supervision-host-recovery.test.sh, sharing fixtures and case definitions in tests/supervision-host-helpers.sh. Both entry points stay serial and together execute the original cases once.
  • Refresh the portable serial duration hints from the completed shards of run 38991109830 and the cancelled shard's finished FM_TEST_END markers. Unfinished scripts keep their previous hints; cancellation time is not a successful sample.
  • Document the split in docs/fm-test-portable-shards.md and docs/supervision-host.md.

This branch touches no runtime behavior: the workflow, the test harness, and the two documents that describe them are the whole diff.

Refs #7255

Why it is split out

The tenth shard and the host-suite split arrived on the Sol session ceiling branch (#7433), where they do not belong: a workflow-file change cannot ride along with a capacity guard, and it widens that PR's blast past its subject. The maintainer asked for it to move to its own PR, and it does.

#7255 is the known repo-wide issue behind the 30-minute Behavior portable serial 2 ceiling that has been red on several PRs. The largest modeled shard after this split is 18m15s against that 30-minute job ceiling.

Risk Assessment

⚠️ Low: workflow and test-harness only, with no runtime behavior change. The risk is CI wall-clock, not correctness — if the modeled shard estimate proves wrong in hosted CI, the shard boundaries move, not the product.

Testing

  • bin/fm-test-run.sh --list-lanes reports portable-serial-1of10 through portable-serial-10of10.
  • tests/fm-test-run.test.sh output is byte-identical to the same suite run on the unchanged base: the suite's final comm: file 2 is not in sorted order failure reproduces on origin/main in this environment and is not caused by this branch.
  • bin/fm-lint.sh passes on this branch (shellcheck 0.11.0, actionlint 1.7.12), and bin/fm-doc-audience-check.sh reports ok.
  • The host suite's own two entry points were not run end to end here: they need a real node and perl runtime and a private tmux session this environment does not provide. That coverage runs in hosted CI.

Hosted CI on this head: Behavior portable serial 4 and Behavior portable serial 5 failed, and the no-mistakes pipeline recorded them as an approved CI exception rather than a pass.
Both failures are in tests this branch does not touch: a timing-sensitive watcher bound in tests/fm-remote-secondmate-lifecycle-e2e.test.sh and a leftover temporary directory in tests/fm-public-followup.test.sh.
main's own recent runs failed the same way, so the repository's CI is flaky at present; the same suite was green on this branch's earlier head, and the failures need a re-run that this account cannot trigger on the upstream repository (it has no admin rights there).

Out of scope

  • The repository ruleset names Behavior portable serial 1 through 9 as required checks. The tenth shard needs Behavior portable serial 10 added to the ruleset, which is a repository setting rather than a code change.

Pipeline

Updates from git push no-mistakes

⏭️ **intent** - skipped

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 2 warnings
  • ⚠️ The portable-shard change could not be demonstrated safely: bin/fm-test-run.sh --check-coverage exits nonzero with comm: file 2 is not in sorted order, and the focused CI workflow test cannot run because Ruby is unavailable. The workflow changes the shard matrix, so the runner's coverage check needs to succeed and the workflow test needs a Ruby-capable environment before the intent is demonstrated.
  • ⚠️ live validation verdict: inconclusive (0 of 2 scenarios were driven live against the product); untested: CI serial-shard matrix matches runner configuration and coverage remains valid, CI workflow consumer accepts the updated shard matrix
  • Live validation: ⚠️ inconclusive - 0 of 2 scenarios driven live against the product
Scenario Result Live Evidence
CI serial-shard matrix matches runner configuration and coverage remains valid ⏸️ untested no The prior payload records a failed coverage-check command, but live is false and it does not establish a live result. The command was bin/fm-test-run.sh --check-coverage; a live validation result wa…
CI workflow consumer accepts the updated shard matrix ⏸️ untested no The focused test was attempted, but the prior payload says Ruby is unavailable to parse .github/workflows/ci.yml. Provide a Ruby-capable test environment and rerun the test.
  • bin/fm-test-run.sh --help
  • bin/fm-test-run.sh --check-coverage
  • bin/fm-test-run.sh tests/fm-ci-workflow.test.sh
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Thanks for splitting this out of #7433, @kesslerio. I reviewed the whole diff at 6b05fc84:

  • .github/workflows/ci.yml only changes the matrix from shard: [1..9] to [1..10]. Nothing else in the workflow moves: no new steps, no secrets, no network.
  • In bin/fm-test-run.sh, PORTABLE_SERIAL_SHARDS goes 9→10, the duration hints are refreshed, and the new recovery entry point is registered.
  • tests/supervision-host-helpers.sh is a move of the old suite's fixtures and cases. The 16 test calls removed from fm-supervision-host.test.sh appear exactly once in fm-supervision-host-recovery.test.sh.
  • There's no runtime product change, so an unconfigured firstmate run behaves exactly as on main. I'm classing this as restore: it targets the existing required CI path that the 30-minute serial-2 ceiling (fix(pi): keep the Pi watcher armed after a successor or arm child dies #7255) keeps breaking.

This is waiting on you for one thing. "PR must be raised via no-mistakes" is red (run 39505993924: "This PR was not raised through no-mistakes"), and the body has no ## Pipeline section. Please raise this head with git push no-mistakes. CI run 39505993865 was still in progress when I looked.

Two notes so nothing surprises you later:

  • This diff touches .github/workflows/ci.yml, so Kun has to do the final merge by hand. My merge token can't land workflow changes. Once it's green and attested, I'll hand it to him.
  • As you noted, Behavior portable serial 10 also has to be added to the repo's required checks. That's Kun's repo-settings call, not something you need to do.

The portable serial remainder splits into ten separate-runner shards
instead of nine, and the oversized supervision host suite becomes two
entry points that share their fixtures and case definitions.

- Add the tenth serial shard to the CI matrix and to
  bin/fm-test-run.sh's configured shard count, so the runner refuses a
  lane whose "ofN" disagrees with it.
- Split tests/fm-supervision-host.test.sh into
  tests/fm-supervision-host.test.sh and
  tests/fm-supervision-host-recovery.test.sh, sharing fixtures and case
  definitions in tests/supervision-host-helpers.sh. Both entry points
  stay serial and together execute the original cases once.
- Refresh the portable serial duration hints from the completed shards
  of run 38991109830 and the cancelled shard's finished markers.
  Unfinished scripts keep their previous hints; cancellation time is not
  a successful sample.
- Document the split in docs/fm-test-portable-shards.md and
  docs/supervision-host.md.

This is CI-only: it changes the workflow, the test harness, and the two
docs that describe them, and touches no runtime behavior.

Refs kunchenguid#7255
@kesslerio
kesslerio force-pushed the ci/portable-serial-shard-10 branch from 6b05fc8 to 996819e Compare October 20, 2026 23:27
@kesslerio kesslerio changed the title ci: add a tenth portable serial shard and split the supervision host suite ci: expand portable serial test sharding Oct 20, 2026
@kesslerio kesslerio changed the title ci: expand portable serial test sharding ci: add a tenth portable serial shard and split the supervision host suite Oct 21, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Thank you @kesslerio. The re-raise landed. "PR must be raised via no-mistakes" passes, and the body's attestation binds 996819ee.

What I checked on the new head: I re-read the full diff. .github/workflows/ci.yml still only changes the matrix ([1..9] → [1..10]). bin/fm-test-run.sh sets PORTABLE_SERIAL_SHARDS=10, refreshes the weight hints, and adds family entries for fm-supervision-host-recovery.test.sh and fm-sol-cap.test.sh. The supervision-host split is a move into tests/supervision-host-helpers.sh plus the new 16-case recovery entry point. There's no runtime change, no new steps, no secrets and no network, so I have no security concerns. The contract-class stays restore (CI infra only, and an unconfigured run is identical to main).

Where it stands: 18 of 20 checks are green. The two reds don't trace to this diff:

  • serial 4: fm-remote-secondmate-lifecycle-e2e "watcher did not exit on its auto-relaunch wake", a known flake seen on other PRs.
  • serial 5: tests/fm-public-followup.test.sh, which this PR doesn't touch.

I re-ran the failed jobs once (run 39515163533). So this is waiting on CI, not on you.

Once CI is green, this goes to Kun. Because it touches .github/workflows/ci.yml, Kun has to do the merge himself, and the required-check ruleset will need Behavior portable serial 10 added. Nothing more is needed from you unless the rerun turns up something real.

@kesslerio

Copy link
Copy Markdown
Contributor Author

@kunchenguid — this is a CI-only change and it is down to one red job. Two asks, one of which only you can make.

CI on head 996819ee, run 39515163533: 19 of 20 pass. Behavior portable serial 2 now passes in 15m53s — it was the shard that carried tests/fm-supervision-host.test.sh alone, and splitting that suite into two serial entry points over shared helpers is what brought it under the job's 30-minute ceiling. That shard was cancelled at the same ceiling on 5 of the last 12 origin/main runs.

Ask 1 — re-run one job. Behavior portable serial 4 failed on tests/fm-remote-secondmate-lifecycle-e2e.test.sh ("the watcher did not exit on its auto-relaunch wake within the bound"; the watcher produced no output). That file is not in this branch's diff — the branch touches exactly seven files: .github/workflows/ci.yml, bin/fm-test-run.sh, docs/fm-test-portable-shards.md, docs/supervision-host.md, and the three supervision-host test files. The same assertion is red on origin/main's own recent runs, and on other branches of mine today. It needs a re-run, and this account has no admin rights on kunchenguid/firstmate, so I cannot trigger one (POST /actions/runs/.../rerun-failed-jobs returns 403).

Ask 2 — the required-check list needs the tenth shard. The repository's required checks name Behavior portable serial 1 through 9. This branch adds Behavior portable serial 10, which runs and passes (18m44s), but a check that is not in the required list is not enforced on merge — so the tenth shard's result would be optional and a green portable-serial lane would not actually be gated. That is a repository setting rather than a code change, so I have not made it. Please add Behavior portable serial 10 to the required checks before merging this.

Why this one is worth merging first. The 30-minute Behavior portable serial 2 ceiling is currently the red job on #7433, #6132, #6238, #7079 and #7212 — five PRs, all blocked on a shard that carries a suite hinted at 734 024 ms that really runs 19–28 minutes. Merging this retires that single cause across all of them, and it is CI-only with no runtime behaviour change.

friesentius added a commit to friesentius/firstmate that referenced this pull request Oct 21, 2026
…suite

Portable serial shard 2 hit its 30-minute cap while
tests/fm-supervision-host.test.sh was still passing cases. Following
upstream kunchenguid#7587, the suite's fixtures and case
definitions move into tests/supervision-host-helpers.sh, and two serial
entry points (fm-supervision-host.test.sh and the new
fm-supervision-host-recovery.test.sh) together run all 75 original cases
exactly once. The portable serial lane grows from nine to ten shards, and
the new entry point joins the afk family and the Pi-extension changed-path
selection beside the original. Only the two host hints change (900000 ms
and 850000 ms from kunchenguid#7587); the rest of the hint table is left as it was.
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @kesslerio for the clear write-up, and for the serial 2 timing (15m53s after the split).

Where it stands at main 29c3e867: head 996819ee now conflicts with main (mergeable: CONFLICTING). bin/fm-test-run.sh and the shard docs have moved since 2026-10-21. The serial 4 failure on run 39515163533 was the known fm-remote-secondmate-lifecycle-e2e watcher flake. It was already re-run once and failed again, and a third re-run on a conflicting merge ref wouldn't tell us anything new.

Waiting on you: please rebase onto current main and re-raise through git push no-mistakes. That gives us a fresh attestation and a CI run on the rebased head.

One overlap to know about, stated neutrally: open PR #7706 attacks the same 30-minute serial-shard ceiling another way. It splits tests/fm-supervision-host.test.sh into fm-supervision-host-a/-b over a shared helpers file, with CI-derived duration hints, and keeps nine shards. This PR adds a tenth shard and a -recovery split. The two will conflict in bin/fm-test-run.sh and the supervision-host test files. Whichever lands first, the other will need a rebase or a rethink. Choosing between them is Kun's call, not something triage decides.

Contract-class: restore (unchanged: CI/test harness only, and an unconfigured run is identical to main). VISION.md: one captain aligns · authority n/a · scripts aligns · restart n/a · spine aligns (keeps the required suite runnable) · vendor n/a · scope aligns. As noted before, the diff touches .github/workflows/ci.yml, and adding Behavior portable serial 10 to the required checks is a repository setting. Both are Kun's to do by hand if this goes ahead.

@kesslerio

Copy link
Copy Markdown
Contributor Author

Closing as obsolete rather than rebasing.

Main already carries PORTABLE_SERIAL_SHARDS=10 in bin/fm-test-run.sh, so the tenth portable serial shard this PR was split out to add is already there — CI on current branches runs Behavior portable serial 10 today.

The single unique commit here (996819ee) also rewrites .github/workflows/ci.yml against an older shape of that file: it removes the types: [opened, synchronize, reopened, labeled] trigger and the supersession grouping that main has since gained, so rebasing it would regress main rather than advance it.

The Sol ceiling work this was split out of is carried separately by #7433. Nothing here needs to be preserved.

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.

2 participants