Skip to content

ci: verify base-owned per-gate member attestations (Refs #4744) - #4761

Merged
zackees merged 2 commits into
masterfrom
ci/4744-attestation-verifier
Nov 12, 2026
Merged

zackees merged 2 commits into
masterfrom
ci/4744-attestation-verifier

Conversation

@zackees

@zackees zackees commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Refs #4744

This adds the standalone base-owned decision component for the attestation rollout. ci/pr_attestation.py reads policy, commit objects and the cached GraphQL wrapper from the immutable base and requires the loaded verifier to match that base. It verifies a same-repository PR's exact final HEAD signature signer and the PR author's active obs-rust memberships through authenticated APIs, including private memberships. Unknown or denied lookups produce observable real-run reasons without requesting more privileges.

The verifier uses forge-ci/prooft 0.2.0 at immutable source revision 683bcf0b3fcf77548054c85991f2b03fdaca77bd for the existing v1 trailer format, tree/parent or declared-input binding, and freshness. Schema v1 JSON and GitHub outputs expose trusted, skip_<job-id>, and per-job reason lists. Valid partial evidence credits only jobs whose declared gates are complete. Trust-surface changes, forks, nonmembers, unsigned or mismatched final heads, malformed/conflicting/invalid evidence, unavailable objects and non-PR events receive no skip credit. Native tests and Tier 2 remain separate from compile-only checks. The policy keeps legacy Local-Gate compatibility and names all six supported Rust target triples with explicit 24-hour lane freshness. No workflow or job routing changes are included.

The conservative interpretation is to reject all supplied evidence when any supplied record is invalid, while omission only denies jobs requiring the omitted gate. The pinned prooft API uses a stricter 60-second future-clock tolerance, which is retained rather than broadening it to five minutes. Legacy Local-Gate data cannot supply missing per-target Ci-Attestation gates. Verified identity provides accountability, not proof that a member executed a claimed command.

RED commit d7146e2ca76a21c782b5b87f25eb2cce2c25ded9 adds the offline contract tests against a real-run stub. uv run --no-project ci/test_pr_attestation.py exited 1; the focused signed-member case also exited 1 with AssertionError: False is not true, because the stub did not grant the expected partial credit. The full RED diagnostic artifact is /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-q41eky.log. GREEN uses temporary local git objects and injected GitHub responses without real signing keys or GitHub requests. The verifier calls the pinned prooft API in an isolated subprocess, with base-owned adapter code and a working directory outside the head checkout. Plain ci unittest discovery uses only the standard library and injected API responses. The same tracked tests support --integration, which exercises the actual pinned prooft adapter; UV_OFFLINE=true forbids network during that integration run.

GREEN validation: uv run --no-project ci/test_pr_attestation.py exited 0 with 27 tests passing. UV_OFFLINE=true uv run --no-project ci/test_pr_attestation.py --integration also exercised the real pinned API with 27 cases passing. Plain unittest discovery passed. The repository standard-library-only check (2 tests), tool guard (28 tests), uv invocation policy (6 tests), Ruff C901/RUF100, and git diff --check passed. The one requested full lint invocation, SOLDR_PORCELAIN=0 ./lint under a 1800-second deadline, exited 1 because the initial test implementation declared/imported prooft directly, violating the standard-library-only rule. The subprocess adapter and offline fixtures repair that single reported failure; the affected policy checks and focused tests were rerun successfully. The full lint was not rerun, honoring the one-run instruction; hosted PR CI remains the merge gate. Full lint diagnostic artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-vqSkUA.log. Rust port tiers and product runtime checks do not apply to this isolated Python CI decision component. The pre-push clud-review found an unknown-provenance case, which is now rejected and covered by a regression test.

The final GREEN head after ./push attestation is a49aa8c798a3d61439152381f16f7faa80ebcce0. ./push exited 0, stamped the completed Linux host fmt/clippy/Dylint evidence, and opened this PR as a draft under backpressure. The all-target client expansion is a separate rollout step. A single primary clud-review reviewer reviewed the final adapter and reported clean.

Ci-Attestation: {"at":1794523133,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["d7146e2ca76a21c782b5b87f25eb2cce2c25ded9"],"secs":1,"stamp":"3bd783c7535cb9d18edd6a87c0d87790","tree":"4dc60297d776fb6527152ae75c59c0f7ea60b5ed","v":1,"via":"run"}
Ci-Attestation: {"at":1794523133,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["d7146e2ca76a21c782b5b87f25eb2cce2c25ded9"],"secs":1,"stamp":"a9520adc3eb3ee7a0abe425a845404bf","tree":"4dc60297d776fb6527152ae75c59c0f7ea60b5ed","v":1,"via":"run"}
Ci-Attestation: {"at":1794523133,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["d7146e2ca76a21c782b5b87f25eb2cce2c25ded9"],"secs":1,"stamp":"834f06a99668cbe3ae751219bd0a8bc2","tree":"4dc60297d776fb6527152ae75c59c0f7ea60b5ed","v":1,"via":"run"}
@zackees
zackees marked this pull request as ready for review November 12, 2026 22:39
@zackees
zackees enabled auto-merge November 12, 2026 22:39
@zackees
zackees added this pull request to the merge queue Nov 12, 2026
Merged via the queue into master with commit 369ff1b Nov 12, 2026
41 checks passed
@zackees
zackees deleted the ci/4744-attestation-verifier branch November 12, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant