Run base gates from the base commit's hash-locked environment#107
Merged
Conversation
Every gate invocation that executes a BASE commit's scripts used bare python3 with no dependency provisioning — correct while the gate scripts are stdlib-self-contained, broken the moment a base carries the vidimus consumption shims (the NEXT PR's base gate would ModuleNotFoundError). All four sites (trusted-base detached gate, PR base gate, push gate, push-time release verify) now provision with uv sync --locked --no-dev from the base checkout's own pyproject/uv.lock and invoke uv run --locked python — the PR cannot influence what code or dependencies judge it, and installs are hash-verified against the base's lockfile. Behavior on today's self-contained bases is unchanged (verified: gate and full chain verification green under the locked env on the live 147-row, 3-release chain), which is what lets this land ahead of the consumption PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The guard test pins the trusted gate's literal invocation lines; teach it the provisioned form and additionally pin the uv sync line so future edits cannot silently drop base-env provisioning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
On synchronize events the payload's merge_commit_sha is populated but can be stale: GitHub recomputes the test-merge commit (fresh committer timestamp, new SHA) between event emission and the gate's fetch, so two authentic values legitimately differ. The gate judges the fetched refs/pull/N/merge tree either way — equality was never a security boundary. Log the mismatch, judge the ref. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Sequencing step (A) for the vidimus consumption PR: base-gate invocations provision a hash-locked env from the BASE commit's own uv.lock before running the base scripts, so shimmed gate scripts resolve their imports without the PR influencing them. No-op on today's self-contained bases (verified live). Gate-class PR; companion mirror to main follows for the pull_request_target definition.
🤖 Generated with Claude Code