Skip to content

Run base gates from the base commit's hash-locked environment#107

Merged
MaxGhenis merged 4 commits into
codex/thesis-ledger-factsfrom
gate-env-provisioning
Jul 20, 2026
Merged

Run base gates from the base commit's hash-locked environment#107
MaxGhenis merged 4 commits into
codex/thesis-ledger-factsfrom
gate-env-provisioning

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

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

MaxGhenis and others added 4 commits July 20, 2026 13:58
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>
@MaxGhenis
MaxGhenis merged commit 1f92bf4 into codex/thesis-ledger-facts Jul 20, 2026
8 checks passed
@MaxGhenis
MaxGhenis deleted the gate-env-provisioning branch July 20, 2026 19:26
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.

1 participant