Port classis full-test.sh as the Museion verify rail + pre-push hook #190

Closed
opened 2026-11-16 18:15:23 +01:00 by AlexKucera · 0 comments
Owner

What to build

One command verifies a branch. Port classis's scripts/full-test.sh (matured through classis #649–#729; source commit 071966e on AlexKucera/classis) to Museion and adapt it:

  • Same CLI: run / start (detached) / status / summary [run-dir]
  • Per-run pinned result bundles + atomic run-dir allocation — concurrent sessions can never race for the "newest .xcresult" (kills the #33/#179 newest-bundle race by construction)
  • Pass/fail counts authoritative ONLY from xcresulttool get test-results summary, never grepped output (#31/#178)
  • An -only-testing filter that matches zero executed tests FAILS the run (#31/#134 vacuous-green trap — bit 2 of the last 10 sessions)
  • --serialized rerun escape hatch: a parallel-load flake settles via a serialized rerun and that green is the record (#30/#147 family, the #179 repoint pin)
  • Per-test execution timeouts with live status wedge detection (#134 machine-wedge family — the stuck test is named, not held silent)
  • Detached start + status polling as the sanctioned long-suite pattern (replaces the #177 build-for-testing / test-without-building split under the delegation timeout cap)
  • Museion specifics: scheme Museion, hosted unit target conventions (-only-testing:MuseionTests), EngineSmokeTests' child-process latency accounted for in timeout defaults

Plus the hook pair: scripts/install-hooks.sh (git config core.hooksPath) and a pre-push hook — lint gate, no-push-while-a-run-is-live, and the autofix-modified-tree guard (a lint autofix pass that rewrites files after verification fails the push).

Context: the 2026-11-16 session retro measured the hand-typed version of this loop at 29% of all terminal calls across the last 10 sessions (77 xcodebuild + 76 hand-rolled xcresult reads in ≥8 incantation variants).

Acceptance criteria

  • scripts/full-test.sh run on clean main: build + full unit suite; summary prints executed/passed/failed from xcresulttool; exit code agrees
  • start + status detached pattern survives the caller's tool-call timeout; status exits 3 while a run is live
  • A filter matching zero executed tests exits nonzero (the #31/#134 trap)
  • Two concurrent launches allocate separate run dirs; neither reads the other's bundle
  • --serialized rerun green is recorded as the run's result
  • status names the stuck test / flags a wedge during a live run
  • scripts/install-hooks.sh + pre-push: blocks push while a run is live; fails on lint; fails if the autofix pass modified the tree
  • Header comment maps each encoded behavior to the Museion issue numbers it retires
  • swiftformat + swiftlint clean; the full unit suite green — verified via the new script itself
  • Root AGENTS.md commands section + MuseionTests/AGENTS.md Verification name the script (DOX pass)

Blocked by

None (can start immediately).

[Generated by AI]

## What to build One command verifies a branch. Port classis's `scripts/full-test.sh` (matured through classis #649–#729; source commit `071966e` on AlexKucera/classis) to Museion and adapt it: - Same CLI: `run` / `start` (detached) / `status` / `summary [run-dir]` - Per-run pinned result bundles + atomic run-dir allocation — concurrent sessions can never race for the "newest .xcresult" (kills the #33/#179 newest-bundle race by construction) - Pass/fail counts authoritative ONLY from `xcresulttool get test-results summary`, never grepped output (#31/#178) - An `-only-testing` filter that matches zero executed tests FAILS the run (#31/#134 vacuous-green trap — bit 2 of the last 10 sessions) - `--serialized` rerun escape hatch: a parallel-load flake settles via a serialized rerun and that green is the record (#30/#147 family, the #179 repoint pin) - Per-test execution timeouts with live `status` wedge detection (#134 machine-wedge family — the stuck test is named, not held silent) - Detached `start` + `status` polling as the sanctioned long-suite pattern (replaces the #177 build-for-testing / test-without-building split under the delegation timeout cap) - Museion specifics: scheme Museion, hosted unit target conventions (`-only-testing:MuseionTests`), EngineSmokeTests' child-process latency accounted for in timeout defaults Plus the hook pair: `scripts/install-hooks.sh` (`git config core.hooksPath`) and a `pre-push` hook — lint gate, no-push-while-a-run-is-live, and the autofix-modified-tree guard (a lint autofix pass that rewrites files after verification fails the push). Context: the 2026-11-16 session retro measured the hand-typed version of this loop at 29% of all terminal calls across the last 10 sessions (77 xcodebuild + 76 hand-rolled xcresult reads in ≥8 incantation variants). ## Acceptance criteria - [ ] `scripts/full-test.sh run` on clean main: build + full unit suite; summary prints executed/passed/failed from xcresulttool; exit code agrees - [ ] `start` + `status` detached pattern survives the caller's tool-call timeout; `status` exits 3 while a run is live - [ ] A filter matching zero executed tests exits nonzero (the #31/#134 trap) - [ ] Two concurrent launches allocate separate run dirs; neither reads the other's bundle - [ ] `--serialized` rerun green is recorded as the run's result - [ ] `status` names the stuck test / flags a wedge during a live run - [ ] `scripts/install-hooks.sh` + pre-push: blocks push while a run is live; fails on lint; fails if the autofix pass modified the tree - [ ] Header comment maps each encoded behavior to the Museion issue numbers it retires - [ ] swiftformat + swiftlint clean; the full unit suite green — verified via the new script itself - [ ] Root AGENTS.md commands section + MuseionTests/AGENTS.md Verification name the script (DOX pass) ## Blocked by None (can start immediately). [Generated by AI]
AlexKucera added the ready-for-agent label 2026-11-16 18:15:48 +01:00
Sign in to join this conversation.