Repository navigation
fix(test): split fm-supervision-host so serial shards fit the job cap - #7706
Open
kunchenguid wants to merge 8 commits into
Open
kunchenguid wants to merge 8 commits into
kunchenguid wants to merge 8 commits into
Conversation
Move the 82-case suite into hook-driven and host-engine scripts that share fixtures, so the portable serial packer no longer places a ~20-minute case alone in one shard. Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
When session.stop exists, reap fake-claude pids with a deadline, then TERM, then KILL, so a stuck Stop-hook child cannot hang the suite forever. Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
Move drain/report and attended close routing into the hook suite so each half's CI-scaled hint stays near ten minutes, then record the measured 605208 ms and 587710 ms packing weights. Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
Split the 82 host cases by per-test CI seconds rather than local walls, bound wait_pid_bounded to this shell's children, and stop exporting helper names that shellcheck flagged. Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
Require a jobs -p match to also have ppid equal to this shell, and restore the shared fm-supervision-host temp-root prefix. Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
This was referenced Oct 24, 2026
Owner
Author
|
Speaking as Kun's firstmate: I've filed this PR's follow-ups as separate issues. They're not part of this change.
|
This was referenced Oct 24, 2026
This was referenced Oct 24, 2026
Port #7731's acknowledged hand-back tests into the split host suites, keep the combined host test file deleted, and add estimated CI cost of the four new tests to the serial duration hints. Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
Port #7265's engine time-zone grant test into the split host suites and keep the combined host test file deleted. Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
Replace the host-a/b share-of-sample hints with timing-artifact duration_ms, cap watch-triage at the packing budget so it occupies its own shard, refresh previously unhinted and understated companions from the same CI artifacts, and restore the four #7731 registrations to main's relative order. Co-authored-by: Kun Chen <kunchenguid@users.noreply.github.com>
This was referenced Oct 26, 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.
Speaking as Kun's firstmate: this keeps
Behavior portable serial 1inside its 30-minute job cap.Why serial 1 times out. Since #7625 (
314ed460) raised the hint fortests/fm-supervision-host.test.shto 1,192,918 ms, the portable serial packer has put that 82-test script alone in serial 1. Its real runtime on GitHub runners is 955–1,792 s, while the job leaves about 1,775 s for the test step. On main since314ed460, serial 1 has passed 8 of 31 runs. Shard contents were the same in passing and failing runs, so this is runner speed against a single oversized script, not a regression from one commit. The latest main run after #7699 (98f3bd84, run 40046360276) was green except for this job, which was cancelled at the cap.Changes
tests/fm-supervision-host.test.shis split intotests/fm-supervision-host-a.test.shandtests/fm-supervision-host-b.test.sh, 41 tests each.tests/fm-supervision-host-helpers.shholds the shared setup, moved unchanged apart from lint-suppression comments. Itsstop_home_processesnow useswait_pid_boundedinstead of a barewait "$pid".$$and it's injobs -p), it waits up to about 5 s, then sends TERM, then KILL, then reaps.waitand is never signalled.86437e28stalled about 1,594 s intest_claude_stop_hook_runs_the_host_without_the_file_and_off_opts_out.bin/fm-test-run.sh: the family map, Pi__script__list and hint table now name the two scripts. The hints are 596734 and 596184, scaled from the CI split so they sum to the old 1,192,918.tests/lib.sh,docs/supervision-host.md,docs/verification/supervision.mdanddocs/fm-test-portable-shards.mdare updated for the new names and the hint method..github/workflows/change. No timeout or budget change.Contract class: restore. CI goes back to its documented promise that each portable serial shard fits the normal-tier job cap. No product code changes; the only runner change is the hint, map and list entries.
Packing after the change:
--check-coverageis ok withserial_max_ms=1182738against a budget of 1200000. Nothing runs alone at about 1.19M any more. Suite a lands in shard 2 and suite b in shard 3, each alongside other scripts.Verification (cloud agent VM):
tests/fm-test-run.test.sh: 41/41.test_claude_stop_hook_notifies_when_at_turn_downtime_write_fails, which also fails the same way on that VM against main's original file. On GitHub runners it passes in about 6–7 s.Three adversarial review passes ran before this PR. The last came back low risk with no errors.
Follow-ups, not in this PR:
e7a99d59,f0fb8aac).Speaking as Kun's firstmate: this keeps
Behavior portable serial 1inside its 30-minute job cap.Why serial 1 times out. Since #7625 (
314ed460) raised the hint fortests/fm-supervision-host.test.shto 1,192,918 ms, the portable serial packer has put that 82-test script alone in serial 1. Its real runtime on GitHub runners is 955–1,792 s, while the job leaves about 1,775 s for the test step. On main since314ed460, serial 1 has passed 8 of 31 runs. Shard contents were the same in passing and failing runs, so this is runner speed against a single oversized script, not a regression from one commit.Changes
tests/fm-supervision-host.test.shis split intotests/fm-supervision-host-a.test.sh(43 tests) andtests/fm-supervision-host-b.test.sh(44 tests).test_lost_boundary_handoffandtest_handoff_retry_respects_the_receiving_panefollowtest_returned_driver_is_caught_awayin-a;test_lost_pass_through_handoffandtest_acknowledged_handoff_at_the_turn_keeps_the_pass_through_rowfollowtest_returned_driver_is_caught_attendedin-b.tests/fm-supervision-host-helpers.shholds the shared setup. Itsstop_home_processesuseswait_pid_boundedinstead of a barewait "$pid".$$and it's injobs -p), it waits up to about 5 s, then sends TERM, then KILL, then reaps.waitand is never signalled.bin/fm-test-run.shpacking hints are measured Ubuntuduration_ms, not shares of the old combined sample:tests/fm-supervision-host-a.test.sh674686 ms from run 40163854622 portable serial 2 (head 92f958d).tests/fm-supervision-host-b.test.sh481145 ms from run 40204257639 portable serial 3 (head 7f9195e).tests/fm-watch-triage.test.shis capped at 1200000 ms (measured 1610210 ms on run 40163854622 serial 1) so longest-processing-time assignment isolates it on serial 1..github/workflows/change. No timeout or budget change.Main merge (#7731, then #7265). Head is
80895c297f291fc6e6653fb275afe99428f8d205. The combined host test file stays deleted.Packing.
--check-coverageis ok withserial_max_ms=1200000against a budget of 1200000,serial_unhinted=0. Suite-alands in serial 2; suite-blands in serial 4. Serial 1 is watch-triage alone. Watch-triage's measured 1610 s plus about 30 s of job overhead is the projected wall for that shard (~1640 s under the 1800 s cap). The other serial shards project to about 1027–1426 s including setup.Contract class: restore. CI goes back to its documented promise that each portable serial shard fits the normal-tier job cap. No product code changes from this PR beyond the split, bounded wait, and packing-hint updates.
Verification (cloud agent VM, after the measured-hint re-pack):
FM_TEST_COVERAGE ok total=286 parallel=26 parallel_max_ms=814249 serial=244 serial_shards=9 serial_unhinted=0 serial_max_ms=1200000 serial_budget_ms=1200000 herdr=16.bin/fm-lint.sh, changed-file mode, ShellCheck 0.11.0, actionlint 1.7.12): pass..claude/skillssymlink, untracked fleet paths) andbin/fm-doc-audience-check.sh: pass.test_tagged_lock_holder_reaches_the_engine_whole(this session does not own supervision). The previously flaky write-fail case passed this run.Follow-ups, not in this PR:
e7a99d59,f0fb8aac).