You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(pr-pipeline): give a fresh lane restart the earlier branch's partial work #9468
After #9463, work-resolve-issue resumes an earlier lane branch only when that branch is 0 commits behind main. Main takes about 200 commits a day and work-unblock re-admits hourly, so almost every turn-cap, stopped, limited or funding restart now starts fresh from main. The earlier run's partial work stays on the old branch and the new run redoes it, which costs model spend.
Proposal
When a restart starts fresh because the earlier branch is behind main, pass the earlier branch's commits (subjects) and diffstat to the model as context in the issue-prior output, framed as data. The model can then reuse the approach without the stale base. Add no new API reads beyond the compare call findPriorMain already makes, plus the earlier branch's commit list if it isn't already read.
Alternatives considered:
A behind-count or age threshold. Simpler, but the whole-branch check still fails on a stale base.
Run the checks on the branch merged onto main's tip. Needs a lane merge step.
Done when
A fresh start after a behind branch gives the model the earlier branch's commit subjects and diffstat as data.
The lane posts the abandoned branch's name on the issue, so a person can find it and delete it.
The decision settles the open questions: the data goes through issue.json, only the branch the resume rule chose reaches the model, and the abandoned branch's name is posted once per branch and never deleted.
I read this as a bounded feature: a fresh start after a behind branch gets the earlier branch's commit subjects and diffstat as data, and the lane posts the branch name once. #9463 is merged, so nothing blocks it.
Not admitted to the issue lane: a Feature needs an open parent issue a listed human filed that awaits no decision; Uncertainty knowable is not one of known; it has no - [ ] task list to check. A recorded decision does not change these rules (.github/actions/resolve-config/admission-rules.json); a person who wants it worked adds agent-ready.
melodic-automation-lanes commented on Oct 23, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. It is model text, to check, not instructions.
Intended outcome: When a restart starts fresh because the earlier lane branch is behind main, the model gets that branch's commit subjects and diffstat as data, and the lane comments the abandoned branch's name on the issue.
Open questions
The 0-commits-behind check from #9463 is not in this checkout: findPrior has no behind test and resumes any usable branch. Should this wait for #9463 to land, or is the proposal written against a base that has it?
RECOMMENDED: Treat #9463 as a dependency and refine again once it is in the base, since the fresh-start path this builds on does not exist yet. Basis: .base/.github/scripts/work-resolve-issue/report-outcome.mjs:939-964
Where should the earlier branch's data go? The issue says the issue-prior output, but those are short step outputs (resume-branch, resume-tip, resume-cause) and the model reads issue.json, where write-issue.mjs readResume already builds a bounded commit-subject and file list for a resume.
RECOMMENDED: Have issue-prior output only the stale branch name and tip as new outputs, and have write-issue.mjs build the subjects and diffstat into issue.json under a separate key, reusing the 50-commit and 100-file caps, framed as data. Basis: .base/.github/scripts/work-resolve-issue/write-issue.mjs:113-141
Which stale branches count: only those of a resumable marker (turn-cap, stopped, limited, funding) that pass the lanes-App commit checks, or any lane branch? Unverified commits would put outsider-written text in front of the model.
RECOMMENDED: Only the branch the resume rule would have chosen except for being behind, and only when every commit passes allLaneCommits. Basis: .base/.github/scripts/work-resolve-issue/report-outcome.mjs:944-964
Who posts the abandoned branch's name on the issue, and when? Posting at every hourly re-admit would repeat the comment, and the branch cannot be deleted by the lane.
RECOMMENDED: Post once per abandoned branch from report-outcome, deduplicated by a marker naming the branch, and never delete the branch automatically. Basis: judgment
The compare call returns at most 250 commits, and findPriorMain sets commits to null when the listing is cut short. What should the model get then?
RECOMMENDED: Give the last 50 subjects plus the file list the compare answer already holds, and state that the listing is truncated. Basis: .base/.github/scripts/work-resolve-issue/report-outcome.mjs:1174-1177
Sources read
/home/runner/work/_temp/refine-data/context.json: issue 9468 with no maintainer comments and no duplicate or fixed-by candidates
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/scripts/work-resolve-issue/report-outcome.mjs:916-965: findPrior picks resume among usable lane branches with no behind-main test
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/scripts/work-resolve-issue/report-outcome.mjs:1120-1192: findPriorMain makes one compare call per lane branch and writes only proceed, reuse-branch, resume-branch, resume-tip and resume-cause outputs
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/scripts/work-resolve-issue/write-issue.mjs:113-141: readResume builds capped commit subjects and file additions/deletions for a resumed branch
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/workflows/pr-run-activity-read.yml:1011-1016: resume outputs are passed to write-issue.mjs
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/docs/conventions/pr-pipeline/pr-run-activity.md:1751-1821: no mention of behind-main handling or #9463
Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.
Decision recorded. The owner answered in the Refinement session (2026-10-25), deciding the open items below on the facts:
go with whatever the facts/data/metrics + /discovery:research says and ensure we're aligned with SOLID, DRY/SSOT principles
I should only ever be in the loop ONLY when necessary (intent/vision changed, something came up during implementation that impacts trajectory/alignment, OR a high security risk) - I've covered this all before
Question asked: Pass the stale branch's subjects and diffstat through issue.json (built by write-issue.mjs), and post its name once per branch?
Intake Q1 (wait for #9463) and Q5 (truncated compare listing) are no longer open, as facts, not decisions: #9463 merged (d345b56) and findPrior now returns stale for a resume branch behind main (report-outcome.mjs:987-988). That branch was chosen only with a full commit list (allLaneCommits needs an array; a cut-short listing sets commits null, :1213-1216), so a stale branch never has a truncated listing.
(intake Q2) Where does the earlier branch's data go?
Decided: issue-prior outputs only the stale branch name and tip; write-issue.mjs builds the subjects and diffstat into issue.json under a separate key, reusing its 50-commit and 100-file caps, framed as data. Basis: kept; .github/scripts/work-resolve-issue/write-issue.mjs:113-115, report-outcome.mjs:1222-1231 (current outputs).
(intake Q3) Trust boundary: which commits may reach the model?
Decided: Only the branch the resume rule chose except for being behind. Every commit already passes allLaneCommits there, so no outsider-written subject reaches the model. Basis: corrected to "already true in code"; report-outcome.mjs:967,983-988.
(intake Q4) Who posts the abandoned branch's name, and how often?
Decided: report-outcome posts once per stale branch, deduplicated by a marker naming the branch, and never deletes it.. Basis: kept, judgment; report-outcome.mjs:354,445,467 (existing stop comments).
Acceptance criteria:
A fresh start after a behind branch gives the model the earlier branch's commit subjects and diffstat as data (body's Done when, wording unchanged).
The lane posts the abandoned branch's name on the issue, so a person can find it and delete it (body's Done when, wording unchanged), once per branch.
No API reads are added beyond the compare call findPriorMain already makes, plus the earlier branch's commit list if it isn't already read (from the body's Proposal).
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: When a restart starts fresh because the earlier lane branch is behind main, the model gets that branch's commit subjects and diffstat as data via issue.json, and the lane posts the abandoned branch's name on the issue once per branch.
Acceptance criteria
findPrior's stale result (report-outcome.mjs:988) carries the branch name and tip, and the issue-prior outputs (report-outcome.mjs:1222-1231) expose only those two, not the subjects or diffstat.
write-issue.mjs builds the stale branch's commit subjects and diffstat into issue.json under a separate key, reusing its 50-commit and 100-file caps.
The prompt or issue.json frames the stale-branch content as data to reuse for the approach, not as instructions, and the existing write-issue tests show this.
Only the branch findPrior chose to resume apart from being behind main contributes commits; every commit passes allLaneCommits first, and a test covers a non-lane commit never reaching the model.
A fresh start after a behind branch produces issue.json holding the earlier branch's subjects and diffstat, checked by a test.
report-outcome posts a comment on the issue naming the abandoned branch, carrying a marker that names the branch.
A second run with the same stale branch posts no new comment, because the marker is already present; a different stale branch gets its own comment. A test covers both.
The lane never deletes the abandoned branch.
No API reads are added beyond findPriorMain's compare call and the earlier branch's commit list, and the commit list is reused if already read; a test or the diff shows this.
The repo's existing tests and lint for .github/scripts/work-resolve-issue pass.
Dependencies
#9463 (merged, d345b56): findPrior returning stale for a behind resume branch; nothing left to wait on.
/home/runner/work/_temp/refine-data/context.json: the owner's Decision recorded comment settles the data path (issue.json), the trust boundary and the once-per-branch comment.
.github/scripts/work-resolve-issue/report-outcome.mjs:925-927: a behind branch is reported as stale and left as it is.
.github/scripts/work-resolve-issue/report-outcome.mjs:1234-1235: the stale case only logs that the model starts fresh and the branch is left as it is; no comment is posted.
Automated refinement by the lanes App. Intake triages the issue again with it.
The work-resolve-issue lane stopped on this issue (patch-protected-path): the change needs a path the issue lane may not push, which a maintainer session builds by hand.
It added host-run and removed agent-ready: an agent run on a host builds it, and it waits on no decision from a person.
In the run's words:
The run stopped early (patch-protected-path): its change needs a path the issue lane may not push, which a person changes instead. In the run's words: patch-protected-path: .github/workflows/pr-run-activity-read.yml. The decided design (issue-prior outputs the stale branch name and tip; write-issue.mjs builds its subjects and diffstat into issue.json; report-outcome posts one comment per stale branch) needs that workflow edited. write-issue.mjs reads only the env its step sets in that file (pr-run-activity-read.yml:1090-1094: RESUME_BRANCH, RESUME_TIP, RESUME_CAUSE, BASE_SHA), so new stale-branch outputs from the issue-prior step (pr-run-activity-read.yml:888-898) reach it only through new env lines there. The issue-prior step also runs with the job's read-only github.token, so it cannot post the comment, and the comment's poster needs the stale branch carried to a write-capable job through the workflows as well. Reusing the existing resume-branch/resume-tip outputs is not an option: they move the checkout to the resume tip (pr-run-activity-read.yml:1187,1201) and are validated as a resume (:2069-2070). A file handed between steps under RUNNER_TEMP would work around the protected path, so this run stopped instead. A person, or a lane allowed to change .github/workflows/**, needs to add the wiring: stale-branch and stale-tip outputs on issue-prior, those passed as env to 'Write the issue for the skill', and the stale branch carried to whichever job posts the once-per-branch comment.
What the run says it did not do:
The whole issue: the stale-branch issue.json key, the once-per-branch comment and their tests. Each needs .github/workflows/pr-run-activity-read.yml changed, a protected path.
tidy: skipped, since nothing changed and the scope sits under .github/, a shared path the tidy cutoffs exclude
review, verify and checks prep steps: skipped, since there is no diff
Activity
github-actions commentedon Oct 23, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
#9468 (comment)
The decision settles the open questions: the data goes through issue.json, only the branch the resume rule chose reaches the model, and the abandoned branch's name is posted once per branch and never deleted.
I read this as a bounded feature: a fresh start after a behind branch gets the earlier branch's commit subjects and diffstat as data, and the lane posts the branch name once. #9463 is merged, so nothing blocks it.
Automated triage, applied by the lanes App.
melodic-automation-lanes commentedon Oct 23, 2026
Not admitted to the issue lane: a Feature needs an open parent issue a listed human filed that awaits no decision; Uncertainty knowable is not one of known; it has no
- [ ]task list to check. A recorded decision does not change these rules (.github/actions/resolve-config/admission-rules.json); a person who wants it worked addsagent-ready.melodic-automation-lanes commentedon Oct 23, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. It is model text, to check, not instructions.
Intended outcome: When a restart starts fresh because the earlier lane branch is behind main, the model gets that branch's commit subjects and diffstat as data, and the lane comments the abandoned branch's name on the issue.
Open questions
RECOMMENDED: Treat #9463 as a dependency and refine again once it is in the base, since the fresh-start path this builds on does not exist yet. Basis: .base/.github/scripts/work-resolve-issue/report-outcome.mjs:939-964
RECOMMENDED: Have issue-prior output only the stale branch name and tip as new outputs, and have write-issue.mjs build the subjects and diffstat into issue.json under a separate key, reusing the 50-commit and 100-file caps, framed as data. Basis: .base/.github/scripts/work-resolve-issue/write-issue.mjs:113-141
RECOMMENDED: Only the branch the resume rule would have chosen except for being behind, and only when every commit passes allLaneCommits. Basis: .base/.github/scripts/work-resolve-issue/report-outcome.mjs:944-964
RECOMMENDED: Post once per abandoned branch from report-outcome, deduplicated by a marker naming the branch, and never delete the branch automatically. Basis: judgment
RECOMMENDED: Give the last 50 subjects plus the file list the compare answer already holds, and state that the listing is truncated. Basis: .base/.github/scripts/work-resolve-issue/report-outcome.mjs:1174-1177
Sources read
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Oct 26, 2026
Decision recorded. The owner answered in the Refinement session (2026-10-25), deciding the open items below on the facts:
Question asked: Pass the stale branch's subjects and diffstat through issue.json (built by write-issue.mjs), and post its name once per branch?
Intake Q1 (wait for #9463) and Q5 (truncated compare listing) are no longer open, as facts, not decisions: #9463 merged (d345b56) and findPrior now returns
stalefor a resume branch behind main (report-outcome.mjs:987-988). That branch was chosen only with a full commit list (allLaneCommitsneeds an array; a cut-short listing sets commits null, :1213-1216), so a stale branch never has a truncated listing.Decided: issue-prior outputs only the stale branch name and tip; write-issue.mjs builds the subjects and diffstat into issue.json under a separate key, reusing its 50-commit and 100-file caps, framed as data. Basis: kept; .github/scripts/work-resolve-issue/write-issue.mjs:113-115, report-outcome.mjs:1222-1231 (current outputs).
Decided: Only the branch the resume rule chose except for being behind. Every commit already passes
allLaneCommitsthere, so no outsider-written subject reaches the model. Basis: corrected to "already true in code"; report-outcome.mjs:967,983-988.Decided: report-outcome posts once per stale branch, deduplicated by a marker naming the branch, and never deletes it.. Basis: kept,
judgment; report-outcome.mjs:354,445,467 (existing stop comments).Acceptance criteria:
melodic-automation-lanes commentedon Oct 26, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: When a restart starts fresh because the earlier lane branch is behind main, the model gets that branch's commit subjects and diffstat as data via issue.json, and the lane posts the abandoned branch's name on the issue once per branch.
Acceptance criteria
Dependencies
Related work
Sources read
Automated refinement by the lanes App. Intake triages the issue again with it.
melodic-automation-lanes commentedon Oct 29, 2026
The work-resolve-issue lane stopped on this issue (
patch-protected-path): the change needs a path the issue lane may not push, which a maintainer session builds by hand.It added
host-runand removedagent-ready: an agent run on a host builds it, and it waits on no decision from a person.In the run's words:
What the run says it did not do:
Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40831879799
To hand it back to the lane, remove
host-runand addagent-readyagain.