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
fix(work-resolve-issue): stop a run when a listed human opens a PR for the issue mid-run #16748
A dispatched work-resolve-issue run keeps building and opens its pull request even when a listed human opens a draft pull request naming the same issue (Closes #N or Refs: #N) while the run is in progress. On #16646 this produced duplicate work twice in one night (lane PRs #16687 and #16722 against a local session's branch).
Cause
The checks that honour a human's open pull request run only before the run starts:
.github/scripts/intake-triage/admit.mjsopenPullsNaming, at admission;
.github/scripts/work-unblock/label-unblocked.mjshumanPull, when work-unblock re-fires a run.
The only in-run re-check, .github/scripts/work-resolve-issue/check-blockers.mjs with RECHECK=true, reads the issue's blocker dependencies, not open pull requests.
Fix
Before the lane pushes its branch and opens its pull request, read the open pull requests naming the issue (reuse openPullsNaming or humanPull) and stop the run without pushing when a listed human's pull request is open, routing it like the admission-time hold.
Acceptance
A run whose issue gains a listed human's open (draft or ready) pull request naming it before the lane's push stops without pushing or opening a pull request.
A test covers the check with a human pull request present and absent.
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: the work-resolve-issue write path (a new pre-push script step, the workflow step wiring, a shared helper in intake-triage/admit.mjs and its tests); read and run by the issue lane.
Reversible: yes; revert the change and the lane returns to checking human pull requests only at admission.
Open questions: none
Understood: a dispatched run should re-check, before it pushes, whether a listed human has opened a draft or ready pull request naming the issue, and stop without pushing or opening a pull request if so.
Decision recorded by the owner's batch answer:
Decision recorded. The acceptance checklist below adopts intake's recommended answers to the refinement's three questions, under the owner's answer to the batch question for issues with only implementation questions.
Owner's answer, 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."
[quote truncated; the full decision is at the link]
This settles the open questions: the check runs after the build and before the push, the stop reuses the deferred or blocked-by-pr route, and one shared helper is built on openPullsFor. The pre-push steps live under .github/workflows/, so the issue keeps its host-run routing. No duplicate or merged fix found among the listed open issues and pull requests.
Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).
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: Before the lane pushes its branch, a run re-reads the issue's open pull requests and stops without pushing or opening a pull request when a listed human's draft or ready pull request names the issue; a test covers both cases.
Open questions
Where does the lane push its branch and open its pull request, and so where does the new check run? I found no push step in work-resolve-issue.yml or pr-run-activity-read.yml, so the push seems to happen inside the model job and a script step may have nothing to gate.
RECOMMENDED: Add a no-model script step in .github/scripts/work-resolve-issue/ that runs after the build and before the push or PR step, and sets a stop output so the push is skipped. If the agent itself pushes, put the check in the step that precedes it. Basis: judgment: no push match in .github/workflows/work-resolve-issue.yml; .github/workflows/pr-run-activity-read.yml:688-705 shows the only in-run check is check-blockers RECHECK
How should the stop be routed, given the issue says 'like the admission-time hold'? Admission defers the issue with a wait comment; an in-run stop could instead use a route from stop-routes.json.
RECOMMENDED: Reuse the existing deferred or blocked-by-pr route so the issue keeps agent-ready, work-unblock re-fires it once the human pull request closes, and the comment names the pull request. Basis: .github/scripts/work-unblock/label-unblocked.mjs:1179-1183 and .github/scripts/work-resolve-issue/stop-routes.json
Which helper does the check reuse? humanPull is private to label-unblocked.mjs, while openPullsFor in admit.mjs is exported but does not filter by listed human.
RECOMMENDED: Call openPullsFor from admit.mjs, then read each pull and keep it when state is open and its user id is in the trusted humans list, as humanPull does; export a shared helper rather than copying. Basis: .github/scripts/work-unblock/label-unblocked.mjs:2198-2206 and .github/scripts/intake-triage/admit.mjs:492-500
Sources read
.github/scripts/intake-triage/admit.mjs:380-387: openPullsNaming returns open pull numbers that close the issue or name it by a Refs line
.github/scripts/intake-triage/admit.mjs:492-500: openPullsFor reads the timeline and closing pulls fresh
.github/scripts/work-unblock/label-unblocked.mjs:2198-2206: humanPull keeps an open pull whose author is a listed human
.github/scripts/work-resolve-issue/check-blockers.mjs:117-122: RECHECK reads only blocked_by, not pull requests
.github/scripts/intake-triage/admit.test.mjs:659-673: existing tests for openPullsNaming
.github/scripts/work-unblock/label-unblocked.test.mjs:5053-5057: existing human pull test fixtures
To answer, post a comment that starts with this line:
**Decision recorded.** <answer>
Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.
Decision recorded. The acceptance checklist below adopts intake's recommended answers to the refinement's three questions, under the owner's answer to the batch question for issues with only implementation questions.
A (recommended, chosen): an agent session posts a **Decision recorded.** comment on each, adopting triage's own answers as the acceptance checklist, so admission takes them.
B: the owner reviews each first.
Owner's answer, 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."
The owner approved this agent session posting triage's answers as the checklist; he did not answer each implementation question himself. Triage found no open questions (triage). The answers adopted are the RECOMMENDED lines of the refinement:
The check runs in the write path after the build and before the push: a no-model script step under .github/scripts/work-resolve-issue/ that sets a stop output so the push is skipped (or, if the agent itself pushes, the check sits in the step before it).
The stop reuses the existing deferred or blocked-by-pr route, so the issue keeps agent-ready, work-unblock re-fires it once the human pull request closes, and the comment names that pull request.
One exported shared helper calls openPullsFor from admit.mjs and keeps only open pull requests whose author is a listed human, as humanPull does, instead of copying either.
This is host work: the write job's pre-push steps are in .github/workflows/, a path the issue lane refuses.
Acceptance criteria
A shared helper, exported once, returns the open (draft or ready) pull requests that name the issue (Closes #N or Refs: #N) and whose author is a listed human, built on openPullsFor from .github/scripts/intake-triage/admit.mjs with the listed-human filter humanPull applies, and the new check calls it rather than copying either.
A work-resolve-issue run whose issue gains such a pull request before the lane's push stops without pushing or opening a pull request.
The stop takes the existing deferred or blocked-by-pr route, and its comment names the human's pull request.
A test covers the check with a listed human's pull request present and absent, and one with only a non-listed author's pull request.
Activity
github-actions commentedon Nov 17, 2026
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: the work-resolve-issue write path (a new pre-push script step, the workflow step wiring, a shared helper in intake-triage/admit.mjs and its tests); read and run by the issue lane.
Reversible: yes; revert the change and the lane returns to checking human pull requests only at admission.
Open questions: none
Understood: a dispatched run should re-check, before it pushes, whether a listed human has opened a draft or ready pull request naming the issue, and stop without pushing or opening a pull request if so.
Decision recorded by the owner's batch answer:
#16748 (comment)
This settles the open questions: the check runs after the build and before the push, the stop reuses the deferred or blocked-by-pr route, and one shared helper is built on
openPullsFor. The pre-push steps live under.github/workflows/, so the issue keeps itshost-runrouting. No duplicate or merged fix found among the listed open issues and pull requests.Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 17, 2026
Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (
.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Nov 17, 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: Before the lane pushes its branch, a run re-reads the issue's open pull requests and stops without pushing or opening a pull request when a listed human's draft or ready pull request names the issue; a test covers both cases.
Open questions
RECOMMENDED: Add a no-model script step in .github/scripts/work-resolve-issue/ that runs after the build and before the push or PR step, and sets a stop output so the push is skipped. If the agent itself pushes, put the check in the step that precedes it. Basis: judgment: no push match in .github/workflows/work-resolve-issue.yml; .github/workflows/pr-run-activity-read.yml:688-705 shows the only in-run check is check-blockers RECHECK
RECOMMENDED: Reuse the existing deferred or blocked-by-pr route so the issue keeps agent-ready, work-unblock re-fires it once the human pull request closes, and the comment names the pull request. Basis: .github/scripts/work-unblock/label-unblocked.mjs:1179-1183 and .github/scripts/work-resolve-issue/stop-routes.json
RECOMMENDED: Call openPullsFor from admit.mjs, then read each pull and keep it when state is open and its user id is in the trusted humans list, as humanPull does; export a shared helper rather than copying. Basis: .github/scripts/work-unblock/label-unblocked.mjs:2198-2206 and .github/scripts/intake-triage/admit.mjs:492-500
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 17, 2026
Decision recorded. The acceptance checklist below adopts intake's recommended answers to the refinement's three questions, under the owner's answer to the batch question for issues with only implementation questions.
Question as put to the owner (Q42, covering #15499, #16352, #16353, #16524, #16579 and #16748): six issues with only implementation questions.
**Decision recorded.**comment on each, adopting triage's own answers as the acceptance checklist, so admission takes them.Owner's answer, 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."
The owner approved this agent session posting triage's answers as the checklist; he did not answer each implementation question himself. Triage found no open questions (triage). The answers adopted are the RECOMMENDED lines of the refinement:
.github/scripts/work-resolve-issue/that sets a stop output so the push is skipped (or, if the agent itself pushes, the check sits in the step before it).agent-ready, work-unblock re-fires it once the human pull request closes, and the comment names that pull request.openPullsForfromadmit.mjsand keeps only open pull requests whose author is a listed human, ashumanPulldoes, instead of copying either.This is host work: the write job's pre-push steps are in
.github/workflows/, a path the issue lane refuses.Acceptance criteria
Closes #NorRefs: #N) and whose author is a listed human, built onopenPullsForfrom.github/scripts/intake-triage/admit.mjswith the listed-human filterhumanPullapplies, and the new check calls it rather than copying either.work-resolve-issuerun whose issue gains such a pull request before the lane's push stops without pushing or opening a pull request.Posted by an agent session.
github-actions commentedon Nov 17, 2026
A listed human released the issue's Work status hold, so it goes back to intake triage.
fix(work-resolve-issue): stop a run before its push when a listed hum…