Repository navigation
D209 — an attested project's CI reads the record it judges - #373
Merged
Merged
Conversation
On a fourth project, a pull request whose head nobody had attested read "compliant" on the forge: check_attested returned before reading anything under GitHub Actions. CI now fetches the remote's notes with the job's token, carried in git's environment and only towards GitHub, and refuses an unattested head (A1) or a failed record (A2). A remote it cannot read is a warning naming why, never the silent line. Closes #367 Agent-Session: eos-1689a973 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
napkinstack-admin
previously approved these changes
Nov 7, 2026
The token was sent on a workstation too, where an expired one refused the fetch before the remote's own credential could answer: it now goes only under GitHub Actions, masked as hold's fetch masks it. A remote that refuses, notes listed but not fetched, and the token reaching git are tested; git's reason is its fatal line, not a fragment. Agent-Session: eos-1689a973 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
napkinstack-admin
approved these changes
Nov 7, 2026
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.
Closes #367
What it changes
flowchart LR A["nstack attest<br/>(workstation)"] -->|"notes pushed"| R["remote<br/>refs/notes/nstack/checks"] R -->|"fetch, job token in git's env"| C["pr-check in CI"] C -->|"record passed"| G["compliant"] C -->|"no record / failed"| F["FAIL A1 / A2"] C -.->|"remote unreadable"| W["WARNING A1, why"]Legend — solid: what happens when the remote answers; dotted: when it does not. Before this change, CI stopped at
attested — judged where nstack attest runs, not in CIand printed "compliant" whatever the head held.attest.read_remotelists then fetches the remote's notes;fetch_envputs the job's token in git's environment (http.https://github.com/.extraheader), only towards GitHub, never in an argument a log shows. The remote holding no notes at all counts as read: no record.pull_request.check_attestedjudges the record in CI as on a workstation (A1, A2); an unreadable remote is a warning that names why. The A1 action says the check reads again on a push or an edit of the description.skeleton/.github/workflows/pull-request.ymlalready gives the jobGH_TOKEN(D208) andcontents: read; the comment now says the read covers the record.07-governance.md§7 andRULES.mdA1 say it;workstreams.mdrow D209.For a project taking it: a pull request opened before
nstack attestturns red until its head is attested and the check runs again — the behaviour the rule always described.Oracle
platform/tests/test_attest.py.test_attest.py44 passed;uv run bash platform/tests/run.sh→ see VERIFIED.Summary
DONE
VERIFIED
New tests: a record pushed with the notes, read by a fresh checkout under CI (compliant, names the attester); no record on the remote (FAIL A1, not "compliant"); a failed record (FAIL A2); no remote (WARNING A1, never the old line); the credential only in the environment, only for github.com.
Oracle:
uv run bash platform/tests/run.sh→Platform tests: OK.Independent verifier (fresh session), at 80f8adc after its findings at a8f40dd were fixed (the token was also sent on a workstation, where an expired one refused the fetch; a refusing remote untested; git's reason a fragment; no mask): 48 tests; mutants killed — ls-remote or fetch failure read as read, env not passed, CI guard, mask, github.com guard, fatal line, the old early return; three minor survivors (an action's wording, a condition unreachable in CI, an equivalent index).
Probed on a private repository: under
GITHUB_ACTIONS, no credential helper, an installation token inGH_TOKEN→ notes read (11); no token or an expired one → warning with git'sfatal:reason; on a workstation with the remote's helper and a staleGH_TOKEN→ notes read. The raw token appears nowhere; only the masked base64 in::add-mask::, under CI.ASSUMED
github.tokenbehaves as the App installation token probed (both installation tokens, same header) — the first project that takes the version runs it.NOT VERIFIED
RISKS
🤖 Generated with Claude Code