fix: verify PR state before acting; never post to a closed/stale PR (#85) - #86
Merged
Merged
Conversation
) A user saw the agent report posting changes to PR #29, which was already closed — it had carried the number over from earlier in the session and acted on it without checking. - fix-pr / pr-fixer: resolve the PR from the current branch and require state == OPEN before gathering findings, pushing, commenting, or resolving threads. CLOSED/MERGED -> stop and offer reopen / fresh PR / point-at-the-right-one, never a false "posted" report. No PR -> create-pr. - create-pr: check for an existing open PR on the branch (update rather than duplicate), refuse to reuse a closed PR's number, and report only the URL the create call actually returned. - coding-agent + portable work-story ship step reinforced. - Rule throughout: never trust a PR number from memory; re-resolve from the branch. Bundle rebuilt; validator + 35 tests pass. Kit -> 0.19.14. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
Fixes #85.
The report
The agent sent changes and reported posting them to PR #29 — already closed. It reused a PR number from earlier in the session and acted on it without checking state.
The fix — a PR-state guard (same doctrine as #83)
fix-pr/pr-fixer— new step 0: resolve the PR from the current branch and requirestate == OPENbefore gathering findings, pushing, commenting, or resolving threads.CLOSED/MERGED→ stop and offer the real options (reopen / open a fresh PR / point at the right one), never a false "posted" report. No PR for the branch → that'screate-pr.create-pr— check for an existing open PR on the branch (update it instead of duplicating), refuse to reuse a closed PR's number, and report only the URL the create call actually returned.coding-agent+ portablework-storyship step reinforced.Verification
node --test35/35, rebuild a no-op, source/bundle byte-identical.🤖 Generated with Claude Code