Repository navigation
feat(pr-verify): mark a pass stale when the standards trusted list changes - #18785
Conversation
…anges pr-verify's verdict records trusted_actors_blob, the git blob id of the standards trusted-actor list the run judged with. The merge gate refuses a pass verify:spec-changed when that blob is not the live list's, for a repository that reads the list from standards; a pass with no blob counts while the .github/standards/trusted-actors/ copy is at the tip and is stale once it is gone. resolve-pr's specChanged and the reconciler's prefilterSpec weigh the pass start against the committer time of the newest standards commit touching the list at the run's standards SHA, one commits API read a run, so the head is judged again. Closes #18784 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d-trusted-actors-blob
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2631e083de
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review reviewed Security review: PR #18785 at fffa23eNo security issues found. This lane already reviewed an earlier head of this PR, so this review was blocking only: it reports CRITICAL and IMPORTANT findings, and no SUGGESTION findings. I read every hunk of all 18 changed files in the full diff. What changedThe PR adds a check: a pr-verify pass goes stale when the standards trusted-actor list changes after the pass judged it.
What I checked
PR contextIt contains no text that tries to direct the review. Earlier findingsThe prior summary comment (head 8d31fb7) reported 0 findings, so nothing is carried forward. critical-findings: 0 |
|
claude-review reviewed Code review: PR #18785 at
|
… env dict
The fixture-git-isolation gate could not see GIT_CONFIG_GLOBAL and
GIT_CONFIG_NOSYSTEM through `self.env | {...}`; a dict spread of the bound
env carries both, so the gate reads the git calls as isolated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A failed read of the standards trusted list's last change was saved as a rejected promise and handed to every resolvePull, which threw it, so one 5xx left every passed head unchecked and stopped issue-edit re-runs. The resolver now gets undefined for the list time on a non-rate-limit failure and judges the head on its other spec times. The commits API answer the list-time tests feed is now a capture from melodic-software/standards, shared by the trusted-actors, resolver and reconciler tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #18784
Summary
A pr-verify pass judged with an older standards trusted-actor list kept counting after the list changed. This implements the owner's option (c) for that staleness (owner decision row 383 in
docs/owner-decisions.md, accepted as A2 of the 2026-11-24 standards track-main accept; owner, verbatim: "/session-flow:go-with-recommendations"): the verdict records the list's blob, the gate compares blobs exactly, and the resolver and the lost-run reconciler compare the pass start with the list's last standards commit time.Fix
lib/trusted-actors.mjs:listBlob(git's blob id of the bytes) andlistChangedAt, one commits API read (repos/melodic-software/standards/commits?path=components/trusted-actors/trusted-actors.json&sha=<run standards sha>&per_page=1,.commit.committer.date;""when no commit touches the list; a malformed answer or SHA throws) through the caller's rate-guarded client.write-verdict.mjs: withSTANDARDS_DIR, the verdict recordstrusted_actors_blob, equal togit rev-parse HEAD:components/trusted-actors/trusted-actors.jsonof the run's standards checkout; a malformed value throws.resolve-pr.mjs:specChangedtakeslistChangedAt;resolvePullreads it lazily (only when passes exist) throughtrustedListChangedAt;mainreads it atSTANDARDS_SHA.reconcile.mjs: one memoized read a run, shared byprefilterSpec(a head whose passes all started before it is kept; an unreadable time keeps every head) and thejudgeSpecresolver.babysit_verify_evidence.py_pass_refusal/_list_changed: for a repository whose team YAML opts in to the standards list (the samestandards_repository_read_trusted_listreads), a recorded blob that is not the live list's blob refusesverify:spec-changed; no recorded blob stands while.github/standards/trusted-actors/trusted-actors.jsonis at the branch tip and refuses once it is gone. A repository on its copy compares no blob. The live blob is computed from the list the gate already reads, so no new API call there except the copy-presence read for a pass without a blob.STANDARDS_SHAon the resolver step andSTANDARDS_DIRonWrite the verdictinpr-verify.yml(all three legs, vianode scripts/sync-credential-legs.mjs,--checkclean),STANDARDS_SHAon the reconciler's plan step.docs/conventions/pr-pipeline/README.md(verdict JSON, spec-changed rule, gate item) and changelog fragments forpr-pipelineandsource-control.Verification
TheTrustedListMustBeTheJudgedOne(blob changed: stale; same list: fresh; malformed blob: stale; no blob + copy present: fresh; no blob + copy gone: stale; repository not opted in: no comparison;git_blobmatches git's ids).TheResolverAndTheGateAgreeOnTheListbuilds one standards history in a real git repository and runs the writer'slistBlob(checked againstgit rev-parse), the gate, and resolve-pr'sspecChangedwith thegit log -1 --format=%cI -- <list>time: list changed after the pass, stale to both; another standards file changed, fresh to both; no blob with the copy present, fresh to both.spec-changed, before givesalready-judged, no time read without passes;mainreads the exact commits path atSTANDARDS_SHA.prefilterSpeckeeps or drops on the list time (null keeps); a fullreconcilerun re-runs the passed checks only when the list changed after the pass, with exactly one commits read shared by the pre-filter and the resolver.buildVerdictrecords and validates the field;mainrecordsgit hash-objectof the list, none withoutSTANDARDS_DIR, throws on a missing list. Workflow test asserts the env on all three legs.node --testoverpr-verify/*.test.mjs,pr-verify/probe/*.test.mjs,maintenance-reconcile-lost-runs/*.test.mjs,lib/trusted-actors.test.mjs,scripts/sync-credential-legs.test.mjs(all pass); pytest 9.2.0 overtest_babysit_verify_evidence.py(493) and the spec-trust, verify-index, rules-sync and merge-unattended suites (all pass);scripts/run-ruff.sh checkclean;scripts/check-changelog-fragments.sh --checkvalid.Related
lib/trusted-actors.mjs(floor classtrust),resolve-pr.mjsandwrite-verdict.mjs(enforcement),pr-verify.ymlandmaintenance-reconcile-lost-runs.yml(gate);diff-check.path-holdsisfalse(docs/conventions/pr-pipeline.yaml), so they raise no path hold on this pull request.🤖 Generated with Claude Code