Repository navigation
test(tests): skip two suites cleanly when the machine cannot support the check - #86
Merged
Merged
Conversation
…easons The omp-detection and calm-pi-extension suites each carried one assertion whose verdict came from the machine, not the code, so any change looked broken when run locally. fm-omp-detection: the no-marker case reads the live process ancestry, which finds the harness a developer runs the suite from (claude, pi); it now skips that one assertion loudly when an ambient harness is in the chain and still asserts unknown on a clean ancestry (CI). The crew-resolution case read whatever config the ambient FM_HOME happened to carry; it now points config lookup at an empty dir so no crew config is a fact of the test. fm-calm-pi-extension: the rendered-export DOM check needs headless Chrome to finish a heavy interactive page, which stalls on a machine with no usable display or GPU. It now probes a minimal control page first: if even that cannot render, it skips only the DOM assertion loudly and the rest of the test still runs; if the control renders but the export does not, that is a real regression and still fails. Both suites stay fully assertive where the environment supports them (CI runs the no-marker and crew assertions in full and skips the pi/tmux E2E before the DOM check).
Address three review findings that the skips did not match the intent: - omp no-marker test: skip only on independent evidence, not any non-unknown result. Require the detector command to have succeeded and a separate ancestry walk to confirm a harness process, so a real detector regression on clean CI still fails instead of passing as a skip. - calm DOM assertion: render a minimal control page first, before the heavy export, so a stalled export render cannot poison the capability decision. Skip only when the control fails; once it renders, the export must render too. - calm DOM assertion: a missing browser is an unavailable DOM capability that skips only that one assertion and lets the rest of the end-to-end test run, rather than failing the whole suite.
|
Warning Review limit reachedNext included review available in 32 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
EvanAgee
added a commit
that referenced
this pull request
Sep 21, 2026
…ender it The calm interactive E2E failed hard whenever the installed Chrome or Chromium could not render, which is not a Pi regression. On this Mac `find_chrome` returns the Homebrew `chromium` wrapper, whose target is absent, so every render attempt exited 126 and the whole suite failed for an environment reason. The DOM assertion now renders a minimal control page first. A browser that cannot render the control skips only that one assertion loudly and the rest of the E2E still runs; once the control renders, the real export must render too, so a slow or broken export is still a genuine failure. This re-implements the calm-export half of the fork's commit 78a2594 (#86). The other half of that commit moves OMP launch-shape evidence into bin/fm-omp-process-lib.sh and rewrites tests/fm-omp-detection.test.sh; neither the library nor that test exists on the root, whose native OMP ancestry probe lives in bin/fm-harness.sh, so nothing there applies. Refs #86
EvanAgee
added a commit
that referenced
this pull request
Sep 21, 2026
…ct map, and handover Seed docs/specs/upstream-rebase.md from the fork's main, because the spec did not exist on c/main, then add the sections this ticket calls for: - A conflict map assigning all 138 conflicting files from `git merge-tree --write-tree c/main origin/main` to the C1 to C8 ticket that owns each one, with the six cross-cutting files that fit no ticket and the per-ticket totals. - A running-the-suite section with the exact runner and CI-lane commands and the observed baseline from a full `bin/fm-test-run.sh --all` on this Mac: 219 scripts, 18 failures, 28 gate skips, 4h07m under a machine load near 40, with every failure re-run alone and classified as root defect, missing tool, this-machine environment, or load. - The trial-home handover: the exact remote, checkout, state-archive, and session-start steps firstmate runs at /Users/evanagee/Sites/firstmate-trial. - The outcome of the four rideable fixes: #71, #90, and the calm half of #86 ported; #77 dropped because the root already carries it. Refs #77 Refs #71 Refs #90 Refs #86
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.
Intent
Fix two test suites that fail on clean main for environment reasons, making every change look broken. This is firstmate's own repo, so firstmate-coding-guidelines applies.
Verified against clean origin/main with zero changes: tests/fm-calm-pi-extension.test.sh failed ONLY at 'could not render calm-mode HTML export DOM' (it needs a browser/DOM this machine lacks; every other assertion passed). tests/fm-omp-detection.test.sh failed at 'no markers should detect unknown, got: claude' because the machine's environment reports claude. Neither is broken product code.
Requirement: make each suite skip cleanly with an explicit printed skip reason when the environment cannot support the assertion, OR fix the detection so the assertion is environment-independent, whichever is the honest fix per suite. Do NOT weaken what the suites prove on machines that CAN run them.
Acceptance: both suites green (or explicitly, loudly skipped) on a machine without the browser DOM and with an ambient claude marker; still fully assertive where the environment supports them; bin/fm-lint.sh clean.
Accepted decisions made during this work, all authorized by the captain:
Branch note: this work was previously on fm/fm-two-red-test-suites. A prior run went terminal with its commits preserved only in the gate repo, so the recovered lineage now lives on fm/fm-two-red-test-suites-v2. That rename is intentional and should be noted in the PR body.
Verified locally on this branch before this run: both suites pass, the calm suite passes 3 out of 3 consecutive runs (the folded flake fix holds), and bin/fm-lint.sh is clean.
What Changed
tests/fm-calm-pi-extension.test.shnow renders a tiny control page in headless Chrome before the real export. No browser, or a browser that cannot render the control page, prints a loud skip for that one DOM check and lets the rest of the end-to-end test run. If the control page does render, a failed export render still fails the suite. The sharedrender_domhelper holds the render-and-wait logic, and the "second /calm restored" loop now waits for each operational row instead of reading one snapshot for all five.tests/fm-omp-detection.test.shaddsambient_harness_in_ancestry, a second witness that walks this run's own parent processes and matches the same harness names and script paths asbin/fm-harness.shdetect_own. The no-marker "unknown" check skips only when the detector exits clean and that witness finds a real harness process, so a broken detector on clean CI still fails. The crew-resolution test now pointsFM_CONFIG_OVERRIDEat an empty config dir so a developer's real crew file cannot change the result.bin/fm-harness.shmoved its privateomp_launch_argv_shapeintobin/fm-omp-process-lib.shasfm_omp_launch_argv_shape, so every OMP ancestry probe reads one copy of the argv-shape rule.CONTRIBUTING.mdanddocs/scripts.mdrecord the skip rule and the new helper.Branch note: this work started on
fm/fm-two-red-test-suites. That run went terminal with its commits kept only in the gate repo, so the recovered history now lives onfm/fm-two-red-test-suites-v2. The rename is intentional.Risk Assessment
✅ Low: The change is confined to two test suites plus a pure code move of an existing function into its shared library, every new skip path is gated on independent evidence so it cannot mask a real regression, and the assertions stay fully enforced on machines that can run them.
Testing
This machine happens to reproduce both environment problems the intent describes, so it was a good place to validate. The omp suite fails on the base commit exactly as reported (
got: claude) and passes on the branch with a loud skip; running it detached from the claude ancestor proves it stays fully assertive with no skip on a clean ancestry, and a deliberately regressed layer-2 detector still fails there, so real bugs on CI are not masked. The calm suite skips only the rendered-export DOM assertion here (the machine'schromiumis a broken stub pointing at an uninstalled app) while the rest of the E2E runs; pointingFM_CHROME_BINat the real Chrome that does exist forced the assertive path, giving 3 of 3 green runs with zero skip lines, and mutation-testing the DOM checker against four broken exports confirmed the assertion still catches every Calm boundary violation. The folded flake fix now matches its sibling assertions and held across all three consecutive assertive runs. I did not run bin/fm-lint.sh since linters are out of scope for this phase, and the worktree was left clean.Evidence: Evidence summary (machine facts, both suites, skip-is-not-a-pass proof)
Source: Evidence summary (machine facts, both suites, skip-is-not-a-pass proof)
Evidence: omp suite on base commit f72f767 — reproduces the reported failure
Source: omp suite on base commit f72f767a — reproduces the reported failure
not ok - no markers should detect unknown, got: claude (missing: 'unknown') --- output --- claudeEvidence: omp suite on branch — green with an explicit, loud skip
Source: omp suite on branch — green with an explicit, loud skip
skip: ambient harness (claude) confirmed in this run's process ancestry; the no-marker walk cannot bottom out at unknown hereEvidence: omp suite detached from the claude ancestor — passes with no skip, fully assertive
Source: omp suite detached from the claude ancestor — passes with no skip, fully assertive
Evidence: Skip does not mask a regression: regressed layer-2 detector in a clean ancestry still fails
Evidence: calm suite on this machine — only the DOM assertion skips, rest of E2E runs
Source: calm suite on this machine — only the DOM assertion skips, rest of E2E runs
skip: headless Chrome cannot render even a minimal control page in this environment; the rendered-export DOM assertion requires a working display/GPU, the rest of the E2E still runs ok - Pi calm native E2E replaces the stock working row with a moving, resize-clamped working ship ... and preserves export plus Ctrl+O behaviorEvidence: calm suite with real Chrome — assertive run 1 of 3, zero skips (DOM assertion enforced)
Source: calm suite with real Chrome — assertive run 1 of 3, zero skips (DOM assertion enforced)
Evidence: calm suite with real Chrome — assertive run 2 of 3
Source: calm suite with real Chrome — assertive run 2 of 3
Evidence: calm suite with real Chrome — assertive run 3 of 3 (folded flake fix holds)
Source: calm suite with real Chrome — assertive run 3 of 3 (folded flake fix holds)
Evidence: Rendered-export DOM assertion still bites (mutation test of the suite's own checker)
Evidence: Root cause of the unrenderable browser on this machine
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-omp-detection.test.shon the branch — exit 0, printsskip: ambient harness (claude) confirmed in this run's process ancestryBase-commit reproduction: rangit show f72f767a:tests/fm-omp-detection.test.shas a temp copy — exit 1,not ok - no markers should detect unknown, got: claude (missing: 'unknown')Printed the live process ancestry of a test run to confirm a genuineclaudeprocess is present (zsh<-claude<-no-mistakes), so the skip is honest hereClean-ancestry control: ran the branch omp suite double-forked/detached (ancestry reduced to barebash) — exit 0 with NO skip line, i.e. fully assertiveRegression guard: ran the branch omp suite in that detached clean ancestry against a stub detector matching realdetect_ownprecedence but with layer 2 regressed to always echoclaude— correctly FAILED withnot ok - no markers should detect unknown, got: claudebash tests/fm-calm-pi-extension.test.sh— exit 0, DOM assertion skipped loudly via the control-page probe, all other tests still ranIsolated the control-page probe by reimplementingrender_domagainst$(command -v chromium)— control page failed to render, taking the skip pathCaptured chromium's stderr to identify the root cause:/opt/homebrew/bin/chromiumexecs a missing/Applications/Chromium.app/Contents/MacOS/ChromiumVerified real Chrome renders the control page:render_dom "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"returned the expectedCALM_CHROME_CONTROLDOMFM_CHROME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" bash tests/fm-calm-pi-extension.test.sh— 3 consecutive runs, all exit 0, all with zeroskip:lines (DOM assertion genuinely enforced)Mutation-tested the suite's extracted DOM checker (lines 3592-3603): valid DOM -> exit 0; leakedhook-message-> exit 1; missingCURRENT_LAUNCH_BRIEF_E2E-> exit 1; leaked[firstmate-synthetic-input]-> exit 1Inspectedwait_for_textand confirmed it re-captures the tmux pane each poll, and that the changed restore assertion now matches its siblings at tests/fm-calm-pi-extension.test.sh:3640 and :3642git status --porcelain --untracked-files=all— clean after removing all transient probe artifacts✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.