ci: run the bash test suites on a macOS runner - #4
Merged
Conversation
…cy floor Two defects, both shipped in 776034b ("bound every companion call"). Status loss re-dispatched without a lease. A bounded status call that came back empty four times returned 6, the watchdog reported FAILED, the lease was released, and the loop re-dispatched — while the original Codex job may still have been writing. Status loss now routes through companion_cancel_job, which poisons the lease in write mode and returns 125, so the run ends BLOCKED with the lease retained instead of racing a second writer into the same tree. Every companion call cost a full second. run_bounded checked liveness and then slept unconditionally for 1s, so a 28ms call took ~1024ms, and `elapsed` counted iterations rather than wall time — a nominal 2s bound was once observed running 158s. It now measures wall clock with SECONDS and polls at 100ms. Five status calls: 5122ms -> 572ms. tests/liveness.sh, whose bounds are 6-11s, had gone from 9 passed to 0 passed; it is back to 9/0 with no bound relaxed. The verifier no longer inherits write-lease ownership. implementer-loop.sh ran --verify with MAESTRO_LOCK_ACQUIRED/_TOKEN/_DIR in scope, so any verify command touching Maestro internals acted as the lease owner. tests/bounded-calls.sh did exactly that twice, poisoning the real workspace lease with the fixture job id task-bounded0-aaaaaa and blocking three dispatches. The child is now run under env -u for all three, and t6 additionally scrubs them itself, guarded by t8 — which fails with rc=125 when the scrub is removed. Verified: tests/run.sh 11 suites, 11 passed, 0 failed. Each new check was observed failing first (5146ms; write_lock_is_owner returned 0 inside the verifier; rc=125 want 124 under an injected lease).
The full suite sat unrun by any automation; a regression lived on main for a day while liveness.sh reported it locally. Runs tests/run.sh on macos-15, whose /bin/bash is the 3.2 the hooks target; PATH puts /bin first so run.sh's unqualified bash cannot resolve to brew bash 5.
preflight.sh was the only suite reading the machine's real pin via codex-model-select.sh --pin, so it failed on any host without ~/.codex/config.toml — including the CI runner. It now fabricates its pin in the scratch dir and shims node past the HOME switch, the way liveness.sh already does.
detection.sh, commit-invariance.sh, and orphan-lifecycle.sh resolved the companion and Codex pin from the machine's real HOME, so on a host without a Maestro install the loop blocked before the provenance code under test ran and every gap assertion saw nothing. Each suite now builds a scratch HOME with the fake-companion fixture, an idle status file, a fabricated pin, and a node forwarder captured before the HOME switch.
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.
What
Adds a GitHub Actions workflow running
tests/run.sh(all 11 suites) on every PR and push to main.Why
Nothing in this repo ran the suites automatically — a companion-latency regression sat on main for a day while
liveness.shreported it locally the whole time.How verified
macos-15because the hooks target macOS/bin/bash3.2 semantics; the repo is public so macOS minutes are free.PATH=/bin:$PATHkeepsrun.sh's unqualifiedbashon 3.2 instead of the runner's brew bash 5.