feat: add bounded Option 1 calibration pilot - #3
Merged
Conversation
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
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.
Summary
Safety boundaries
unknown; this change does not promote profiles or change production eligibility/routing policyb8b4cbfbe5a4122f33716efd69e8aea4bf935e69b2bc850245a4422cb19a1a7bTest plan
git diff --checkpassed