Repository navigation
fix(pr-management-code-review): verify a review posted instead of retrying - #1300
Merged
Merged
Conversation
…rying
`gh pr review` prints nothing on success. posting.md gives the recipes
with no post-condition, so empty output reads as a failure and invites a
re-run — which submits the review a second time.
The duplicate cannot be withdrawn. GitHub deletes only pending reviews:
DELETE /repos/{owner}/{repo}/pulls/{n}/reviews/{id} answers `422 Can not
delete a non-pending pull request review` once it is submitted. The only
repair is to PUT the body down to a pointer at the real review, leaving a
confused thread on a contributor's PR.
Hit while reviewing a queue of provider PRs against a large adopting
project: an empty result was read as a failed call, the command was
re-run, and the PR ended up carrying two identical reviews.
Documents that a zero exit means the review posted whatever it printed,
and gives the reviews-API query to confirm the post-condition before any
retry. Extends the same rule to `gh pr comment` and the
addPullRequestReview mutation.
Generated-by: Claude Opus 5
12 of 21 tasks
potiuk
added a commit
that referenced
this pull request
Sep 21, 2026
Three defects, found while doctoring a sandbox where `podman` worked by hand but not through the gateway. Backend discovery trusted `podman machine inspect` for the socket path. That command renders the path from the *caller's* TMPDIR, not the machine's, so a hook, agent, or launchd service whose TMPDIR differs is told a path that does not exist and discovery reports no backend at all. Only the basename is stable, so the finders now return candidate lists and `discover` takes the first that exists, with the per-user temp directory from `getconf DARWIN_USER_TEMP_DIR` as the second podman candidate. `_docker_socket` gets the same shape: the context result and the `~/.docker` fallback are now both candidates rather than either/or. `CONTAINER_HOST` / `DOCKER_HOST` were committed in the baseline with a project-relative `unix://./…` value. That can never have worked: a `unix://` URL's authority is parsed as a host component, so `unix://./x` dials `/.//x`, `unix://x` dials `/x/`, and `unix:x` dials `//`. Only `unix:///abs/path` connects, and an absolute path is per-machine, so both variables move out of the committed baseline and join the `allowUnixSockets` pair in the gitignored `.claude/settings.local.json`. The spec had recorded this as a resolved open question in favour of the relative form, concluded from URL parsing rather than a connection; it now records what actually happens. The TMPDIR troubleshooting entry prescribed `env.TMPDIR` in project settings to get a per-project scratch directory. Claude Code sets TMPDIR itself when it builds the sandbox and that assignment wins, so the setting is accepted and silently does nothing. The entry now says so, and the doctor's probe 4 reports a shared session root as a pass instead of sending the operator after a fix that cannot work. Probe 3 gains an explicit check for a non-absolute value, because stripping `unix://` leaves a relative path that stats fine and hides the real cause. Also fixes an unrelated blocker found on the way: the touch overlay polled `lsof -U -n` before the O(1) `signing_in_flight` check, and on a loaded host that enumeration outlasts the signature it is meant to observe, so the overlay never appeared and its test failed one run in three. Asking the cheap question first keeps `lsof` out of the hot loop on the wrapped path entirely. Specs are synced to main: the two pr-management-code-review fixes (#1299, #1300) are recorded in the family contract, the GitHub Copilot harness from #1287 gets copilot-runtime.md, and .last-sync moves to the current tip. Generated-by: Claude Opus 5
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
gh pr reviewprints nothing on success.posting.mdgives the recipes with no post-condition, so empty output reads as a failed call and invites a re-run — which submits the review a second time.DELETE /repos/{owner}/{repo}/pulls/{n}/reviews/{id}answers422 Can not delete a non-pending pull request reviewonce submitted. The only repair is toPUTthe body down to a pointer at the real review, which leaves a visibly confused thread on a contributor's PR.gh pr commentand theaddPullRequestReviewmutation.Hit while reviewing a queue of provider PRs: an empty result was read as a failure, the command was re-run, and the PR ended up carrying two identical reviews that could not be removed.
Type of change
plugins/magpie-pr-management/skills/code-review/)Test plan
prek run --files <changed>passesNo eval fixture. The existing suites test model decisions from PR state; this change documents a shell post-condition after the posting command runs.
review-handoffis the nearest suite, but its action enum (post/dry-run-skip/re-draft/skip/quit) has no slot for a post-condition check, and inventing a suite for a two-paragraph procedural note would add a fixture that tests nothing real. Happy to add one if a maintainer would rather extend that enum.RFC-AI-0004 compliance
Prose authored with AI assistance;
Generated-by:trailer on the commit, noCo-Authored-By:.