Skip to content

fix(pr-pipeline): hold Hold:-line and lanes App issues, keep needs-human on re-entry, and cap parallel admissions - #11065

Closed
melodic-automation-lanes[bot] wants to merge 1 commit into
mainfrom
work-resolve-issue/issue-10735-40952481182-1
Closed

melodic-automation-lanes[bot] wants to merge 1 commit into
mainfrom
work-resolve-issue/issue-10735-40952481182-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #10735

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Finding 7 of the #9246 review, as amended by the recorded decision: intake admission now refuses a body Hold: line and any lanes App issue that is not a trusted size-split sub-issue, both held for a person; intake-reenter keeps needs-human (a decision on such an issue dispatches nothing) and a listed human's removal of needs-human re-enters the issue from status: needs-decision. Parallel apply-verdict runs can no longer overshoot the queued cap: admission reserves with admission-deferred before reading the room, counts other runs' live reservations against it, and check-wip-cap reads the queued agent-ready issues from the issues API instead of the search index.

Not verified

  • No test suite ran: this lane's Bash runs only the named wrappers, so node --test for admit, reenter, check-wip-cap and label-unblocked is left to the PR's CI; every changed test was traced by hand and by two review subagents
  • Tidy skipped: the change is about 670 changed lines over 12 files in more than one area and touches the shared .github/ and docs/conventions/ paths, past the tidy cutoffs
  • .github/workflows/intake-reenter.yml comments (lines 3-10, 19-23, 52-53) still say a decision removes needs-human and the script refuses any status: label; that file is a protected path the lane cannot change, and the job's if: gate already lets a needs-human unlabel with status: needs-decision th
  • The reservation closes the race between parallel apply-verdict runs only; work-unblock's sweep still adds agent-ready within its own room without counting reservations, so a sweep racing an apply-verdict run can still overshoot by one, as before this change
  • The no-overshoot argument assumes the issues API listing and issue events reads return a label another token just wrote; the REST docs read do not state this either way
  • A lanes App issue that was already admission-deferred before this change can still be re-admitted by work-unblock's sweep, which does not re-run decide() for it
  • docs/conventions/loop-lane/README.md:352 ('A listed human, by answering') left as written: it is the owner-decision table the recorded decision cites as its basis
  • Review was run here in a fresh-context subagent because no review-venue.txt was present
  • git status lists untracked .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile and .zshrc at the checkout root; Read finds none of them, so they look like sandbox mount placeholders and are not part of this change

