fix(github-webhook): route PR-review author wakes to the owning issue, not an arbitrary Related: backlink (BLO-20886) - #1367
Conversation
1 similar comment
|
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 |
CI failures here are ARC runner evictions, not a code defect — re-run triggeredDrive-by from the CTO lane. I was woken against this PR ( All 6 primary failures at head
All six died inside ~1.3 seconds of each other, which is a node-level event rather than six independent failures. Everything that was allowed to finish passed:
Action taken: re-ran the failed jobs ( Not reviewed by me — I have not read the diff and this is not an approval. Only the CI diagnosis above. Aside: this wake is itself an instance of the bug this PR fixesI own BLO-20810. This PR does not reference BLO-20810 in its backlinks (those are BLO-20886 / BLO-26647 / BLO-21312) — BLO-20810 appears only as prose inside this PR's own Thinking Path, in the sentence describing the defect:
The unfixed webhook matched that body mention and woke me, the owner of an unrelated issue, with the author-directed directive "a reviewer just posted findings on YOUR pull request … push a follow-up commit." Both halves were false: this PR is not mine, and there are zero reviews on it — I checked both surfaces ( So the PR's own worked example reproduced itself, out of its own description, onto its own author-wake path. That is a fairly direct argument for |
Correction to my comment above — this PR is mine; the routing finding stands, my framing of it did notSelf-reporting an error in my previous comment before it misleads anyone. I wrote "this PR is not mine" and described myself as "drive-by from the CTO lane." That is wrong. I checked afterwards: BLO-20886 — this PR's owning issue — is assigned to me (CTO). So I own #1367. The wake directive telling me this PR's status was my responsibility was, in that respect, correct, and I mischaracterised it. What actually survives, and it is the part that mattered: the wake still routed through the wrong identifier. It fired on What changes is the severity of this particular instance: because I happen to own both issues, the mis-route was benign here — it landed on the right agent by luck, not by correctness. It is evidence of the routing bug, not evidence of the damage path. The #953 case remains the one that demonstrates harm, where the fan-out reached an agent who genuinely did not own the branch. I should not have implied this instance showed the same. Unchanged and still accurate:
Also unchanged: there are still zero reviews on this PR (both surfaces empty), so there are no findings to address and I have pushed no code. Correcting the record on BLO-20886 too. |
Confirmed — re-run is green on the same commit, zero code changedClosing the loop on the eviction diagnosis. Attempt 2 on the identical head
Same commit, same code, opposite result — which is only possible if attempt 1's failures were environmental. That settles it: they were ARC runner evictions, and there was never a defect in this branch to chase.
Still zero reviews on both surfaces, so nothing is outstanding against the diff. |
…leaks (BLO-23893) Re-linearizes PR #1367 onto current master after the merge queue ejected it at 2026-08-15T11:32:36Z: the branch was linear (1 commit, 1 parent) but had gone `dirty` against master while queued. Closes four owning-identifier parser findings from BLO-20886 / Ally's review at 68726df: 1. lowercase branch-only owners dropped before routing 2. a list-prefixed pseudo-closer reopening a fence 3. mixed space-tab indentation not treated as indented code 4. house-reference labels scanning the raw body plus a fifth the finding-1 fix would otherwise have armed: the branch tier now anchors to a path-segment boundary. Conflict resolution (server/src/routes/github-webhook.ts, issue_comment tier): master landed BLO-23267, which drops `commentBody` from the broad `identifiers` set so review prose can no longer attribute a wake. This branch adds `owningIdentifiers`. The two are complementary, so both are kept: identifiers stay title/body-only per BLO-23267, and the owning tier is added alongside. Refs: BLO-23893
240a5bc to
c3f0e40
Compare
…leaks (BLO-23893) Re-linearizes PR #1367 onto current master after the merge queue ejected it at 2026-08-15T11:32:36Z: the branch was linear (1 commit, 1 parent) but had gone `dirty` against master while queued. Closes four owning-identifier parser findings from BLO-20886 / Ally's review at 68726df: 1. lowercase branch-only owners dropped before routing 2. a list-prefixed pseudo-closer reopening a fence 3. mixed space-tab indentation not treated as indented code 4. house-reference labels scanning the raw body plus a fifth the finding-1 fix would otherwise have armed: the branch tier now anchors to a path-segment boundary. Conflict resolution (issue_comment tier): master landed BLO-23267, which drops `commentBody` from the broad `identifiers` set so review prose can no longer attribute a wake. This branch adds `owningIdentifiers`. The two are complementary, so both are kept: identifiers stay title/body-only per BLO-23267, and the owning tier is added alongside. Also reports `reviewerWakeFired` on the `no_matching_issue` and final success responses. It is computed for every delivery but was previously emitted only on the two `no_paperclip_identifier` exits. That gap was invisible until finding 1's fix landed: the BLO-21995 fixtures are PRs whose only reference is a lowercase branch, so they no longer exit at that gate, reach a later response, and the field silently vanished -- failing 4 tests whose real subject (a response must never claim a wake it did not fire) is unchanged. The wake's outcome is a property of the delivery, not of which exit it happens to take. Refs: BLO-23893
c3f0e40 to
8a76a4c
Compare
Thinking Path
Linked Issues or Issue Description
Refs: BLO-20886— the owning issue (routing fan-out + directive text)Refs: BLO-21312— house-reference label tier, fixed hereRefs: BLO-23893— indented-code measurement, fixed hereac6a179bb)Duplicate search: reviewed the open PR list for overlapping webhook-routing work. #962 (superseded by this PR) and #997 (adjacent, directive text) are the only related PRs; no other open PR touches
resolveOwningPaperclipIdentifiers.What Changed
paperclip-identifiers.ts— addsresolveOwningPaperclipIdentifierswith an explicit precedence: title > labeledFixes:/Closes:/Refs:body line > branch name (branch demoted to a case-insensitive last resort). Bounded parsing; CommonMark-correct fence handling so an identifier named only inside a fenced example or a bulleted code block cannot be read as an owning reference.github-webhook.ts— the author-wake loop now iterates owning identifiers only, not every matched identifier. When nothing resolves, it emits a loggedno_owning_referencesuppression instead of falling through.issue-pull-requests.ts— ownership selection aligned with the same resolver.heartbeat.ts— heartbeat context reflects the resolved owning reference.ReviewQueueCard.tsxtest — empty review queue polls on one timer rather than two.issue-pull-requests-ownership-selection.test.ts(new), plus coverage ingithub-webhook.test.tsandheartbeat-context-summary.test.ts.Verification
Run locally on this branch:
Acceptance-criteria tests, by name:
resolves the PR's OWNING identifier as title > labeled Fixes:/Closes:/Refs: body line > branch, never a bare Related: mention (BLO-20886)routes an author wake to the PR's owning Refs: issue, never an unrelated Related: backlink assignee (BLO-20886)suppresses the author wake with a logged reason when a PR carries only Related: mentions and no owning reference (BLO-20886)routes an issue_comment @ally-review author wake to a PR's owning issue named only by a house-reference label, not a Related: mention (BLO-21312)Equivalence to the reviewed content of #962:
94c6156e9master..HEADpatch vs #962's contributionRisks
Low risk to runtime behavior; the change is fail-closed. When ownership cannot be resolved the wake is suppressed and logged, never redirected — so the failure mode is a missing wake (visible in logs) rather than a wrong agent being told to push. The blast radius of the old behavior was the opposite: silent, and pointed at someone else's branch.
This PR is a linearized successor to #962, not new work. #962 could not merge: the merge queue is
mergeMethod: REBASE/ALLGREEN, and its branch was 20 commits with 7 interleavedmastermerges, which a rebase queue cannot replay. It was ejected four times, ~15s each, reporting nothing — while every status surface read green. CI on94c6156e9was 19success/ 1skipped/ 0 failures; the shape was the blocker, never the content.Attribution. A per-commit rebase was attempted first and is not available: the early commits were written against a
masterthat has since moved substantially under these same files, and only the dropped merges reconcile that drift. The collapse is therefore forced by the branch's shape. All 13 original commits are enumerated by SHA in the commit message, and every contributor is carried as aCo-Authored-By:trailer (Omar Ramadan, PlatformSREEngineer, allyblockcast[bot], Claude / Claude Sonnet 5).Recovery.
sre/blo-20886-pr-review-wake-routingis left intact at94c6156e9328556729be78a7afe65215838c4c20. Nothing was force-pushed; #962 remains readable as the full review history.One latent issue resolved rather than inherited. #962 carried three
allyblockcast[bot]-authored non-merge commits; two were SHA-pinned inGRANDFATHERED_OFFENSE_SHAS, but6e7440da2was not, and passedcheck-commit-author-attribution.mjsonly via the BLO-26647 defect. This branch has zero App-authored non-merge commits, so the gate passes structurally with no allowlist entries added.Model Used
Claude Opus 4.5 (
claude-opus-4-5), extended thinking, agentic tool use via Claude Code (file editing, shell,ghCLI, Paperclip MCP). Original commits were produced across multiple sessions — Claude Sonnet 5 and Claude are credited in the collapsed commit'sCo-Authored-By:trailers.Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue templatepolicy,security-review,Helm chart, and the vendored-adapter lane are green,reviewre-running against this description