Repository navigation
Idempotent improved-wake publish (last activation-blocker) - #115
Conversation
A wake that opened the PR but died before recording it left the run WAITING; the re-wake re-pushed non-fast-forward and opened a duplicate PR (or recorded ABORTED over a live PR). resume_run now checks find_open_pull_for_head first (new GitHubClient method: GET /pulls?head=owner:branch&state=open) and, when a PR is already open for the run's head, reconciles the record to in-review on that PR — no re-push, no duplicate, snapshot dropped. Best-effort: a lookup failure falls through to the normal publish. Test: a re-wake with an existing open PR reconciles (no new PR, not re-armed, in-review, snapshot released). Full gate green (mypy after format), 672 tests. This closes the last dispatcher activation-blocker. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Round 1 — reviewed head c83bbab1 — reviewer hermes/gpt-5.6-terra.
second opinion — terra
Advisory findings from autoresearch — the code owner decides. Reply to disagree; the autoresearch:no-review label opts this PR out.
Verdict: nothing blocking — 1 advisory note.
1 finding attached to the lines below.
There was a problem hiding this comment.
Round 2 (re-run on the same head) — reviewed head c83bbab1 — reviewer hermes/gpt-5.6-terra.
second opinion — terra
Advisory findings from autoresearch — the code owner decides. Reply to disagree; the autoresearch:no-review label opts this PR out.
Verdict: nothing blocking — 1 advisory note.
1 finding attached to the lines below.
There was a problem hiding this comment.
Round 1 — reviewed head c83bbab1 — reviewer claude/claude-opus-5.
Advisory findings from autoresearch — the code owner decides. Reply to disagree; the autoresearch:no-review label opts this PR out.
Verdict: 1 blocking, 3 advisory.
3 findings attached to the lines below.
Advisory (non-blocking):
- New test does not check the workspace branch after reconcile (
tests/test_climb.py:2404; medium)
The broad except Exception around find_open_pull_for_head also swallows AttributeError, so any test double lacking the new method silently falls through to the normal publish; that is intended best-effort behavior but hides interface drift. I could not run the test suite (read-only checkout), so the claim of 672 passing tests is unverified. Whether a follow-up push to the default branch would actually land depends on the target repo's branch protection, which is outside this context.
claude flagged the minimal early-return reconcile as too minimal. Now the reconcile does the full improved terminal, only skipping the push + create_pull the prior wake already did: - find_open_pull_for_head filters by BASE too (owner:branch INTO base), so a same-branch PR to a different base is never mis-adopted; returns the raw PR dict (html_url/number/draft); - checks out the branch (a later follow-up expects the workspace on it); - ARMS auto-merge on the adopted PR when it is not a draft (arming sits inside the very crash window this targets, so the prior wake may have missed it); - writes report.md and posts the issue completion, like the normal exit; - records in-review and drops the snapshot. Test updated: the adopted PR is armed, no duplicate PR, in-review, snapshot released. Full gate green (mypy after format), 672 tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Round 2 — reviewed head c6b4bb26 — reviewer claude/claude-opus-5.
Advisory findings from autoresearch — the code owner decides. Reply to disagree; the autoresearch:no-review label opts this PR out.
Verdict: nothing blocking — 5 advisory notes.
1 finding attached to the lines below.
Advisory (non-blocking):
- Reconcile skips the issue comment that reports the finished run (
src/autoresearch/climb.py:610; medium) - A failed lookup still leads to the duplicate/abort it is meant to prevent (
src/autoresearch/climb.py:591; medium) - Reconcile writes no run report (
src/autoresearch/climb.py:605; low) - Question: Reconcile does not put the workspace on the PR branch (
src/autoresearch/climb.py:597; low)
I could not run the test suite (read-only checkout, no execute tool), so the "672 tests green" claim is unverified. The new test does exercise the reconcile branch genuinely: with the check removed, FakeGitHub.create_pull would append and github.prs == [] would fail.
|
False positive on the current head ( |
The last dispatcher activation-blocker. A wake that opened the PR but died before recording it left the run
WAITING; the re-wake re-pushed non-fast-forward and opened a duplicate (or recorded ABORTED over a live PR).resume_runnow asksfind_open_pull_for_head(newGitHubClientmethod —GET /pulls?head=owner:branch&state=open) before publishing, and if a PR is already open for the run's head, reconciles the record toin-reviewon that PR — no re-push, no duplicate. Best-effort: a lookup failure falls through to the normal publish.Test: a re-wake with an existing open PR reconciles (no new PR, not re-armed, in-review, snapshot released). Full gate green, 672 tests.
With this in, the dispatched path can be turned on (
AUTORESEARCH_DISPATCH_WAKE).🤖 Generated with Claude Code