From 5890d6a91e432c53b435f11096d930c079fac913 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 19 Nov 2026 12:18:40 +0000 Subject: [PATCH 1/3] Shift worker runs the chat loop: changed tests, witness, one review (M3.7a) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Records the human's rulings S1 and S3 (2026-11-19) in AUTONOMY.md "Shift speed — 2026-11-19", with pointers from legs 1 and 5 of the autonomous-ship gate. Inside a shift the worker runs the changed and covering test modules plus the Witness (PR CI is the full-suite verdict; dependants' full suites still run on a public API change), starts one independent review beside the tests and the targeted smoke, opens the PR as soon as they pass, runs no adversary pass, and caps pytest at -n 4. The worker template, ship_library and its execution contract follow. Outside a shift nothing changes. Closes #686 Co-Authored-By: Claude Opus 5.5 --- AUTONOMY.md | 40 ++++++++- agents/conductors/batch/AGENTS.md | 4 +- agents/conductors/batch/worker_template.md | 21 ++++- skills/ship_library/reference.md | 7 +- skills/ship_library/ship_library.md | 14 +++- tests/test_shift_speed_worker_loop.py | 94 ++++++++++++++++++++++ 6 files changed, 171 insertions(+), 9 deletions(-) create mode 100644 tests/test_shift_speed_worker_loop.py diff --git a/AUTONOMY.md b/AUTONOMY.md index 49e9ce0..3d3750b 100644 --- a/AUTONOMY.md +++ b/AUTONOMY.md @@ -321,7 +321,10 @@ never an assumption: entries). The audit found the shipped-repos-only contract papers over downstream breakage with human PR review — an autonomous run doesn't have that reviewer, so it runs the dependents' suites too. Repos with no test - dir (organism/doc repos): leg is n/a, stated in the PR body. + dir (organism/doc repos): leg is n/a, stated in the PR body. Inside a + shift the worker runs the changed and covering test modules plus the + `Witness:` instead, and PR CI is the full-suite verdict: ruling S1 in + "Shift speed — 2026-11-19" below. 2. **Smoke** — the curated `smoke_tests.txt` subsets, run with the task worktree's `activate.sh` sourced so they exercise the branch. Applies where the changed repo has a downstream script surface; organism/doc-only @@ -401,6 +404,10 @@ never an assumption: *Revert condition:* if the leg produces no finding across 30 runs it is ceremony, and this clause is removed rather than left as theatre. + Inside a shift the worker runs no adversary pass; the close-out session or + the human at `/prm` is the adversary: ruling S3 in "Shift speed — + 2026-11-19" below. + A failed leg downgrades the run to a human checkpoint: state written to the issue, nothing force-shipped, never modify code to make a leg pass. @@ -474,6 +481,37 @@ own `batches/AGENTS.md` drops both: the Heart gates releases, not runs), and **their absence there is never read as an unacknowledged RED** — the fields are not missing, they do not exist on that schema. +## Shift speed — 2026-11-19 + +The human's rulings, 2026-11-19, on the orchestrator speed review +(`Science/scratch/orchestrator_speed_review_2026-11-19/review.md`; M3.7a, +PyAutoBrain#686). They bring a shift worker's ship step close to a chat +build's loop. Measured over shifts 2026-11-18-pm, -pm2 and 2026-11-19-am +(7 workers), the real work took 10 to 16 minutes per task. The full local +unit suite added 5 to 19 minutes, and 10 to 15 more when laptop load caused +false failures and a rerun. PR CI runs the same suite on Python 3.12 and +3.13, and the merge reads that verdict. The worker's adversary pass cost 60 +to 130k tokens per task, while the close-out session (unattended) or the +human (`/prm`) already reads the PR a second time. + +- **S1, leg 1 in a shift.** The worker runs the test modules its diff + changes or that cover the changed code, plus the `Witness:`. PR CI is the + full-suite verdict for the shipped repo. The dependants' full suites still + run locally when the diff changes public API (they are not in the PR's + CI). A red CI after the worker has ended sends the PR to `/prm`, as now. +- **S3, leg 5 in a shift.** The worker runs one independent review (leg 3) + and no adversary pass. The adversary is the close-out session for an + unattended merge ("Stage-2 adversary amendment — 2026-11-04") and the + human at `/prm` for everything else. + +A worker caps any pytest it runs at `-n 4`. It starts the review beside the +tests and the targeted smoke (leg 2), and opens the PR as soon as they pass +(`agents/conductors/batch/worker_template.md`). + +Outside a shift (an `--auto` chat) nothing changes. + +Later rulings from the same review (S2, S4 to S7) are added to this section. + ## Merge authority follows Consequence — 2026-10-02 **Who merges is decided by the task's declared `Consequence:` tier** diff --git a/agents/conductors/batch/AGENTS.md b/agents/conductors/batch/AGENTS.md index d7215da..0fa1367 100644 --- a/agents/conductors/batch/AGENTS.md +++ b/agents/conductors/batch/AGENTS.md @@ -911,7 +911,9 @@ in a session **using a different model from the one that wrote the branch**. A self-run adversary leg is an absent leg, not a weak one. `collect` cannot run it for you and does not pretend to: with no `adversary` block in the evidence the leg is UNOBSERVABLE and the member reaches the human as SUSPECT — the -honest state, rather than a gap that closes itself. +honest state, rather than a gap that closes itself. The shift worker does not +run this pass (`AUTONOMY.md` "Shift speed — 2026-11-19", ruling S3): your read, +or the close-out session for an unattended merge, is the adversary. **What to expect from batch 1.** Small. The planner picks against a 45-minute review budget, and with almost no prompt carrying a `Witness:` nearly everything diff --git a/agents/conductors/batch/worker_template.md b/agents/conductors/batch/worker_template.md index f85958b..7dc8a6d 100644 --- a/agents/conductors/batch/worker_template.md +++ b/agents/conductors/batch/worker_template.md @@ -45,9 +45,26 @@ The terms of this shift (AUTONOMY.md "Shift briefs and unattended `glance`"): It is the check the organ's PR CI runs. PyAutoHeart#347 failed CI on a hard-coded repo name it would have caught. A finding outside your diff is not yours: name it in your proof packet. Other repos skip this step. +- At the ship step you run the loop a chat build runs (AUTONOMY.md "Shift + speed — 2026-11-19", rulings S1 and S3), not the full gate: + - **Tests (S1).** Run the test modules your diff changes or that cover the + changed code, plus the task's `Witness:`, not the full suite. PR CI is the + full-suite verdict for the repo you ship. When the review surface flags a + public API change (removed, renamed or changed-signature entries), still + run the dependants' full suites locally, because they are not in your + PR's CI. Cap any pytest you run at `-n 4` + (`python -m pytest -q -n 4 `). + - **Review (S3).** Start one independent review (AUTONOMY.md leg 3) beside + the tests and the targeted smoke, not after them. It must return verdict + CLEAN. + - **PR.** Open the PR as soon as the tests, the `Witness:`, the targeted + smoke and the review pass. Run no adversary pass: the close-out session + is the adversary for an unattended merge, and the human at `/prm` for + everything else. + - A red CI after you have ended sends the PR to `/prm`, as before. - Smoke is **targeted** in a shift (AUTONOMY.md leg 2, split 2026-11-19, - PyAutoHeart#352). At the ship step run the changed repo's unit tests, the - task's `Witness:`, and only this smoke, never the full workspace sweep + PyAutoHeart#352). At the ship step run only this smoke, beside the tests + and the review above, never the full workspace sweep (not a bare `/smoke_test`), from your task root with `activate.sh` sourced: cd && source activate.sh && pyauto-heart smoke --root "$PWD" --targeted --changed-files $(git -C diff --name-only origin/main...HEAD | sed 's|^|/|') diff --git a/skills/ship_library/reference.md b/skills/ship_library/reference.md index c3fab2d..5468dc5 100644 --- a/skills/ship_library/reference.md +++ b/skills/ship_library/reference.md @@ -97,7 +97,12 @@ Build/release step. Per repo, after the vitals faculty / Heart verdict is GREEN: 1. `source "$WT_ROOT/activate.sh"`; run `python -m pytest / -x` from inside `"$WT_ROOT/"` (skip only if the repo has no test dir). These tests feed Heart's verdict — a failure means **stop**, return the failing - names + traceback tail, do not commit, do not try to fix. + names + traceback tail, do not commit, do not try to fix. A shift worker + runs only the test modules its diff changes or that cover the changed + code, plus the `Witness:`, with `python -m pytest -q -n 4 `; PR CI + is the full-suite verdict. It still runs each dependant's full suite + (`-n 4`) when the review surface flags a public API change (ruling S1 in + `AUTONOMY.md` "Shift speed — 2026-11-19"). 2. If the worktree is not on `feature/`, stop and report — never auto-switch branches. 3. `git -C "$WT_ROOT/" add -A && git commit -m "" && git push -u origin feature/`. diff --git a/skills/ship_library/ship_library.md b/skills/ship_library/ship_library.md index 0a518a7..9fbfad2 100644 --- a/skills/ship_library/ship_library.md +++ b/skills/ship_library/ship_library.md @@ -83,7 +83,10 @@ rules rather than weakening the gate: Under `--auto`, this step is the four-leg **autonomous-ship gate** — tests (+ downstream dependents on public-API changes), smoke, review-faculty CLEAN, Heart — per `AUTONOMY.md` "The autonomous-ship gate"; do not restate it here. -A same-conversation reread is not an independent review. +A same-conversation reread is not an independent review. A shift worker runs +the tests leg as the changed and covering test modules plus the `Witness:` +(the dependants' full suites still run on a public API change), and PR CI is +the full-suite verdict: ruling S1 in `AUTONOMY.md` "Shift speed — 2026-11-19". ### 4. Execute the ship (feature-dev) @@ -102,9 +105,12 @@ delegation still follows MODEL_DELEGATION.md; capability absence is handled by its cross-environment handoff rather than by provider-name conditionals. If any step or evidence leg fails, stop and report — do not proceed. -**Under `--auto`:** all four legs of the autonomous-ship gate must pass — **five under a batch launch**, which adds the independent-adversary leg (`AUTONOMY.md` leg 5) — (step -3 note); then ship **without interactive sign-off** — the PR body additionally -carries the `## Validation checklist` section +**Under `--auto`:** all four legs of the autonomous-ship gate must pass (step +3 note). A shift worker runs no adversary pass (`AUTONOMY.md` leg 5): the +close-out session or the human at `/prm` is the adversary, ruling S3 in +"Shift speed — 2026-11-19". It starts its one independent review beside the +tests and the targeted smoke, and opens the PR as soon as they pass. Then +ship **without interactive sign-off**: the PR body additionally carries the `## Validation checklist` section ([`reference.md`](reference.md) → "Validation checklist (--auto)"), the run **stops at PR-open** unless step 6's declared tier merges it, a calibration row is appended to `PyAutoMind/autonomy_log.md` (its **first** table, `## Calibration runs`, never the diff --git a/tests/test_shift_speed_worker_loop.py b/tests/test_shift_speed_worker_loop.py new file mode 100644 index 0000000..9bdb644 --- /dev/null +++ b/tests/test_shift_speed_worker_loop.py @@ -0,0 +1,94 @@ +"""The shift worker runs the chat loop (M3.7a, PyAutoBrain#686). + +Rulings S1 and S3 of AUTONOMY.md "Shift speed — 2026-11-19": inside a shift +the worker runs the test modules its diff changes or that cover the changed +code, plus the `Witness:`, not the full suite (PR CI is the full-suite +verdict); the dependants' full suites still run on a public API change; one +independent review and the targeted smoke, then the PR opens; no adversary +pass (the close-out session or the human at `/prm` is the adversary). +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +BRAIN = Path(__file__).resolve().parents[1] +BATCH = BRAIN / "agents" / "conductors" / "batch" +sys.path.insert(0, str(BRAIN / "agents" / "faculties" / "sizing")) +sys.path.insert(0, str(BATCH)) +import _orchestrator as orch # noqa: E402 + +SECTION = "## Shift speed — 2026-11-19" + + +def _flat(text: str) -> str: + """Prose wraps anywhere; compare phrases with whitespace collapsed.""" + return " ".join(text.split()) + + +def _prompt() -> str: + return _flat(orch.worker_prompt("t1", "draft/feature/widgetlib/t1.md", Path("b.md"), Path("leases"))) + + +def _autonomy() -> str: + return (BRAIN / "AUTONOMY.md").read_text(encoding="utf-8") + + +def test_the_worker_runs_the_changed_test_modules_and_the_witness_not_the_full_suite(): + prompt = _prompt() + assert "test modules your diff changes or that cover the changed code" in prompt + assert "the task's `Witness:`" in prompt + assert "not the full suite" in prompt + assert "PR CI is the full-suite verdict" in prompt + assert "-n 4" in prompt + assert "S1" in prompt and "Shift speed — 2026-11-19" in prompt + + +def test_the_worker_runs_no_adversary_pass(): + prompt = _prompt() + assert "--adversary" not in prompt + assert "no adversary pass" in prompt + assert "S3" in prompt + + +def test_the_worker_still_runs_one_independent_review_and_the_targeted_smoke(): + prompt = _prompt() + assert "one independent review" in prompt + assert "verdict CLEAN" in prompt + assert "--targeted --changed-files" in prompt + # The review starts beside the tests and the smoke; the PR opens once all pass. + assert "beside the tests and the targeted smoke" in prompt + assert "Open the PR as soon as" in prompt + + +def test_the_worker_runs_the_dependants_suites_on_a_public_api_change(): + prompt = _prompt() + assert "dependants' full suites" in prompt + assert "public API change" in prompt + + +def test_autonomy_records_s1_and_s3_and_legs_1_and_5_point_to_them(): + text = _autonomy() + assert SECTION in text + sec = _flat(text.split(SECTION, 1)[1].split("\n## ", 1)[0]) + assert "**S1, leg 1 in a shift.**" in sec + assert "**S3, leg 5 in a shift.**" in sec + assert "PR CI is the full-suite verdict" in sec + assert "Outside a shift (an `--auto` chat) nothing changes." in sec + gate = text.split("## The autonomous-ship gate", 1)[1].split("\n### ", 1)[0] + leg1 = gate.split("1. **Tests**", 1)[1].split("\n2. **Smoke**", 1)[0] + leg5 = gate.split("5. **Independent adversary**", 1)[1].split("\nA failed leg", 1)[0] + leg1, leg5 = _flat(leg1), _flat(leg5) + assert "Shift speed — 2026-11-19" in leg1 and "S1" in leg1 + assert "Shift speed — 2026-11-19" in leg5 and "S3" in leg5 + + +def test_ship_library_follows_the_shift_rule(): + skill = _flat((BRAIN / "skills" / "ship_library" / "ship_library.md").read_text(encoding="utf-8")) + assert "five under a batch launch" not in skill + assert "Shift speed — 2026-11-19" in skill + ref = (BRAIN / "skills" / "ship_library" / "reference.md").read_text(encoding="utf-8") + step1 = _flat(ref.split("## Execution contract", 1)[1].split("\n2. ", 1)[0]) + assert "shift worker" in step1 and "-n 4" in step1 + assert "Shift speed — 2026-11-19" in step1 From 8ac7dae47b71bc6d73f776a5e3965711c35e7cf2 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 19 Nov 2026 12:20:30 +0000 Subject: [PATCH 2/3] Keep leg 5 for batch launches outside a shift; state the Heart leg is unchanged Architect review round 1 of #687: ship_library restores "five under a batch launch" and adds the shift-worker exception (ruling S3) after it; the worker template says only legs 1 and 5 change in a shift, and the review, the targeted smoke and the Heart verdict apply as before. Co-Authored-By: Claude Opus 5.5 --- agents/conductors/batch/worker_template.md | 5 ++++- skills/ship_library/ship_library.md | 6 +++--- tests/test_shift_speed_worker_loop.py | 10 ++++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/agents/conductors/batch/worker_template.md b/agents/conductors/batch/worker_template.md index 7dc8a6d..b9f5010 100644 --- a/agents/conductors/batch/worker_template.md +++ b/agents/conductors/batch/worker_template.md @@ -46,7 +46,10 @@ The terms of this shift (AUTONOMY.md "Shift briefs and unattended `glance`"): hard-coded repo name it would have caught. A finding outside your diff is not yours: name it in your proof packet. Other repos skip this step. - At the ship step you run the loop a chat build runs (AUTONOMY.md "Shift - speed — 2026-11-19", rulings S1 and S3), not the full gate: + speed — 2026-11-19", rulings S1 and S3). Only legs 1 (tests) and 5 + (adversary) of the autonomous-ship gate change in a shift. The review + (leg 3), the targeted smoke (leg 2) and the Heart verdict (leg 4) apply as + before: - **Tests (S1).** Run the test modules your diff changes or that cover the changed code, plus the task's `Witness:`, not the full suite. PR CI is the full-suite verdict for the repo you ship. When the review surface flags a diff --git a/skills/ship_library/ship_library.md b/skills/ship_library/ship_library.md index 9fbfad2..05ec640 100644 --- a/skills/ship_library/ship_library.md +++ b/skills/ship_library/ship_library.md @@ -105,10 +105,10 @@ delegation still follows MODEL_DELEGATION.md; capability absence is handled by its cross-environment handoff rather than by provider-name conditionals. If any step or evidence leg fails, stop and report — do not proceed. -**Under `--auto`:** all four legs of the autonomous-ship gate must pass (step -3 note). A shift worker runs no adversary pass (`AUTONOMY.md` leg 5): the +**Under `--auto`:** all four legs of the autonomous-ship gate must pass — **five under a batch launch**, which adds the independent-adversary leg (`AUTONOMY.md` leg 5) — (step +3 note). The exception is a shift worker, which runs no adversary pass: the close-out session or the human at `/prm` is the adversary, ruling S3 in -"Shift speed — 2026-11-19". It starts its one independent review beside the +`AUTONOMY.md` "Shift speed — 2026-11-19". It starts its one independent review beside the tests and the targeted smoke, and opens the PR as soon as they pass. Then ship **without interactive sign-off**: the PR body additionally carries the `## Validation checklist` section ([`reference.md`](reference.md) → "Validation checklist (--auto)"), the run diff --git a/tests/test_shift_speed_worker_loop.py b/tests/test_shift_speed_worker_loop.py index 9bdb644..ec92ed9 100644 --- a/tests/test_shift_speed_worker_loop.py +++ b/tests/test_shift_speed_worker_loop.py @@ -42,6 +42,10 @@ def test_the_worker_runs_the_changed_test_modules_and_the_witness_not_the_full_s assert "not the full suite" in prompt assert "PR CI is the full-suite verdict" in prompt assert "-n 4" in prompt + # Only legs 1 and 5 change; the Heart leg is unchanged. + assert "Only legs 1 (tests) and 5 (adversary) of the autonomous-ship gate change in a shift" in prompt + assert "the Heart verdict (leg 4) apply as before" in prompt + assert "not the full gate" not in prompt assert "S1" in prompt and "Shift speed — 2026-11-19" in prompt @@ -86,8 +90,10 @@ def test_autonomy_records_s1_and_s3_and_legs_1_and_5_point_to_them(): def test_ship_library_follows_the_shift_rule(): skill = _flat((BRAIN / "skills" / "ship_library" / "ship_library.md").read_text(encoding="utf-8")) - assert "five under a batch launch" not in skill - assert "Shift speed — 2026-11-19" in skill + # Outside a shift a batch launch still needs leg 5; the shift worker is the exception. + assert "five under a batch launch" in skill + assert "The exception is a shift worker, which runs no adversary pass" in skill + assert "ruling S3" in skill and "Shift speed — 2026-11-19" in skill ref = (BRAIN / "skills" / "ship_library" / "reference.md").read_text(encoding="utf-8") step1 = _flat(ref.split("## Execution contract", 1)[1].split("\n2. ", 1)[0]) assert "shift worker" in step1 and "-n 4" in step1 From 9ea459871633b644bc3cbe6a9861f2ca3a12e958 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 19 Nov 2026 12:26:25 +0000 Subject: [PATCH 3/3] Keep ship_library within the 200-line skill budget Moves the shift-worker detail (review beside the tests and the targeted smoke, PR as soon as they pass) into reference.md's execution contract and leaves one pointer sentence for S1 and one for S3 in ship_library.md (179 lines; SKILL.md + body now 198). Co-Authored-By: Claude Opus 5.5 --- skills/ship_library/reference.md | 4 +++- skills/ship_library/ship_library.md | 14 +++++--------- tests/test_shift_speed_worker_loop.py | 7 +++++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/skills/ship_library/reference.md b/skills/ship_library/reference.md index 5468dc5..24f47b4 100644 --- a/skills/ship_library/reference.md +++ b/skills/ship_library/reference.md @@ -102,7 +102,9 @@ Build/release step. Per repo, after the vitals faculty / Heart verdict is GREEN: code, plus the `Witness:`, with `python -m pytest -q -n 4 `; PR CI is the full-suite verdict. It still runs each dependant's full suite (`-n 4`) when the review surface flags a public API change (ruling S1 in - `AUTONOMY.md` "Shift speed — 2026-11-19"). + `AUTONOMY.md` "Shift speed — 2026-11-19"). It starts its one independent + review beside these tests and the targeted smoke, runs no adversary pass + (ruling S3), and opens the PR as soon as they pass. 2. If the worktree is not on `feature/`, stop and report — never auto-switch branches. 3. `git -C "$WT_ROOT/" add -A && git commit -m "" && git push -u origin feature/`. diff --git a/skills/ship_library/ship_library.md b/skills/ship_library/ship_library.md index 05ec640..fe40fc6 100644 --- a/skills/ship_library/ship_library.md +++ b/skills/ship_library/ship_library.md @@ -83,10 +83,8 @@ rules rather than weakening the gate: Under `--auto`, this step is the four-leg **autonomous-ship gate** — tests (+ downstream dependents on public-API changes), smoke, review-faculty CLEAN, Heart — per `AUTONOMY.md` "The autonomous-ship gate"; do not restate it here. -A same-conversation reread is not an independent review. A shift worker runs -the tests leg as the changed and covering test modules plus the `Witness:` -(the dependants' full suites still run on a public API change), and PR CI is -the full-suite verdict: ruling S1 in `AUTONOMY.md` "Shift speed — 2026-11-19". +A same-conversation reread is not an independent review. Shift worker tests: +ruling S1, see [`reference.md`](reference.md) → "Execution contract" step 1. ### 4. Execute the ship (feature-dev) @@ -106,11 +104,9 @@ its cross-environment handoff rather than by provider-name conditionals. If any step or evidence leg fails, stop and report — do not proceed. **Under `--auto`:** all four legs of the autonomous-ship gate must pass — **five under a batch launch**, which adds the independent-adversary leg (`AUTONOMY.md` leg 5) — (step -3 note). The exception is a shift worker, which runs no adversary pass: the -close-out session or the human at `/prm` is the adversary, ruling S3 in -`AUTONOMY.md` "Shift speed — 2026-11-19". It starts its one independent review beside the -tests and the targeted smoke, and opens the PR as soon as they pass. Then -ship **without interactive sign-off**: the PR body additionally carries the `## Validation checklist` section +3 note); a shift worker runs no adversary pass (ruling S3, `AUTONOMY.md` "Shift +speed — 2026-11-19"). Then ship **without interactive sign-off** — the PR body additionally +carries the `## Validation checklist` section ([`reference.md`](reference.md) → "Validation checklist (--auto)"), the run **stops at PR-open** unless step 6's declared tier merges it, a calibration row is appended to `PyAutoMind/autonomy_log.md` (its **first** table, `## Calibration runs`, never the diff --git a/tests/test_shift_speed_worker_loop.py b/tests/test_shift_speed_worker_loop.py index ec92ed9..dfb16d6 100644 --- a/tests/test_shift_speed_worker_loop.py +++ b/tests/test_shift_speed_worker_loop.py @@ -92,9 +92,12 @@ def test_ship_library_follows_the_shift_rule(): skill = _flat((BRAIN / "skills" / "ship_library" / "ship_library.md").read_text(encoding="utf-8")) # Outside a shift a batch launch still needs leg 5; the shift worker is the exception. assert "five under a batch launch" in skill - assert "The exception is a shift worker, which runs no adversary pass" in skill - assert "ruling S3" in skill and "Shift speed — 2026-11-19" in skill + assert "a shift worker runs no adversary pass (ruling S3" in skill + assert "Shift speed — 2026-11-19" in skill + assert "Shift worker tests: ruling S1, see [`reference.md`]" in skill ref = (BRAIN / "skills" / "ship_library" / "reference.md").read_text(encoding="utf-8") step1 = _flat(ref.split("## Execution contract", 1)[1].split("\n2. ", 1)[0]) assert "shift worker" in step1 and "-n 4" in step1 assert "Shift speed — 2026-11-19" in step1 + assert "beside these tests and the targeted smoke" in step1 + assert "no adversary pass (ruling S3)" in step1