Skip to content

test: hermeticize bootstrap fixtures - #528

Open
robinbraemer wants to merge 3 commits into
kunchenguid:mainfrom
robinbraemer:fm/bootstrap-cmux-hermetic-q2
Open

robinbraemer wants to merge 3 commits into
kunchenguid:mainfrom
robinbraemer:fm/bootstrap-cmux-hermetic-q2

Conversation

@robinbraemer

Copy link
Copy Markdown

Intent

Fix only the fm-bootstrap test fixture hermeticity defect at upstream baseline b708731. The suite must clear the inherited macOS __CFBundleIdentifier=com.cmuxterm.app cmux fallback marker when its default-backend fixtures intend tmux. Add one focused fixture regression, change only tests/fm-bootstrap.test.sh, preserve explicit cmux runtime-detection coverage, and do not modify production backend detection, documentation, or unrelated backend work.

What Changed

  • Captain, bootstrap fixtures now clear inherited cmux runtime markers, including __CFBundleIdentifier, while preserving explicit cmux detection coverage.
  • Add a focused regression for bundle-marker cleanup and coordinate the fleet-sync timeout fixture with an output-ready marker for deterministic assertions.

Risk Assessment

✅ Low: Captain, the narrow test-only patch now deterministically seeds and clears the inherited cmux marker, resolving the prior false-pass while preserving production behavior and explicit cmux coverage.

Testing

Completed 1 recorded test check.

  • Outcome: ⏭️ skipped across 4 runs (1h22m20s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ tests/fm-bootstrap.test.sh:37 - Seed __CFBundleIdentifier=com.cmuxterm.app before exercising the fixture scrub. This assertion runs only after the file-level unset, so it passes on normal CI where the marker was never present—even if the new sanitizer entry is later removed—making the regression environment-dependent.

🔧 Fix: Captain, seed cmux marker for hermetic fixture regression
✅ Re-checked - no issues remain.

⏭️ **Test** - skipped
  • 🚨 tests failed with exit code 1
  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"

🔧 Fix: Captain: hermeticize bootstrap cmux fixture
1 error still open:

  • 🚨 tests failed with exit code 1
  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"

🔧 Fix: Captain, hermeticize bootstrap cmux fixture
1 error still open:

  • 🚨 tests failed with exit code 1
  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"

🔧 Fix: Captain, stabilize bootstrap fixture timing
1 error still open:

  • 🚨 tests failed with exit code 1
  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@robinbraemer
robinbraemer force-pushed the fm/bootstrap-cmux-hermetic-q2 branch from 1c9a0e5 to e204ec1 Compare July 13, 2026 21:30
0futuresystems added a commit to 0futuresystems/firstmate that referenced this pull request Aug 10, 2026
Three host-dependent failures blocked tests/ here:

- fm-bootstrap: the missing-tool fixture deleted node from the fake bin, but
  host node in /usr/bin still resolved, so the MISSING diagnostic never fired
  and the assertion failed. Assert on quota-axi, which exists only inside the
  fixture.
- fm-calm-pi-extension, fm-busy-adapter-wiring: this Node build ships without
  TypeScript support (ERR_NO_TYPESCRIPT), so importing the .ts extensions
  failed outright. Load them through Pi's bundled jiti loader, matching the
  pattern fm-pi-watch-extension already used, and unwrap the extra default
  layer jiti introduces.
- fm-backend-herdr-focus-flash-e2e: gate on Herdr >= 0.7.5 so older hosts skip
  with a stated reason instead of failing.

Also replace a literal \x27 escape in an fm-pi-watch-extension error message,
which would have printed the escape rather than an apostrophe.

Deliberately not upstreamed: kunchenguid#1476 already fixes the
fixture bug at a sibling call site with a better mechanism (it masks the
lookup and keeps the original assertion), and kunchenguid#528 is open against
fm-bootstrap.test.sh.

Known remaining failure: once loading is unblocked, fm-calm-pi-extension still
fails its legacy_away follow-up case. That assertion predates this change and
is a known upstream failure, noted as separately queued in kunchenguid#1476.
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.

1 participant