Repository navigation
feat(intake-triage): admit trusted upstream-drift issues by one shared rule - #16620
Conversation
…d rule An issue the upstream-drift workflow files is trusted when github-actions[bot] wrote it, nobody else last edited it, and its title and first body line are the two the filer writes for a drifted hex-pin page (owner decision on #14215, Q195 (a)). driftIssueId in admit.mjs is that rule's one home, extracted from pr-verify's driftSpec, and driftSpecText is the one fixed spec built from the upstream id. - triage-sweep.mjs dispatches intake for a drift-shaped issue after a GraphQL read of its last editor; every other github-actions[bot] issue is still skipped. - admit.mjs criterion 9 accepts a trusted drift issue as its author, and criterion 7 reads driftSpecText, never its body. - write-issue.mjs writes driftSpecText as issue.json's body, with source upstream-drift. - resolve-pr.mjs driftSpec uses the shared rule and template, which now carries done-when items and the design-change stop. Refs: #14215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASP1SzT1TZPQp8TTQf6
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: 8c5a2a3c15
ℹ️ 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".
Lane run report
Failed GitHub API calls
|
…gate Widened scope on #14215 so a trusted upstream-drift issue reaches the issue lane end to end with no owner step. - admit.mjs: authorTrust answers "listed", "drift" (confirmed by one specOf read for a drift-shaped issue) or null. A trusted drift issue is never split: admission takes it at any Size, and a patch over the scan cap goes to a builder (PATCH_DRIFT). - apply-verdict.mjs: the --check and the write step accept it. - check-blockers.mjs: accepts it and outputs split-child true, so the lane runs it at split-child-size. - write-issue.mjs: the filer's own body rewrite after admission does not stop the run, which never reads the body; the record check reads only the title for it. Any other editor still refuses. - refine.mjs is unchanged: a drift issue needs no refinement or split. - An end-to-end test walks one issue through the sweep, the verdict check, admission and check-blockers, and another proves the design-change route to a person's hold. Refs: #14215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASP1SzT1TZPQp8TTQf6
|
claude-review reviewed Code review: PR #16620, admitting trusted upstream-drift issues through one shared rule (blocking only)This lane already reviewed an earlier head (
No blocking findings on this head. Prior and settled points
What I checked
Closing issue #14215
Other notes
Verifier dropped 0 of 0 candidates. |
|
claude-security-review reviewed Security review: PR #16620 (trusted upstream-drift issues admitted with no owner step)Blocking only. This lane already reviewed an earlier head ( What I checked on this head
Settled point. The earlier IMPORTANT finding was that rows chosen by an upstream reach the intake triage model ( Owner friction-hold removal (not a finding, under the throughput-phase threat model): drift issues no longer need a person's approval before the issue lane. pr-verify's page-scope check and the merge gates still run after the lane. Spend (prepaid, not a hold): drift issues now start intake and issue-lane model runs on their own, at most weekly per drifted upstream. Both draw on the prepaid API keys. There are no plugin manifest changes, and the PR context holds no embedded instructions. The contract and doc edits match the code and remove no rule that something else does not still enforce. I found no new CRITICAL or IMPORTANT security issues on this head. critical-findings: 0 |
work-unblock's staysParked judged the author with authorAdmitted, so a trusted upstream-drift issue that admission parked on a blocker was never handed back. It now asks the shared authorTrust, like every other author gate. The triage sweep's header now says plainly that a drift issue's body rows, which name upstream-chosen paths, still reach intake's triage model: the ci-workflows reusable reads the body itself, so no caller change here can replace it with driftSpecText. Refs: #14215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASP1SzT1TZPQp8TTQf6
Closes #14215
Summary
An issue the upstream-drift workflow files now reaches the issue lane with no owner step when it is a trusted drift issue. This implements option (a) from the Decisions entry on #14215 dated 2026-11-16 19:2xZ (the answer to Q195). Under it, an issue is trusted only when:
Upstream drift: <owner>/<repo>.scripts/upstream-drift-issues.shwrites.One rule decides this at every author gate, and the spec is a fixed template built from the upstream id. Nothing in the spec is read from the body.
Fix
.github/scripts/intake-triage/admit.mjsis the rule's one home:driftIssueIdchecks a GraphQL read and was extracted from pr-verify'sdriftSpec.driftShapedis the REST pre-filter.authorTrustcombines them for a REST issue and returnslisted,driftor null.driftSpecTextbuilds the template, with done-when items, thedesign-changestop, and close withCloses.trustedSpecTexts) reads the template in place of the body.PATCH_DRIFT).specOfnow readstitle.Hold:lines, refuse labels and untrusted-provenance labels..github/scripts/maintenance-audit-lane-runs/triage-sweep.mjs: a drift-shaped github-actions[bot] issue becomes a candidate. One GraphQL read confirms its last editor before the sweep reads its comments or dispatches. Every other github-actions[bot] issue is still skipped..github/scripts/intake-triage/apply-verdict.mjs: the--checkstep and the write step both useauthorTrust..github/scripts/work-resolve-issue/check-blockers.mjs: usesauthorTrustand outputssplit-child: truefor a drift issue, so the lane runs it atsplit-child-size..github/scripts/work-resolve-issue/write-issue.mjs:issue.json's body is the template, markedsource: "upstream-drift".edited..github/scripts/pr-verify/resolve-pr.mjs:driftSpecuses the shared rule and template. The page-scope andCloseschecks are unchanged..github/scripts/work-unblock/label-unblocked.mjs:staysParkedusesauthorTrust, so a drift issue that admission parked on a blocker is handed back once that blocker closes.driftSpecTextthere. That model has no tools and writes only allowlisted labels and fields, and the issue lane and pr-verify read only the template. The triage sweep's header says so.refine.mjsis unchanged. For Size large I chose to keep a drift issue from ever needing a split rather than teach refine to split it. Basis: split children copy only text a listed human wrote (splitChildBody), so a split drift issue's children would be untrusted. Keeping it unsplit adds one condition indecideand one output incheck-blockers..github/workflows/intake-triage.ymlis unchanged. Its bot list already holds 41898282, which admits the sweep's GITHUB_TOKEN dispatch. The ci-workflows reusable gates a dispatch on its actor, not on the issue's author.docs/contracts/upstream-drift/README.mdgets a new "Admission with no owner step" bullet. It also records the lane form of "One case goes to the owner": a lane run cannot file an issue, so it stops withdesign-change, and stop-routes sends that stop to a hold, which addsneeds-human.docs/conventions/pr-pipeline/README.mdgains a paragraph on the shared rule.How a drift issue gets in: an issue opened with a workflow GITHUB_TOKEN starts no
issuesrun, so the hourly triage sweep's dispatch is its only way into intake.Verification
#14215's done-when items:
An owner-approved plan. The Decisions entry dated 2026-11-16 19:2xZ records it: Q195, "go w/ recommendations", option (a).
A clear drift issue is admitted with no owner step. In
admit.test.mjs, "a trusted upstream-drift issue from sweep to the issue lane" walks one issue through every gate:selectCandidatesselects it.checkRunreturns true.admit()writesagent-ready.check-blockersreturnsproceed: trueandsplit-child: true.The same issue last edited by a person stops at every gate.
A drift issue needing a decision carries
needs-humanand is not admitted. The template tells the run to stop withdesign-change.stopRoute(runCode("design-change: ..."))ishold, report-outcome's hold addsneeds-human, and aneeds-humandrift issue readsskipindecide. That is unit-level proof; no live lane run was made.Tests added:
admit.test.mjs, 13 tests:needs-owner-decisionand one byneeds-human.host-run.triage-sweep.test.mjs, 2 tests.write-issue.test.mjs, 4 tests, including the filer's rewrite after admission (runs) beside a stranger's earlier edit (refused).label-unblocked.test.mjs, 1 test: a parked drift issue unparks once its blocker closes, and a person-edited one stays parked.resolve-pr.test.mjs: the drift spec pin is updated.Suite results:
admit,apply-verdict,refine,check-blockers,write-issue,triage-sweep,resolve-prandlabel-unblocked: 1934 of 1934 pass.scripts/check-affected.sh --base origin/main --no-fetch, after merging main: 14 passed, 5 skipped over 16 changed files.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01MWmASP1SzT1TZPQp8TTQf6