Fix

  • .github/scripts/intake-triage/admit.mjs: new bodyHold (a Hold: line outside a code fence, any case, invisible characters dropped, NFKC); decide() refuses with hold a body Hold: line and a lanes App issue whose splitChildBody is null; admit() adds admission-deferred as a reservation first (re-added
  • .github/scripts/intake-triage/admit.test.mjs: tests for the Hold: line, the lanes App refusal through admit() and decide(), reservations (newer/older, live/stale, unreadable events, re-reserve), Promise.all bursts of 2/4/5 runs that never admit past the room, and a sequential run; the fake gains a s
  • .github/scripts/intake-reenter/reenter.mjs: a decision (or parked decision) on an issue carrying needs-human returns held and changes nothing; the decision path no longer removes needs-human; liftReenters accepts status: needs-decision, which the lift removes as its claim and restores on failure;
  • .github/scripts/intake-reenter/reenter.test.mjs: tests for the held decision, the lift from status: needs-decision, a lost claim and a failed dispatch restore, new quiet cases; fixtures that relied on needs-human removal updated
  • .github/actions/check-wip-cap/check-wip-cap.mjs: queued agent-ready issues read from GET /repos/{repo}/issues (oldest first, holds and pull requests filtered client-side) instead of search; list() takes a page reader; comments updated
  • .github/actions/check-wip-cap/check-wip-cap.test.mjs: fake answers the issues listing; tests for the read order, hold and pull-request filtering, paging; the 1,000-issue and incomplete-search expectations updated
  • .github/actions/check-wip-cap/action.yml: description says the queued issues come from the issues API
  • .github/scripts/work-unblock/label-unblocked.mjs: refusal() holds an otherwise-ready issue whose body has a Hold: line (close-event path leaves it unlabeled, deferred sweep keeps it deferred)
  • .github/scripts/work-unblock/label-unblocked.test.mjs: fake answers check-wip-cap's issues listing; a test that a Hold: body stays unlabeled on blocker close and a fenced one is labeled; stale comments removed
  • docs/conventions/pr-pipeline/README.md: intake-reenter paragraph (needs-human kept, lift from needs-decision), queued listing source, queued_truncated row, and the label-unblocked lag sentence updated
  • docs/conventions/loop-lane/posting-lanes.md: intake-reenter row describes the held decision and the lift
  • .changes/pr-pipeline/fix-10735-intake-admission-holds-3f9c2a7e.md: new patch fragment (written by hand: new-changelog-fragment refuses a detached HEAD)

Verification

The runner ran each check from the base copy against 9bf596f:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • read https: //docs.github.com/en/rest/issues /issues#list-repository-issues: GET /repos/{owner}/{repo}/issues takes comma-separated labels, state (default open), sort created|updated|comments (default created) and direction (default desc), and lists pull requests too, told apart by the `pull
  • read https: //docs.github.com/en/rest/search/search: the page describes timeouts and incomplete_results but makes no promise that results reflect recent changes (cited in the check-wip-cap comment and README)
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changelog-fragments: all 56 fragments valid
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-affected: 10 passed, 5 skipped over 12 changed files (first run failed comment-hygiene on a test comment naming an issue number; reworded and re-run)
  • cant-fail-scan --file <test> --check on admit.test.mjs, reenter.test.mjs, check-wip-cap.test.mjs and label-unblocked.test.mjs: PASS, no gating findings
  • fresh-context review subagent over the whole diff: no overshooting interleaving and no failing test found; fixed its findings (burst throughput via the reservation-order rule, 404 guard on the final unreserve, held log wording for status: confirmed, the work-unblock close-event Hold check, stale doc
  • second fresh-context review of the revised reservation logic and its tests: traced every new and changed test as passing and no N-run interleaving past the room; applied its hardenings (now read right after the reservation, 5 s tie window, sweep Hold check after readiness)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40952481182

Left out: the items under Not verified.

Related

#10735

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 9bf596fd4c647cac4d28d1883c14885a4c60d906: 0 finding(s), 0 as inline comments.

No security findings.

critical-findings: 0

I read the whole diff (12 files) and the PR context. No changed file matches a TRUSTED PATHS glob, and no plugin.json or marketplace.json changed, so there are no manifest <field> lines. The instruction-exception register was not consulted, because no standing instruction (CLAUDE.md, AGENTS.md, rules file, skill or hook) was deleted or softened. The PR context was treated as data. It holds no embedded directives to the lane.

What I checked:

  • Admission (admit.mjs) only gets stricter.
    • decide() now refuses and holds a lanes App issue unless splitChildBody is non-null (a trusted size-split sub-issue). It also holds any issue with a Hold: line outside a code fence. The path before the change admitted an App issue on a listed human's task-list comment. That path is closed.
    • bodyHold strips invisible characters and applies NFKC, so zero-width and fullwidth spellings of Hold: are held (the tests cover both). A > Hold: blockquote is not held, which is the same line form merge-holds.mjs uses for pull requests.
    • The sweep and close-event path in label-unblocked.mjs now apply the same body Hold: check. This only adds a stay-unlabeled case.
  • Reservation logic (admit()): every unreadable input fails closed. An unreadable deferred listing defers. A NaN event time counts as a live peer. An unreadable mine counts every live peer. An unreadable creation time treats every other issue as older. agent-ready is added before the reservation is removed, so a parallel run's issue is counted in one place or the other. Overshooting the cap is spend and pacing, not a security control.
  • Re-entry (reenter.mjs): a decision on a needs-human issue now returns held and changes nothing, and the decision path no longer removes needs-human. The new lift from status: needs-decision still requires the newest needs-human removal event to be a listed human's, and it checks the author, the issue state and the absence of agent-ready, needs-human and needs-triage. A failed dispatch restores status: needs-decision and removes needs-triage. An outsider cannot reach this path, because they cannot remove labels or be a listed human.
  • check-wip-cap: the queued read moves from search to the issues API, with pull requests and hold labels filtered client-side (hold names are lowercase constants, matched case-insensitively). A full tenth page without total_count yields unlisted: 1, which pauses admissions and fails closed. The search-incomplete flag no longer closes the queued read, but admissions still close through the other reads, and the search-incomplete test pins that.

Residual risk, all already in the PR's own "Not verified" list and none introduced here:

  • A lanes App issue that was admission-deferred before this change can still be re-admitted by the sweep, which does not re-run decide(). The close-event path likewise never ran decide(). Only the App itself can file such issues, so no outside author reaches them.
  • work-unblock's sweep still adds agent-ready without counting reservations, so it can overshoot the cap by one when it races an apply-verdict run. That is a pacing issue only.

Spend: this change adds reads on the issues API and extra GitHub REST calls per admission. It does not change any paid plan or billing setting, so there is no hold.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 9bf596fd4c647cac4d28d1883c14885a4c60d906: 0 finding(s), 0 as inline comments.

I found nothing to block in PR #11065. I read the whole diff and the PR context. I did not run any tests; the test results quoted in the PR body are author-claimed and unverified by me.

Closing issue #10735. Each criterion in the decision-amended done-when is met and has a test that would fail if it broke.

  • Body Hold: line: bodyHold and decide() are covered by the new admit.test.mjs cases, including fenced, quoted, invisible-character and full-width forms. The label-unblocked sweep and close-event paths have their own test.
  • Re-entry keeps needs-human: reenter.mjs returns held for a decision or parked decision on a needs-human issue and changes nothing. Tests check there are no writes and the labels are unchanged.
  • Lift from status: needs-decision: liftReenters accepts the status and removes it as the claim. Tests cover the success path, a lost claim, a failed dispatch that restores the label, and the quiet cases.
  • Lanes App issues: decide() holds an App-filed issue unless splitChildBody is non-null. Tests cover decide() and admit() through a dispatch, and the size-split child still admits.
  • No overshoot by parallel apply-verdict runs: I traced the reservation logic: admission-deferred goes on before the room is read, the other reservations are listed before status() runs, and agent-ready is added before the reservation comes off. Every ordering I traced counts a parallel admission at least once, so none can overshoot. The Promise.all burst tests of 2, 4 and 5 runs cover it.

Cost. None. The change adds API calls and runs but no billed resource.

Notes, not findings:

  • Two parallel runs whose reservations land within the 5 s tie window both defer when the room is 1, so neither admits until work-unblock's hourly sweep. This keeps the cap safe and is documented in the reservations comment, but a simultaneous burst can admit nothing for up to an hour. The tests use 10 s ticks, so they don't exercise this.
  • .github/workflows/intake-reenter.yml still carries comments saying a decision removes needs-human. The PR states it left them because the file is a protected path.
  • The PR body lists these limits itself:
    • A sweep racing an apply-verdict run can still overshoot by one.
    • Issues-API read-after-write consistency is not documented.
    • An issue that was already admission-deferred before this change can still be re-admitted by the sweep.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 9bf596fd4c647cac4d28d1883c14885a4c60d906. The lanes clear this reason on their own; the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/fix-ci is failure), which ci-status fails in the merge queue

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped fix-ci on this pull request: the lane could fix a failing check only by weakening a test, which is refused, so it runs one fresh fixer round on this head that must keep the test's assertions. The lane sets no label: the run ends in a failing pr-unblock/fix-ci status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=11065 -f activity=fix-ci

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 29, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped on this pull request and needs a person: the lane could fix a failing check only by weakening a required check, and the head has no fresh fixer round left (it ran one, or an earlier lane stop already spent its same-head retry), so a person decides.

  • Reason: ci-fix-weaken-required
  • Resume key: 9bf596fd4c647cac4d28d1883c14885a4c60d906 (the head the lane stopped on)

To resume, deal with the reason above, remove the needs-human label (and do-not-merge, if set), then dispatch the pr-unblock workflow with pr-number=11065 and activity=fix-ci:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=11065 -f activity=fix-ci

@kyle-sexton

Copy link
Copy Markdown
Member

Closing without merge: this pull request no longer fits the owner's intent.

Its main changes add holds against our own actors. decide() in .github/scripts/intake-triage/admit.mjs refuses every lanes App issue that is not a trusted size-split sub-issue and holds it for a person (a bot-author hold). intake-reenter keeps needs-human on a decision, so a lane stop stays parked for a person. The option (b) decision on #10735 (2026-10-29 20:24Z) chose that refusal. The owner's later standing direction, section 10, reverses it: "Holds that guard against our own actors (path holds, trust-path holds, person-approval holds, bot-author holds, pin/repin ceremony) are friction ... and come off now." The owner's answer to Q16 (2026-10-29, about 21:1xZ) says the same about our bots and Apps: "it isn't me, our bots, our apps, or our GitHub apps... we don't have that scenario, so we're adding unnecessary friction."

The part that still fits, stopping parallel apply-verdict runs from going past the queued cap (the admission-deferred reservation and check-wip-cap reading the issues API), protects the run budget. It can land on its own in a new pull request without the lanes App refusal and the kept needs-human.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix\(pr-pipeline\): intake admission follow-ups 3-7 from the #​9246 review - part 4 of 4

1 participant