Skip to content

ci: run the bash test suites on a macOS runner - #4

Merged
elkaix merged 4 commits into
mainfrom
ci/github-actions
Jul 31, 2026
Merged

ci: run the bash test suites on a macOS runner#4
elkaix merged 4 commits into
mainfrom
ci/github-actions

Conversation

@elkaix

@elkaix elkaix commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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.sh reported it locally the whole time.

How verified

  • Full suite green locally (macOS, Bash 3.2): liveness 9/0, bounded-calls 8/0, ~6 min total.
  • Runner choice: macos-15 because the hooks target macOS /bin/bash 3.2 semantics; the repo is public so macOS minutes are free. PATH=/bin:$PATH keeps run.sh's unqualified bash on 3.2 instead of the runner's brew bash 5.
  • The workflow's own run on this PR is the end-to-end proof.

elkaix added 4 commits July 30, 2026 22:03
…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.
@elkaix
elkaix merged commit 688b782 into main Jul 31, 2026
1 check passed
@elkaix
elkaix deleted the ci/github-actions branch July 31, 2026 03:21
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