Repository navigation
Description
Part of #4743. Implement first; this PR adds a tested decision component without changing job routing.
Scope / exact files
- Add
ci/pr_attestation.pyandci/test_pr_attestation.py(plain-Python ci self-test discovery; no Rust test binary). - Update
ci-attestations.ymlwith explicit versioned lane freshness (24 hours) and job/gate policy as needed; keep legacyLocal-Gatecompatibility during rollout. - Use pinned forge-ci/prooft APIs/CLI for trailer parsing, tree/parent or declared-input validation and freshness. Put the immutable prooft source/version pin in the verifier; do not run a floating uvx version or implement another trailer format.
- Use
ci/gh_graphql.pyfor cached GraphQL reads; no direct GraphQL CLI. API calls are injectable for tests.
Decision contract (implement as specified)
Inputs: immutable base/head SHAs, PR number/event, same-repo head identity, authenticated GitHub identity/signature/membership facts, time, and policy from BASE. Output stable JSON plus GitHub outputs trusted, skip_<job-id> and a per-job reason list. A missing/unknown fact means false and real selected checks, never successful skip.
Fast path requires same-repo PR; PR author and final HEAD's authenticated signature signer are active obs-rust organization members; GitHub reports that exact HEAD signature valid; signature signer is associated with the signed commit, not an arbitrary author string. Use authenticated membership lookup, not only author_association (private members can be reported as CONTRIBUTOR). A denied membership lookup or absent signer falls back to real CI without demanding new privileges. Non-member collaborators, fork heads, unsigned commits, bot identities without verified org membership, missing/stale/malformed/wrong-tree/wrong-parent evidence and trust-surface edits skip nothing. A known org member can still self-report false execution; this only establishes accountability.
BASE owns executable verifier/policy/tool pins. Reject fast path if diff touches push, ci/**, .github/**, local-gate.toml, ci-attestations.yml, rust-toolchain.toml, Cargo manifests/lock or .cargo/**. Read diff/commit objects, never import head scripts to decide trust. A policy edit cannot relax its own requirements. Reject conflicting duplicate gate records, invalid timestamps/future timestamps beyond 5 minutes, unknown policy versions and unavailable commits. Omitted gates mean not run. A job skips only if all its declared client gates pass. Compile-only gates never satisfy native runtime/Tier 2 gates. merge_group, push, schedule, release, dispatch skip no heavy lane regardless of trailers or hosted proof artifacts.
RED test first
In ci/test_pr_attestation.py, use temporary local git objects and injected GitHub responses. Demonstrate failing assertions for a member's verified signed head with valid partial evidence (only covered jobs skip), versus a fork/nonmember replaying identical trailers (no skips). Add cases for every failure listed above, denied/private membership lookup, signer different from author, untrusted head editing policy/verifier, and merge_group carrying otherwise valid evidence. Never require network or real signing keys in unit tests.
Run uv run --no-project ci/test_pr_attestation.py RED before implementation and GREEN after. Preserve command/status output in PR. Include one fixture proving legacy Local-Gate data alone cannot silently claim missing per-target Ci-Attestation gates.
Acceptance
- Base-owned policy cannot be replaced by head code/config; all lookup failures are observable reasons with real-run outputs.
- Valid partial evidence credits exactly declared gates; six-target naming comes from CI: make PR checks attestation-only; client runs lint/clippy/Dylint (all targets); merge queue is the heavy gate #4743's contract, not host inference.
- No workflow routing changes, no new workflows, no membership-setting edits and no elevated fork token.
- API/schema version and prooft pin are documented in module docstring; focused tests pass. Future routing consumes these outputs without its own trust implementation.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 12, 2026
Claiming: #4744 on ci/4744-attestation-verifier. 1. Add offline RED tests for the specified base-owned per-gate trust contract. 2. Implement the pinned prooft verifier and versioned 24-hour policy without routing changes. 3. Record GREEN evidence, lint once, and open the PR today.
ci: verify base-owned per-gate member attestations (Refs obs-rust#4744)…
zackees commentedon Nov 18, 2026
Landed on master in #4761 (369ff1b); verified the merge is an ancestor of origin/master and ci/pr_attestation.py exists there.