fix(heartbeat): stop welding a stale reviewState onto a new same-PR review instance (BLO-22229) - #1063
Closed
allyblockcast[bot] wants to merge 2 commits into
Closed
fix(heartbeat): stop welding a stale reviewState onto a new same-PR review instance (BLO-22229)#1063allyblockcast[bot] wants to merge 2 commits into
allyblockcast[bot] wants to merge 2 commits into
Conversation
…eview instance (BLO-22229)
mergeCoalescedContextSnapshot spread `{...existing, ...incoming}` over the
review-content keys (githubPrReviewState/Body/AuthorLogin/...). A new
review-instance wake that doesn't carry its own reviewState — every
issue_comment-sourced `github_pr_review_feedback` wake, since that branch
never sets a formal state — inherited whatever reviewState an EARLIER,
unrelated review instance on the same PR happened to leave behind. Observed:
a comment-shaped Ally review carrying Critical findings got composed with a
prior human APPROVED, producing a directive that told the PR author to merge
a PR carrying unresolved critical findings.
Treat the review-content key block as owned outright by whichever wake most
recently reported it: when the incoming wake is itself a review-instance wake
(github_pr_review_submitted or github_pr_review_feedback), any review-content
key it doesn't re-supply is cleared rather than inherited, mirroring the
existing BLO-19118 handling for cross-PR contamination.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Author
1 similar comment
Author
Author
|
Hey @allyblockcast[bot]! Before this PR can be reviewed, a few things need attention: Missing or incomplete:
Once updated, push a new commit and these checks will re-run automatically. — commitperclip |
Author
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Important Issues (1)
Strengths
Recommended Action
|
13 tasks
|
Superseded by #1064, which carries the same BLO-22229 fix plus the follow-up for this review feedback from a human-authored branch so Ally can review it. |
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.
Thinking Path
Linked Issues or Issue Description
Refs: https://paperclip.blockcast.net/BLO/issues/BLO-22229
Refs: https://paperclip.blockcast.net/BLO/issues/BLO-19118
Bug: Same-PR review wake coalescing could compose context from two different review instances. A later comment-shaped review lacked its own formal
reviewStateand inherited an earlier approval; a later formal review could also keep an older actionable review-feedback comment inwakeCommentIds, causing the rebuiltpaperclipWake.commentspayload to reload superseded findings.What Changed
github_pr_review_submittedandgithub_pr_review_feedbackwakes as fresh review instances that own review-content fields outright.github_pr_review_feedbackcomment ids out of the existing wake-comment set when a same-PR review instance replaces the prior review context.Verification
PATH=/opt/homebrew/bin:$PATH pnpm install --frozen-lockfilePATH=/opt/homebrew/bin:$PATH pnpm exec vitest run server/src/__tests__/heartbeat-context-summary.test.ts server/src/__tests__/heartbeat-workspace-session.test.ts --no-file-parallelism --maxWorkers=1(283 passed)PATH=/opt/homebrew/bin:$PATH pnpm --filter @paperclipai/server typecheckPATH=/opt/homebrew/bin:$PATH pnpm exec vitest run server/src/__tests__/workspace-runtime.test.ts --testNamePattern "provisions worktree-local pnpm node_modules instead of reusing base-repo links" --no-file-parallelism --maxWorkers=1(2 passed, 116 skipped)PATH=/opt/homebrew/bin:$PATH pnpm exec vitest run server/src/__tests__/heartbeat-queued-backlog-convergence.test.ts --no-file-parallelism --maxWorkers=1(11 skipped locally)Risks
Low to moderate risk. The change is scoped to heartbeat coalescing for GitHub review-instance wakes. The main behavior shift is intentional: a new review instance no longer inherits stale review-content fields or stale review-feedback comments from a prior review instance. Non-review wakes still inherit existing review context.
Model Used
Codex GPT-5 coding agent with shell, GitHub CLI, and local test execution.
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template