Repository navigation
feat(pr-pipeline): accept an upstream-drift issue as the spec of its own re-audit - #16561
Conversation
…own re-audit pr-verify's resolve-pr.mjs takes an issue the upstream-drift workflow filed (github-actions[bot], nobody else last editing it, title `Upstream drift: <id>`, first body line the hex-pin lead scripts/upstream-drift-issues.sh writes for that id) as the spec of a pull request that closes it and only modifies the docs/upstream pages pinned to <id> on main. The spec is built from the id and those page paths; no other line of the issue is read. The babysit merge gate's _trusted_spec accepts the same issue under the same changed-file scope, reading the compare from base to head and each page at the default branch's tip, and reads each github-actions issue once for this rule and the recurring-schedule rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASMXyUAaNx5GqGM3h6c
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. |
Lane run report
Failed GitHub API calls
|
|
claude-review reviewed Code review: no blocking findings (blocking only)This lane already reviewed an earlier head ( I read every hunk of all 19 changed files. Since the last head, the PR adds The new floor row is wired the same way in every copy:
The pinned test counts agree with each other:
Test changes:
Neither change weakens what the tests assert. Unchanged since the last review: the resolver/gate trust rule ( Verification: I ran nothing. The PR body's test counts and its Spend (not a hold): each pull request that closes a drift-shaped issue costs one extra GitHub compare call, plus one contents read per changed page. A pull request touching Scope: whether github-actions[bot] authorship is strong enough to trust is left to the security lane. Verifier dropped 0 of 0 candidates. |
|
claude-security-review reviewed Security review: PR #16561 (an upstream-drift issue as the spec of its own re-audit)No security issues found. I read all 19 changed files in full in the diff. This was a blocking-only review, because the lane already reviewed head What changed since the last reviewNine files are new to this review. They add
The remaining new files are test pin updates. Each of these edits adds a path, so a pull request touching The test-helper changes in The trust rule (untrusted-spec hold, a kept security control), checked again
Other notes
critical-findings: 0 |
resolve-pr.mjs upstreamPages reads docs/upstream from its checkout, so the pages join the floor as an enforcement row and CARRY_REFUSES in both mirrors, as .github/recurring-schedule.json does. The hold-floor copies are regenerated, the floor pins follow the new row, the import walk treats a directory load as a file in it, and the review-clear test scores a path each enforcement glob matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tream row The floor gained one enforcement row, docs/upstream/**, because the drift spec rule reads those pages inside a floored module. The owner applied the three pinned values (the row count and two digests) by hand. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASMXyUAaNx5GqGM3h6c
No related issue: owner decision, 2026-11-16, made twice: "go w/ recommendations" on linking a drift re-audit with
Closesto its drift issue and having the verifier accept that issue as the spec, then "Go with recommendations." on this change's trust rule as built. No human-written issue exists for it.Summary
A pull request that re-audits one upstream's
docs/upstreampage can now close the issue the weekly upstream-drift workflow filed for that upstream, and the intent verifier and the merge gate accept that issue as its spec. Before, every Bot-written issue had no spec, so such a pull request failed withverify:untrusted-specand needed a person to restate the issue.Fix
.github/scripts/pr-verify/resolve-pr.mjs:upstreamPages,driftSpecandcompareFiles, wired intolinkedIssuesandresolvePull. A matching issue yields a spec entry withsource: "upstream-drift".plugins/source-control/skills/babysit-prs/scripts/babysit_verify_evidence.py: the merge gate's twin (drift_issue,page_pin,drift_scope), checked again inside_trusted_specagainst the compare and each page at the default-branch tip. Each github-actions issue is read once, shared with the recurring-schedule rule.docs/conventions/pr-pipeline.yaml: a new hold-floor row,docs/upstream/**, classenforcement, because the resolver now reads those pages inside a floored module and every file a hold path loads must be on the floor. The floor copies are regenerated (merge-holds.mjsand three workflows), both carry-refuse lists gain the glob, and the pinned floor count and digests move to 144 rows. A pull request that touchesdocs/upstream/**now rates as a review-path hold that a clean security-lane review bound to its head clears, with no person needed.prompt.md,docs/conventions/pr-pipeline/README.mdanddocs/contracts/upstream-drift/README.mdstate the rule. Two changelog fragments (pr-pipeline minor, source-control patch).Trust change
Before: an issue a Bot or App wrote has no spec, apart from the recurring-schedule issue and the size-split sub-issue.
After: an issue is the spec only when all of these hold.
^Upstream drift: ([A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+)$exactly.pin=unknownlead does not count.Refs:does not count.modifiedand is adocs/upstream/*.mdpage whose**Last audited upstream state:**marker pins that id; at least one file and fewer than 300.What is read from the issue: author type and id, last editor and edit time, the title, and the first body line by exact equality. The spec text is a fixed template naming only that id and page paths taken from main's own checkout. No row of the issue body, where names and paths from the outside repository live, is read, so text an upstream controls cannot reach the spec, and the file scope is checked in code.
What it does not cover: a re-audit that applies takes to plugin files (it changes files outside the pinned page), and callers that pass no changed-file read. The merge gate's hold on a closing issue that carries
needs-humanis unchanged.Accepted risk: another workflow in this repository that wrote that exact title and lead under the github-actions identity could only point a spec at another already-pinned page.
Verification
resolve-pr.test.mjs: 7 new tests, 181 of 181 pass. They cover the accepted case, the Bot's own weekly edit, look-alikes (the same title from a person, an outsider or the lanes App; no lead line; the vendored lead; a different title; title and lead naming different ids; a body someone else last edited; an id no page pins), scope refusals (another upstream's page, an added unrelated file, a rename, a removal, an empty diff, the 300-file cap), aRefs:link, a failed compare read, and a caller with no compare.tests/test_babysit_drift_spec_trust.py: 10 new tests for the gate twin, all pass; the*_trust.pyset 32 OK;test_babysit_verify_evidence.py441 OK;test_verify_rules_sync.py19 OK.ajv, which that worktree had not installed.Test Python (1),Test Bash (5)andCheck Skillson one cause:test_merge_holds_sync.pyfounddocs/upstream/loaded by a hold path and not on the floor. With the floor row added:test_merge_holds_sync,test_floor_paths,test_babysit_riskand both spec-trust modules, 206 tests OK (11 skipped);resolve-pr.test.mjs181 of 181;sync-hold-floor --checkclean. Two tests changed to keep asserting the same rule:python_closurewalks only stand-ins that exist as files, and the per-glob risk test scores a concrete path each glob matches instead of the glob's literal text.scripts/check-affected.sh --base origin/main --no-fetch: 18 passed, 1 skipped; the pre-push run passed again.Related
docs/contracts/upstream-drift/README.md: the contract says a re-audit pull request closes its drift issue.🤖 Generated with Claude Code
https://claude.ai/code/session_01MWmASMXyUAaNx5GqGM3h6c