Repository navigation
feat(work-resolve-issue): summarize a reused branch in its PR body - #7831
Conversation
…ow to the merge lane On a reuse the skill run now runs a read-only summary pass instead of nothing: no lane token is minted, the job's read-only GITHUB_TOKEN writes the issue and a blobless-fetched diff of the branch as data, and a second claude-code-action step on the new summarize-reuse route (sonnet, effort medium, 10 turns) reads them with Read alone and returns title, summary and changes as structured output. The runner binds that output to its own issue, branch and diffed tip in reuse-summary.json. report-outcome uses the summary only when it names this issue and branch and the branch is still at that tip; the PR then carries it and the hold line only where a done PR would. Otherwise, as before, fixed text and the hold line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR
# Conflicts: # .github/scripts/work-resolve-issue/report-outcome.mjs
A reuse PR carries the hold line whether or not the summary pass wrote its body, until the review-lane fix (#7815) is proven on live runs. The tests assert the hold on the summarized body, and the route docs, schema descriptions and convention changelog now name summarize-reuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR
…nly job The summary model step ran in the run job, which holds id-token: write with its one broker mint unused on a reuse. It now runs in a summary job that needs the run job, holds only contents: read, and keeps the blobless fetch, the no-config diff and env-only model output. Every step is continue-on-error and gated on the one before, so a failed pass turns no job red. Every reuse PR now lists the files GET /compare names, denied paths marked and first, or says the list is unavailable. reusePlan builds the body frame once. The tests pin the hold with readable denied paths, a README-only diff and an unheld work class, so a conditional hold fails them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR
…mat characters
neutral() stripped everything from `<!--` to the end before escaping
`<`, so a branch file named `README.md<!--x` listed as `README.md`. A
file path now keeps that text, escaped. Format characters (\p{Cf}:
bidi overrides, zero-width) are now dropped from paths and summary
text alike.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR
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. |
|
claude-review needs no new review of Code review: PR 7831 (summarize a reused branch in its PR body)I found nothing to report and posted no inline comments. I read the whole diff and checked these points against the code in the checkout. I did not run the tests, the workflow or the summary job.
The PR's own verification numbers are the author's claims. I did not run the Node tests or the never-rules shell test, so I haven't confirmed them. The description also says the summary job has not run live yet. |
|
claude-security-review needs no new review of Security review: PR #7831 (head 59478cd)No security findings. I read the whole diff, plus the surrounding The new summary pass feeds untrusted text (the issue, the branch diff) to a model and puts the model's output into a PR body. I checked the following and found each one holds:
One residual, not reportable: the oauth token is an input to the model-running action, so the isolation rests on the |
No related issue: an owner decision in session. When work-resolve-issue reuses a crashed run's branch, a read-only summary pass now writes the PR body; the automatic Hold stays until #7815 is proven on live runs.
Summary
A reuse PR (opened from an earlier run's unreported lane branch, #7790) used to carry a fixed body with no model text. Now a short, read-only summary pass over the issue and the branch diff writes the PR body when its summary is usable and bound to this issue, branch and tip; otherwise the PR keeps today's fixed body. Every reuse PR also lists the files the branch changes, with denied paths marked. Either way the PR keeps the automatic "Hold: a human merges this" line: reuse PRs stay human-merged until the review-lane fix in #7815 is proven on live runs.
Fix
summaryjob inpr-run-activity-write.yml:needs: run, starts only when the run job'sreuse-branchoutput is set (so that job minted nothing), and holdscontents: readonly, with noid-token. No model turn runs in the job that holdsid-token: write.base-sha(persist-credentials: false), andwrite-issue.mjswrites the issue with the job's read-only token. A blobless fetch into a separate repository withGIT_CONFIG_GLOBAL=/dev/nullplusgit diff --no-ext-diff --no-textconvwrites the branch diff as data, so nothing from the branch is checked out or run. The fetch is unauthenticated, so the pass needs a public repository; elsewhere the PR keeps the fixed text.summarize-reuseroute (profilesummary: sonnet, effort medium, 10 turns) after runner isolation, with Read limited to the data directory and every other tool disallowed, plus--json-schema, no plugins and no commit signing. The prompt passes through a random heredoc delimiter, and the model output passes throughenvonly.continue-on-errorand gated on the one before it, so a failed pass turns no job red.report-outcomeneeds the wholeresolve-issuecall and runs with!cancelled(), so it opens the PR whether the summary job succeeded, failed or skipped.GET /comparenames, withdenied-pathsmatches marked and listed first. If the compare fails, the PR says the list is unavailable and still opens.reusePlanbuilds the body frame once and varies only the Summary, Fix, Verification and Left out text.permissions:are unchanged.pr-run-activity.mdhas a new "The summary job" section, plus run-job step 5 and Issue mode updates.summarize-reuseand thesummaryprofile are named inpr-pipeline.schema.json,docs/conventions/pr-pipeline/README.md(Models), the resolve-config README and the pr-pipeline CHANGELOG (2.4.0).Verification
.github/scripts/*/*.test.mjsand.github/actions/*/*.test.mjs: 1291 pass, 0 fail (report-outcome 115/115, resolve-config 315/315).write-runner-never-rules.test.sh: PASS=83 FAIL=0. It now asserts the run job has no summary or second model step, the summary job'sneeds,if,contents: read-only permissions,continue-on-erroron every step, and the base-only checkout. actionlint, zizmor (offline) andRunner policy passed.are clean on the changed workflows. The pre-push check-affected hook passed.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01YcPjcqFavvzkTGBKXMgdXR