Repository navigation
test: fix main's red portable serial 2 and serial 9 - #50
Merged
Merged
Conversation
Pi 1.0.1's createToolHtmlRenderer reads getToolRenderers and ignores getToolDefinition. Calm /export still includes stock grep HTML; the fixture has to pass the lookup key the installed Pi actually reads.
….0.1 Pi 1.0.1's createToolHtmlRenderer reads getToolRenderers and ignores getToolDefinition. Given only the old key, it throws inside its own try/catch and returns undefined for every tool, so the check that fm_branch_outcomes' Calm export rendering falls back to Pi's structured output passed without ever reaching either definition. Supply both lookup keys, as the Calm export fixture now does, and fail when a renderer never consults its definition, so a future rename cannot make the check vacuous again.
Every case's homes were stopped only by the suite's EXIT trap, so each finished case left its fake session, parked host, arm, and FM_POLL=1 watcher running beside every later case. On the fork's 2-vCPU runner that load grew with the case count: per-case durations stretched from about 1.2x the fast-run time early in the script to 3-9x by its last cases, and the script's total ranged from 506 s to over the 1500 s per-script bound, failing portable serial 2 on main (job 111246613826) and in run 37087431811. pass now stops the homes registered since the previous case and forgets them, so the EXIT trap only stops the homes of a case that failed. A local run held at most two fixture processes alive (against 24 before) and finished in 502 s (against about 627 s), with all 73 cases passing.
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.
Main's CI at d472b71 fails Behavior portable serial 2 and serial 9 for two unrelated reasons, neither caused by #48.
This PR fixes both at their cause without skipping, weakening, or rebounding any test.
Serial 9 - Pi 1.0.1 renamed the export renderer lookup (version drift)
CI installs
@earendil-works/pi-coding-agentunpinned.The last green main run installed Pi 1.0.0; the red runs installed 1.0.1, and upstream CI now installs 1.0.2.
Pi 1.0.1's
createToolHtmlRendererreadsgetToolRenderersand ignoresgetToolDefinition, so the Calm fixture that passed only the old key rendered every tool as missing:grep disappeared from /export calm.html HTML while calm mode was on.Real Calm
/exportis unaffected: Pi's session export resolves renderers throughresolveToolRenderers(name, () => getToolDefinition(name)), and Calm registers no renderer resolver, so export still renders the registered definition.Only the fixtures were stale.
tests/fm-pi-branch-extension.test.shasserts thatfm_branch_outcomesexport rendering falls back to Pi's structured output, and on Pi 1.0.1 an old-key-only renderer returns that fallback for every tool without reading the definition.It now supplies both keys and fails when a renderer never consults its definition.
Serial 2 - leaked per-case processes in the supervision-host test
tests/fm-supervision-host.test.shis the only script in serial 2.Its homes were stopped only by the EXIT trap, so each finished case left its fake session, parked host, arm, and
FM_POLL=1watcher running beside every later case.On the fork's 2-vCPU runner that load grows with the case count: comparing a 501 s run with a 1499 s run case by case, the early drain cases are about 1.1-1.4x slower while the late host cases are 3-9x slower.
Across 26 recent fork runs its duration ranged from 506 s to over the 1500 s per-script bound, which it crossed on main (job 111246613826) and in run 37087431811, and passed at 1488 s once.
passnow stops the homes registered since the previous case and forgets them, so the EXIT trap only stops a failed case's homes.Verification
npm install -g --prefix) underFM_PI_PACKAGE_DIR, on macOS:tests/fm-calm-pi-extension.test.shreproduced CI's renderer failure on 1.0.1 before the cherry-pick and passes that case after it on 1.0.1 and 1.0.2.tests/fm-pi-branch-extension.test.shpasses on 1.0.0, 1.0.1, and 1.0.2 (52 ok), and fails with the new guard when the fixture is reverted to the old key only on 1.0.1.tests/fm-supervision-host.test.shlocally, sampling live fixture processes every 5 s: before, 73/73 ok in about 627 s with up to 24 fixture processes alive; after, 73/73 ok in 502 s with at most 2 alive and none left after exit.bin/fm-lint.shon the three changed test files with ShellCheck 0.11.0 is clean.Known local gap: one later live tmux case in
tests/fm-calm-pi-extension.test.sh(/export did not complete while calm mode was on) fails on this macOS host with every Pi version, including 1.0.0, so it is environmental here; it passed on Linux CI on Pi 1.0.0 (fork) and 1.0.2 (upstream run 37176050503). This PR's CI is the check for it on the fork runner.