Repository navigation
pr-pipeline: tidy a lane's diff inside resolve-issue before its one push #8485
Copy link
Copy link
Open
Labels
needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.Human-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.Real value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.Triaged, unblocked, and fully specified; eligible to pick up.work-class: structuralRefactors, migrations, contract changes; cross-cutting and hard to reverse.Refactors, migrations, contract changes; cross-cutting and hard to reverse.
Description
Problem (P2)
Owner (relayed by GitHub Support, 2026-10-19): simplify, doc cleanup and ai-slop should run on every PR before AI review, "save review till all the dust is settled". Two gaps, verified by GitHub Support (inventory: operator checkout .work/gh-monitor/quality-skills-placement.md):
- Lane PRs get no refine: pr-refine.yml:24-31 skips pull_request events from the lanes App or another bot (18 of the last 30 runs skipped).
- Refine races review: fix-docs and both review lanes start on the same event, so reviews judge the pre-refine head and the refine push restarts both.
Proposal
Inside resolve-issue, before it commits: deterministic format and lint; simplify on the diff; dissolve-comments on added lines; doc hygiene and ai-slop on changed markdown; re-run the deterministic checks; then one push. No extra push, review run or token mint. Wide-scope audits stay scheduled sweeps that open their own small PRs.
Needs
- The runner allows an activity a declared list of skills (today
--allowedTools "Skill(<plugin>:<skill>)", one skill per run; pr-run-activity.md around line 322). Widening what a lane may invoke is a lane-power change: owner approval per change (GitHub Support is asking). - A diff-scoped tidy entry point: batch-simplify has no base-ref scope and its branch mode breaks on a lane's detached head.
- Turn budget: tidy steps spend turns inside the feat(pr-pipeline): budget issue runs by issue fields and resume capped runs #8281 issue-field budgets; give tidy its own bounded share so it never starves the fix, and skip tidy for docs-only changes beyond the markdown passes.
- Measure first: GitHub Support's baseline (rounds per PR, re-verifications per PR, minutes per merged PR), before and after.
- With tidy in-run, the pr-refine skip for lane PRs (gap 1) can stay; refine then covers human PRs only.
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.Human-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.Real value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.Triaged, unblocked, and fully specified; eligible to pick up.work-class: structuralRefactors, migrations, contract changes; cross-cutting and hard to reverse.Refactors, migrations, contract changes; cross-cutting and hard to reverse.
Type
Fields
No fields configured for Feature.
Activity
github-actions commentedon Oct 19, 2026
Proposed work class: work-class: structural
Basis: automated intake triage; the lanes App applied this class.
Size: Medium
Complexity: Medium
Uncertainty: Knowable
Flags: none
Blocked by: none
Understood: run diff-scoped tidy (format/lint, simplify, dissolve-comments, markdown hygiene and ai-slop, re-check) inside resolve-issue before its single push, with a bounded turn share. PR #10224 merged with
Refs:, so some work landed, but the issue stays open. The remaining acceptance criteria need a check against what that PR delivered.The newest decision comment (#8485 (comment)) settles the earlier open questions: cutoffs, turn share and a new diff-scoped skill. I'm asking nothing new. No duplicates found.
Automated triage, applied by the lanes App.
kyle-sexton commentedon Oct 19, 2026
Decision recorded.
Question: should the implementing lane (work-resolve-issue) run a named list of quality skills before its single push, so every lane PR reaches review already tidied? Order: deterministic format and lint, simplify on the diff, dissolve-comments on added lines, doc hygiene and ai-slop on changed markdown, then re-run the deterministic checks. Options: (a) yes; widens what this one lane may invoke, limited to these quality skills; (b) no; tidy runs as a separate step after the PR opens, at the cost of an extra push and review round per PR.
Answer (owner, 2026-10-19): "Was recommended", which is (a).
Scope stays as written in this issue: tidy gets a bounded share of the turn budget, docs-only changes run only the markdown passes, and baseline metrics are taken before and after.
kyle-sexton commentedon Oct 19, 2026
Owner addition (2026-10-19), verbatim: "some of those quality skills may need their own agent runs if it's a large sweep. Otherwise, it depends on the size and scope of the PR, right? How many files change, lines of code, the impact, the different areas. Nothing is ever black and white."
Design consequence (GitHub Support's proposal):
kyle-sexton commentedon Oct 19, 2026
Owner confirmed in the Automation Lanes session (2026-10-19): build it. Phase 1 builds the small single-area in-run path; per-area tidy runs for large or multi-area diffs follow once GitHub Support's baseline sets the thresholds.
kyle-sexton commentedon Oct 24, 2026
Released for re-triage under the owner's 2026-10-24 rule: an issue stops for a person only for an intent or vision question, a security call, a host or attended run, or spend outside prepaid credit. The hold label came off and intake triage runs again now; it re-applies a hold, with a numbered question, when one of those applies.
To hold this issue again, add
needs-human(orstatus: needs-decision) and say why in a comment.4 remaining items
kyle-sexton commentedon Oct 26, 2026
Decision recorded. The owner answered in the Issue Triage session (2026-10-25), accepting the recommended answers below:
Question asked: For Phase 1, do you accept the recommended small single-area cutoffs, a tidy share of about 25% of the turns, and a new diff-scoped tidy skill?
Already decided: #8485 (comment) (2026-10-19: (a) resolve-issue runs the named quality skills before its one push)
Already decided: #8485 (comment) (2026-10-19: build Phase 1, the small single-area in-run path, first)
Accepted: At most 10 files, 300 changed lines, one plugin or area, and no shared or high-impact path, held in one named config value so the baseline can retune it. Larger diffs skip in-run tidy until the later phase. Basis:
judgment(kept); your 17:53Z confirmation leaves thresholds to the baseline only for the large-diff phase, so Phase 1 needs a starting value.Accepted: About 25% of the activity's
--max-turns. At the cap, skip the remaining tidy passes and push the fix; never fail the run for tidy. Basis:docs/conventions/pr-pipeline/pr-run-activity.md:376-377(--max-turnscomes from the models profile) and the body's "never starves the fix"; the 25% isjudgment(kept).Accepted: A new diff-scoped skill that takes a file and line list, added to the lane's allowed list as one of the quality skills decision (a) allows. batch-simplify's scopes are a time window, a branch or the repository, and its branch mode requires a non-default branch, which a lane's detached head is not. Basis:
plugins/code-tidying/skills/batch-simplify/SKILL.md:5and:168on origin/main 4ab8989 (kept; replaced the refinement'sjudgmentbasis).Acceptance criteria:
Checks a person runs:
github-actions commentedon Oct 26, 2026
The triage sweep dispatched intake triage for this issue (attempt 1 of 2).
melodic-automation-lanes commentedon Oct 28, 2026
The lanes App's pull request #10224 merged with
Refs:, so this issue stays open and nothing starts the lane on it again. work-unblock removedstatus: readyandagent-ready, so the hourly triage sweep sends it back to intake triage, which decides what work is left and admits it again.melodic-automation-lanes commentedon Oct 28, 2026
The work-resolve-issue lane stopped partway through this issue and needs a person.
Why, in the run's own words:
What the run says it did not do:
Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40638026671
To retry, remove
needs-humanand addagent-readyagain.