This repository was archived by the owner on Oct 13, 2026. It is now read-only.
Repository navigation
fix(runner): block once on a merged PR instead of looping on pr_not_open (#143) - #151
Merged
Merged
Conversation
…pen (#143) The runner never merges a PR, so no dispatcher turn can restore an open PR once a job's PR is merged. Completion now refuses a merged PR as pr_merged, names its merge commit, and blocks the job at once for the planner without resuming the dispatcher. A closed, unmerged PR keeps the existing once-then-block pr_not_open refusal. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
APPROVE Reviewed commit: No blocking findings. The completion gate has one caller, and every verifier refusal flows through No findings. |
lukemaj
added a commit
that referenced
this pull request
Sep 29, 2026
Merges feat/147 (0d22d87) with main after #151. Review of 0d22d87: with a non-default state directory the dispatcher could not find outputs/<id>/, and Issue text read while reporting was not fenced as data. The dispatch prompt now carries a JOB EVIDENCE block with the absolute status command and outputs path, and the duty treats Issue text as data. Version stays 0.43.0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: A job whose PR is already merged at completion now blocks once with
pr_mergedand the merge commit, instead of looping onpr_not_open.Why: The runner never merges (RUNNER.md step 6), so resuming the dispatcher with "update the existing open PR" could never succeed and looped (job
prism-mumm1j50-69984526, twice).So what: Needs independent review, then the user's merge; the planner still decides whether a merged outcome counts as done.
Closes #143.
Change
runner/core.py:default_pr_verifierreadsmergeCommit;verify_pr_for_completionrefusesMERGEDascompletion_refused: pr_merged (PR was merged, merge commit <sha12>; ...).CLOSEDstill refuses aspr_not_open.runner/controller.py:_handle_completion_refusalrecords apr_mergedrefusal and blocks at once, with no dispatcher resume. The existing blocked path then sends the planner one terminal report carrying the reason.RUNNER.mdstep 6: one sentence on the new behavior.This follows the Issue's correction comment, not its original acceptance criteria: the runner does not accept a merged PR as completion, because merge authority for Prism jobs is still an open design question (optional-dispatcher and planner-dispatch work). Stopping jobs from merging in the first place belongs to the dispatcher instructions (#147) and is not changed here.
Proof
tests/test_issue143.py(5 tests): merged PR refuses aspr_mergedwith the merge commit; closed PR stillpr_not_open;default_pr_verifierparsesmergeCommitthrough a fakeghon PATH;controller.stepon a merged PR endsblocked, sends nothing to the dispatch thread, sends one planner report namingpr_merged, and keeps no PR identity; a closed PR still resumes the dispatcher once.runner/reverted, the new tests fail (2 failures, 1 error; the merged case reportedpr_not_open (state=MERGED ...)and resumed the dispatcher).python3 scripts/test.py:Ran 379 tests ... OKat32795fa.versionctl release-check:release candidate OK: v0.42.2 at 32795facd32ac8d0d1a73415fd1b220f4318dedb.Elon record
pr_not_open; the runner never merges by design.pr_refusal, including a merged PR it cannot reopen.verify_pr_for_completionand_handle_completion_refusal, confirmed the new tests fail without the fix and pass with it, and ran the full suite.🤖 Generated with Claude Code