test: keep composer fixtures Bash 3.2-clean and align relaunch startup waits - #3556
test: keep composer fixtures Bash 3.2-clean and align relaunch startup waits#3556kuan0808 wants to merge 4 commits into
Conversation
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (3): Last reviewed commit: "no-mistakes(document): Correct stale sto..." | Re-trigger Greptile |
376aa38 to
5db05f1
Compare
|
Speaking as Kun's firstmate: HEAD Attestation: MISSING — no head-bound no-mistakes Diff vs body: the body describes a Security (ci.yml, first-class): the workflow delta only extends the existing Contract-class: restore — VISION (per rule, evidence = test + ci.yml diffs vs main
This is waiting on you (the author), not a captain decision. Please workflow-approvals this pass: 33687534470, 33687534441, 33687568150 |
tests/fm-composer-lib.test.sh fails on stock macOS /bin/bash 3.2 with "a half-block rule row must count as a structural edge". The classifier is fine: bin/fm-composer-lib.sh already treats the upper and lower half-block rows as edges. The fixture wrote those glyphs as \u escapes inside printf and $'...', and Bash 3.2 has no \u escape (added in 4.2), so the classifier received the literal escape text and no edge matched. Linux CI runs Bash 5, which is why this merged green in kunchenguid#2238. - Write the half-block fixture with literal UTF-8 glyphs, matching every other fixture in the file, and say why in a comment. - Run tests/fm-composer-lib.test.sh in the existing macos-stock-bash CI job under real /bin/bash 3.2, so a Bash 4+-only fixture cannot land again. No classifier behavior changes.
Four relaunch cases waited at most 2s (200 x 10ms) for a fixture to signal that a background control run had reached its rendezvous point. Under suite load on a laptop that is not enough, and the case then failed on timing rather than on the behavior it pins. The rest of this file already budgets 10s for the same kind of wait; use it here too.
…m in isolation proof
5db05f1 to
c0bdf43
Compare
Intent
Keep the shared test fixtures runnable on stock macOS Bash 3.2, and give the relaunch startup waits the same 10s budget the rest of that file already uses.
What Changed
matrix_herdr_halfblock_rule_bounds_bare_wrapfixture intests/fm-composer-lib.test.shto use literal UTF-8 half-block, arrow, and middot glyphs instead of\uescapes that stock macOS Bash 3.2 cannot decode, and pointed the non-vacuousness footer check at the styled screen actually handed tofm_composer_classify_screen.tests/fm-control-relaunch.test.shfrom 200 to 1000 iterations ofsleep 0.01, matching the 10s budget the rest of that file already uses./bin/bashstep to.github/workflows/ci.ymlthat runs the composer classifier suite and fails unless all 33ok -lines appear, and recorded the resolved Bash 3.2 failure indocs/fm-test-isolation-proof.md.Risk Assessment
✅ Low: Test-and-CI-only change that is well-bounded and matches its intent: the composer fixture now carries literal UTF-8 (verified by hexdump, no
\uleft outside a comment, and no bash-4-only constructs in tests/fm-composer-lib.test.sh, tests/lib.sh, or bin/fm-composer-lib.sh, whose${!name}indirections are 3.2-safe), the new macos-latest lane executes the real suite under stock /bin/bash 3.2 with a count pin matching the 33 defined-and-invoked tests, the non-vacuity guard now inspects the$screenfixture that is actually classified and is backed by the two explicitfm_composer_row_has_edgeassertions so the case cannot silently retire,printf '%b'removal is byte-for-byte neutral on a fixture with no backslashes, and the relaunch waits move from 200x0.01s to 1000x0.01s = the same nominal 10s the file's existing 100x0.1s waits already use.Testing
Ran the composer classifier suite and the fm-control relaunch suite under this machine's stock /bin/bash 3.2.57: the branch fixture passes all 33 composer cases while the base-commit fixture fails on 3.2 with
not ok - a half-block rule row must count as a structural edge, so the Bash 3.2 defect is reproduced before the fix and gone after it; the relaunch suite passes end to end, and a slow-start simulation (trace delivery marker arriving 8s late) shows the old 200-iteration wait aborting withrelaunch did not reach trace deliverywhile the new 1000-iteration/10s wait completes, which is the file's existing 10s convention. The new CI lane was exercised by extracting the composer block from themacos-stock-bashjob in ci.yml and running it for real: it passes on this branch and correctly errors when the suite drifts to 32 tests. No failures, flakes or setup problems; temp copies used for the before/after runs were deleted and the worktree is clean.Evidence: Composer fixture on stock Bash 3.2: fails before the fix, passes after
Source: Composer fixture on stock Bash 3.2: fails before the fix, passes after
$ /bin/bash --version | head -1 GNU bash, version 3.2.57(1)-release (arm64-apple-darwin25) $ /bin/bash tests/fm-composer-lib.test.sh # BEFORE fix (base fixture, stock macOS Bash 3.2) not ok - a half-block rule row must count as a structural edge exit=1 # AFTER (this branch, same interpreter): 33 ok lines, exit 0Evidence: Full composer classifier run under stock Bash 3.2 (33 ok, exit 0)
Source: Full composer classifier run under stock Bash 3.2 (33 ok, exit 0)
Evidence: Relaunch startup wait: 8s-late start aborts on the old budget, completes on the new 10s budget
Source: Relaunch startup wait: 8s-late start aborts on the old budget, completes on the new 10s budget
$ /bin/bash <relaunch metadata-race test, BASE startup wait: 200 x 0.01s> not ok - relaunch did not reach trace delivery exit=1 $ /bin/bash <same test, THIS BRANCH startup wait: 1000 x 0.01s = the 10s budget this file already uses> ok - fm-control relaunch: delivery and concurrent task metadata publication serialize exit=0Evidence: New ci.yml macos-stock-bash composer gate executed for real (passes on branch, catches drift)
Source: New ci.yml macos-stock-bash composer gate executed for real (passes on branch, catches drift)
--- run against this branch under /bin/bash 3.2 --- ok - fm_composer_queued_enter_verdict: only proven pending is converted gate exit=0 --- same gate against a drifted suite that reports only 32 tests --- ::error::expected 33 composer classifier tests, got 32 gate exit=1Evidence: Non-vacuity guard now refuses a footer-stripped classified fixture
Source: Non-vacuity guard now refuses a footer-stripped classified fixture
$ /bin/bash tests/fm-composer-lib.test.sh # fixture with its footer removed not ok - fixture lost its footer content exit=1Evidence: fm-control relaunch suite, 51 ok, exit 0
Source: fm-control relaunch suite, 51 ok, exit 0
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
tests/fm-composer-lib.test.sh:281-esc=$(printf '\033')re-derives a value the file already owns:ESC=$(printf '\033')at line 155, used by 11 other fixtures in this same file (lines 196, 213, 231, 232, 256, 339, 398, 443, ...). The fix round renamed the base commit's leaked globalESC_LOCALto a proper local, which was the right direction, but the simplest form is to dropescfrom thelocallist on line 275, delete line 281, and use${ESC}in the fixture on line 282. Byte-identical output, two fewer lines, one fewer name for the same escape byte.✅ **Test** - passed
✅ No issues found.
/bin/bash tests/fm-composer-lib.test.shon stock macOS Bash 3.2.57 — 33ok -lines, exit 0Pre-fix reproduction:git show 5fb0ce7:tests/fm-composer-lib.test.shrun under the same /bin/bash 3.2 →not ok - a half-block rule row must count as a structural edge, exit 1/bin/bash tests/fm-control-relaunch.test.sh— 51ok -lines, exit 0 (~2m35s)Slow-start behavior check: realtest_relaunch_serializes_concurrent_durable_metadata_publicationwith an 8s delay injected into the fake transport stub, run at the base 200-iteration wait (failsrelaunch did not reach trace delivery) vs this branch's 1000-iteration/10s wait (passes)CI consumer check: parsed.github/workflows/ci.ymlwith a YAML loader, extracted the composer block from jobmacos-stock-bash(shell/bin/bash {0}), ran it against this branch (exit 0) and against a stubbed 32-test suite (::error::expected 33 composer classifier tests, got 32, exit 1)Guard non-vacuity check: stripped the footer rows below the closing half-block rule from the classified$screenfixture →not ok - fixture lost its footer content, exit 1/bin/bash -nsyntax check of tests/fixtures.sh, tests/lib.sh and both changed test files under Bash 3.2✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.