Skip to content

An author can withdraw a superseded PR with end --withdraw - #425

Merged
renmengye merged 4 commits into
mainfrom
feat/withdraw
Sep 22, 2026
Merged

renmengye merged 4 commits into
mainfrom
feat/withdraw

Conversation

@renmengye

Copy link
Copy Markdown
Member

An author whose change was superseded had no legitimate move. gpt-speedrun#25's 4x SwiGLU change merged from another agent's PR while #25 sat in the gate; its author correctly declined a re-gate of identical solvers, but sessions hold no GitHub credentials, and none of the four verbs could retract a PR, so the run slept until a human closed it.

What changes

  • end --withdraw "<reason>": a withdrawal is a type of ending inside the existing end verb, no new surface. The CLI refuses it unless the kernel's budget file says the run has an open PR; the kernel re-checks the PR state itself.
  • After the session, the kernel journals the redacted reason on the run record, posts one marked comment ("Author withdrew: …"), closes the PR, and ends the run as rejected with that note. The six endings are unchanged: a withdrawn PR is a PR closed unmerged.
  • The close goes through the existing merge observer path, so the ledger tombstones the pending submission as it does for any closed PR, and a crash between the comment, the close and the terminal write is finished by the next tick.
  • The brief and the refreshed tool note tell authors the flag exists. The steward's initial session has no end verb; a steward resumed through the shared author path gets the same behaviour.

Compatibility

Surfaces: the end syscall gains an optional withdraw field; the run record gains stage.withdraw_reason until the terminal write; the kernel-written budget file gains open_pr. Old end requests stay valid (tested against the pre-change payload). Records without the intent behave as before, including all pre-change records and ended runs. No operator action. Do not roll back while a withdrawal is pending: an older kernel rejects the field and would not finish the close.

🤖 Generated with Claude Code

The kernel journals the redacted reason, posts one comment, closes the
PR and ends the run as rejected. Sessions still hold no credentials; the
verb is a type of ending, not a new surface.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 — reviewed head e3d0e5a8 — reviewer summarizer:hermes/gpt-5.6-terra over coverage+credentials+deployment+general+lifecycle+prose.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: nothing blocking — 2 advisory notes.

2 findings attached to the lines below.

Verdict: a withdrawal requested with --report loses the caller-supplied terminal report, with the report cleared in the end handler and the closed run bypassing subsequent final-text handling. Rejected findings: none; the deployment and prose findings are merged because they identify the same orchestrator location and failure, while coverage is retained separately because it identifies the corresponding attempt-layer location.

Comment thread src/outerloop/orchestrator.py Outdated
Comment thread src/outerloop/attempt.py Outdated
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@renmengye renmengye added the outerloop:review re-request the advisory review label Sep 21, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 — reviewed head fa3dd3a7 — reviewer hermes/gpt-5.6-terra.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: no defects found.

@renmengye renmengye added outerloop:review re-request the advisory review and removed outerloop:review re-request the advisory review labels Sep 21, 2026
The previous merge commit carried conflict markers.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 2 — reviewed head 3b2b31dd — reviewer hermes/gpt-5.6-terra.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: nothing blocking — 1 advisory note.

Advisory (non-blocking):

  • Unresolved merge markers are published in the changelog. Lines 8 through 22 contain Git conflict markers, so users see two conflicting Unreleased sections instead of a readable changelog. (CHANGELOG.md:8; high confidence)

One advisory finding: the changelog contains unresolved merge-conflict markers. Full test suite passed (2031 passed, 2 skipped), and Ruff passed.

@renmengye renmengye added outerloop:review re-request the advisory review and removed outerloop:review re-request the advisory review labels Sep 22, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 3 (re-run on the same head) — reviewed head 3b2b31dd — reviewer hermes/gpt-5.6-terra.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: no defects found.

@renmengye
renmengye merged commit 2719354 into main Sep 22, 2026
5 checks passed
@renmengye
renmengye deleted the feat/withdraw branch September 22, 2026 01:39
@renmengye renmengye mentioned this pull request Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

outerloop:review re-request the advisory review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant