Skip to content

feat: add bounded Option 1 calibration pilot - #3

Merged
June74 merged 74 commits into
mainfrom
codex/option1-calibration-pilot
Aug 29, 2026
Merged

feat: add bounded Option 1 calibration pilot#3
June74 merged 74 commits into
mainfrom
codex/option1-calibration-pilot

Conversation

@June74

@June74 June74 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • add the bounded Option 1 three-launch calibration pilot with immutable source binding, ordered non-refundable slots, atomic run state, pinned launcher identities, and fail-closed execution envelopes
  • add comprehensive offline functional/security coverage plus operator, design, repair, adjudication, and setback documentation
  • repair Agy envelope normalization and exact-fields JSON grading so wrapped JSON fails conservatively and ISO timestamp values remain strings

Safety boundaries

  • production quality remains unknown; this change does not promote profiles or change production eligibility/routing policy
  • no retry or fallback is introduced
  • the final repair and PR verification used no provider, launcher, networked model, live calibration, paid API, or local model execution
  • the earlier authorized three-slot smoke run remains immutable; its result SHA-256 is b8b4cbfbe5a4122f33716efd69e8aea4bf935e69b2bc850245a4422cb19a1a7b

Test plan

  • Pilot: 127 passed; one administrator-only symbolic-link test skipped
  • Router: 355 passed
  • SQLite: 53 passed
  • Calibration: 68 passed
  • Calibration security: 42 passed
  • Worktree clean and git diff --check passed

June74 added 30 commits August 25, 2026 08:30
June74 and others added 28 commits August 25, 2026 18:54
The five end-to-end pilot-run assertions drove Invoke-Calibration -Pilot
-Run without injecting a launcher resolver, so New-CalibrationPilotPreparedLaunches
fell back to Resolve-CalibrationPilotLauncherAnchor and required agy, codex
and claude to be installed at the exact paths and SHA-256 hashes pinned in
calibration/pilots/option1-launchers-v1.json. On a hosted runner none of
them exist, preparation threw source_drift, and every run stopped before
the first provider invocation: zero launches, zero slots, run_state
'stopped'.

Bind the five tests to the existing launcher fixture instead, exactly as
the passing preparation tests already do: create the fake launcher tree
and lock, pass -AllowPilotSourceOverridesForTest with the fixture lock
path and a fixture resolver, and clean the fixture up alongside the
ledger root. The assertions themselves are unchanged, and the checked-in
production lock stays covered by the plan source-hash tests.

Also make this class of failure self-describing:

- Assert-SequenceEqual now reports both sequences instead of a bare count,
  so an empty invocation list no longer reads as "Expected '3' but got '0'".
- New pilot-run assertions name run_state and stop_reason, and call out
  launcher preparation explicitly when a run stops with source_drift.

Verified on PowerShell 7.6.5: the five failures reproduce with the
original file and the exact CI messages, and pass afterwards (61 -> 66
passing). The two remaining local failures are Windows-only file-locking
assertions that pass on the CI runner.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FPvJsreUhg81eysqt1cZ5E
calibration_security.tests.ps1 drove Invoke-Calibration -Pilot -Run
through Invoke-SecurityPilotFailureCase with no launcher resolver, so
every case that expected a specific envelope, stop code or claim state
instead stopped at source_drift as soon as launcher preparation failed
to find agy, codex and claude on the host. That step never ran in CI
because the calibration step aborted the job first.

Inject the same launcher fixture the calibration suite now uses. The
fixture, its resolver and the source_drift assertion move to a shared
calibration/tests/launcher-fixture.ps1 that both suites dot-source, so
there is one definition of the fake launcher tree and lock. The security
harness owns its fixture for the length of one run and releases it in a
finally: the run closes its prepared launcher handles before returning
and no caller inspects the tree afterwards, so the 14 existing ledger
cleanup sites are untouched.

Its Assert-SequenceEqual reports both sequences too, matching the
calibration suite.

The four inline pilot runs in this suite are resume-collision probes.
New-CalibrationPilotRun rejects those before launcher preparation, so
they need no fixture.

Verified on PowerShell 7.6.5: the security suite goes from 21 passing
and 21 failing to 37 passing and 5 failing, and the calibration suite
stays at 66 passing. The remaining failures in both suites are
Windows-only NTFS assertions (junction and reparse-point rejection,
create-new sharing semantics, handle-blocked renames) that cannot hold
on Linux and pass on the CI runner.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FPvJsreUhg81eysqt1cZ5E
@June74
June74 merged commit 25f5aba into main Aug 29, 2026
1 check passed
@June74
June74 deleted the codex/option1-calibration-pilot branch August 29, 2026 15:02
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.

2 participants