Repository navigation
feat(pr-pipeline): add a daily lane sweep that files lane-run findings - #7857
Conversation
maintenance-audit-lane-runs.yml audits the last day of lane runs and open PRs in three jobs: a collect script with a read-only token writes at most 8 units within 350 REST calls; one read-only model leg per unit returns structured findings that cite main by path, line and quote; a file script with issues: write drops any finding whose quote is not on its line, de-duplicates by fingerprint and files at most 5 needs-triage issues within 50 calls. Model text renders inside fences. Nothing is labeled agent-ready. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…t-lane-runs # Conflicts: # docs/conventions/pr-pipeline/CHANGELOG.md
Codex Review SummaryThis 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: 2031ea7933
ℹ️ 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 (incremental, 827c401 → 748aa2a)Scope: Findings: 0. The change moves the filing and commenting loop into an exported
|
|
claude-review reviewed Incremental review of I checked the diff against the full file and
|
|
The pr-unblock lane stopped on this pull request and needs a person: the merge stages a change under .github/workflows/, which the lane does not push.
To resume, deal with the reason above, remove the gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=7857 -f activity=resolve-conflicts |
# Conflicts: # scripts/outside-node-packages.txt
…er dropped reasons inert The judge prompt now carries the untrusted-content spine and citation and says where an embedded imperative is reported. The step summary renders each dropped finding's title and reason through one helper: one line, no code spans, links, mentions or HTML. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each issue and comment write is caught on its own, recorded in the step summary, and the remaining writes still run. The step exits non-zero at the end when any write failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs: #772 ## Summary Events created with a job's `GITHUB_TOKEN` start no workflow run, except `workflow_dispatch` and `repository_dispatch` ([GitHub docs, GITHUB_TOKEN](https://docs.github.com/en/actions/concepts/security/github_token): "`workflow_dispatch` and `repository_dispatch` events always create workflow runs"). The claude-code-plugins lane sweep files `needs-triage` issues with that token, so those issues never reach intake. This lets a caller dispatch the lane for one issue. Stacked on #773 (base `fix/intake-author-id-gate`); retarget to `main` after it merges. ## Fix Input shape (stable; the sweep-side dispatch will be written against it): - Caller trigger: `workflow_dispatch` with one input, `issue-number` (string, decimal digits), passed through as the reusable's `issue-number` input. Nothing else is read from the dispatch. - Gate: a dispatch run starts only when `inputs.issue-number` is non-empty and the dispatching actor's numeric id (`github.actor_id`) is in `allowed-author-ids` (non-bot actor) or `allowed-bot-sender-ids` (actor ending `[bot]`), with the same malformed-list guards. Dispatching already needs write access; a stranger still cannot start a run. For a sweep that dispatches with its `GITHUB_TOKEN`, the caller lists `github-actions[bot]`'s id `41898282` (or the lanes App's id) in `allowed-bot-sender-ids`; only that bot's login reaches `allowed_bots`. - A new `Resolve the issue` step reads the issue from the API (`issues.get`) by the event's number or the validated input (`^[1-9][0-9]{0,9}$`), refuses a pull request, and supplies the number and node id every later step uses, in place of `github.event.issue.*`. - The reject step now accepts `issues` and `workflow_dispatch`; the skipped job also reports a rejected dispatch (notice and summary only, no label). ## Verification - `node --test .github/scripts/*.test.cjs`: 437 pass, 0 fail. New cases: a listed person or `github-actions[bot]` dispatch starts a run; an unlisted actor, a person's id in the bot list (and the reverse), a missing actor id, an empty issue number and malformed lists start nothing; the issue is resolved by a validated number. - `actionlint` clean; `zizmor --offline`: no findings. - Left out: a live dispatch run. Unverified: that `github.actor` is `github-actions[bot]` when a `GITHUB_TOKEN` sends the dispatch, and that claude-code-action's agent mode runs on `workflow_dispatch` with `allowed_bots` set this way. Both need one live dispatch before the sweep relies on it. ## Related - #773, the author-id gate this builds on. - melodic-software/claude-code-plugins#7857, the sweep that files issues with a `GITHUB_TOKEN`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_019bQ8pL7fJgVy7YjQ7wK1Zw --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
No related issue: the owner approved a recurring lane sweep on 2026-10-17, after a manual pilot sweep filed #7833-#7839.
Summary
This PR adds
maintenance-audit-lane-runs.yml, a daily lane sweep that turns the last 24 hours of lane runs and open PRs intoneeds-triageissues. It never labels an issueagent-ready, so nothing it files starts work. Auto-admission was dropped: in the pilot, 0 of 10 findings would have passed the protected-path rule.Fix
The sweep runs as three jobs:
collect is a script that uses the job's read-only token. It writes at most 8 units of model work, within 350 REST calls:
Runs from forks are excluded.
judge runs one sonnet leg per unit, on the
triage-issueroute's profile. The legs have read permissions only and run with--setting-sources userand--permission-mode dontAsk. They can read only their data directory and the main checkout, both in the workspace, and have no shell. Read access to/proc,/sys, dot files in the home directory and the runner's temp directory is denied. The output is structured JSON, at most 3 findings per leg, and each finding citespath,lineandquotefrom main.file is a script with no model that holds
issues: writeon the job's ownGITHUB_TOKEN, so no broker or lanes App change is needed. It:Model-written text renders inside code fences, and titles have links, mentions and references defused.
The org and repo kill switches stop every job.
Docs:
docs/conventions/pr-pipeline/README.mdhas a new section, "The lane sweep", and CHANGELOG 2.6.0 records the change.Verification
npm testin.github/scripts/maintenance-audit-lane-runs: 19 pass, 0 fail. Before the code existed the suites failed: the three modules were missing, and two security tests failed before their fixes. To confirm the tests can fail, I broke the fork filter, the<escaping and the judge permissions on purpose; the matching tests failed, then passed again once the code was restored.actionlintandzizmor(offline) on the workflow found nothing.runner-policy.mjs --root .reports "Runner policy passed", so no runner-policy contract is needed: this lane calls no cross-repo reusable workflow.review:security-reviewerpass found 1 High, 1 Medium and 2 Low. Its verdict was safe to open as a draft, with merge blocked until the High is fixed.Grep/Globallow rules let the judge read outside its paths. They are dropped, the data moved into the workspace, and/proc,/sys,~/.*andRUNNER_TEMPare denied, with a test.Related
source: lane-sweeplabel does not exist yet. Labels are managed as code in github-iacLabels.cs, so until someone adds it there the filer applies onlyneeds-triage.GITHUB_TOKENtrigger no workflow, so intake triage does not run on them.triage-issueroute because a dedicated route would need aresolve-configcode change.🤖 Generated with Claude Code