fix(github-webhook): resolve PR owner via house-reference label when the branch tier is unreachable (BLO-21312) - #999
Conversation
|
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 |
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Important Issues (2)
Strengths
Recommended Action
This PR is authored by |
…e house-reference tier (BLO-21312) Ally review on #999 flagged two smuggling paths in the new house-reference fallback: the optional colon let ordinary "Issue ..." prose match as an ownership label, and the captured remainder let a same-line `Related:` mention ride along as owning. Require the colon and truncate the captured value at any secondary label on the same line.
|
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 |
e0bcd75 to
961ba99
Compare
…e house-reference tier (BLO-21312) Ally review on #999 flagged two smuggling paths in the new house-reference fallback: the optional colon let ordinary "Issue ..." prose match as an ownership label, and the captured remainder let a same-line `Related:` mention ride along as owning. Require the colon and truncate the captured value at any secondary label on the same line.
…en no branch tier is available (BLO-21312) github_pr_review_requested arrives via issue_comment, whose payload carries no pull_request.head.ref, so the BLO-20886 case-insensitive branch tier is structurally unreachable on that path -- a PR naming its owner only via Issue:/Paperclip task:/Paperclip issue:/Paperclip QA task: (real shapes on Add a fourth, lowest-priority tier to resolveOwningPaperclipIdentifiers for these house labels. Ranked below both the closing-keyword and branch tiers so pull_request-sourced resolution is unchanged; it only activates when title, closing keyword, and branch (when available) are all empty. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…e house-reference tier (BLO-21312) Ally review on #999 flagged two smuggling paths in the new house-reference fallback: the optional colon let ordinary "Issue ..." prose match as an ownership label, and the captured remainder let a same-line `Related:` mention ride along as owning. Require the colon and truncate the captured value at any secondary label on the same line.
961ba99 to
9506892
Compare
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Prior Findings Dispositioned (2)
Important Issues (2)
Strengths
Recommended Action
This PR is authored by |
…ting' into HEAD # Conflicts: # server/src/__tests__/github-webhook.test.ts
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Prior Findings Dispositioned (2)
Important Issues (2)
Strengths
Recommended Action
This PR is authored by |
…e house-reference tier (BLO-21312) Ally review on #999 flagged two smuggling paths in the new house-reference fallback: the optional colon let ordinary "Issue ..." prose match as an ownership label, and the captured remainder let a same-line `Related:` mention ride along as owning. Require the colon and truncate the captured value at any secondary label on the same line.
Thinking Path
Linked Issues or Issue Description
Option chosen: #2 from the issue (widen the labeled-reference keyword set), not #1 (fetch the PR via API on
issue_commentto recoverhead.ref). Fetching would turnresolveEventContext— a pure, synchronously-tested function — into an async network call inside the webhook request path, exactly the cost the issue calls out as the reason #962 didn't do it. Ranking mitigates the "weaker claim than a closing keyword" concern the issue raises: this tier sits below both the closing-keyword tier and the branch tier, so it only ever activates when title, closing keyword, and branch (when available) are all empty.What Changed
resolveOwningPaperclipIdentifiers(server/src/services/paperclip-identifiers.ts) gains a 4th tier,extractHouseReferenceLabeledIdentifiers, matching body lines labeledIssue:/Paperclip task:/Paperclip issue:/Paperclip QA task:(optional bullet marker, colon, case-insensitive) — ranked last, below the case-insensitive branch tier.issue_commentcomment ingithub-webhook.tsthat said "no branch tier here either" without naming the new fallback.resolveOwningPaperclipIdentifiers) covering all four observed house-label shapes, the ranking below both closing-keyword and branch, and that a bareRelated:mention still never becomes owning even alongside a house label in the same body.issue_comment@ally reviewevent for a PR (modeled on the real fix(pipelines): retire exited stage automation issues #916 shape) whose title/body carry no closing-keyword reference, only aPaperclip issue:house label plus an unrelatedRelated:mention — asserting the author wake resolves to the house-label owner and never theRelated:issue.Verification
npx vitest run src/__tests__/github-webhook.test.ts(fromserver/) — 114/114 passed, including the 2 new tests and all pre-existing BLO-20886 assertions unchanged.npx tsc --noEmit— clean.repo:Blockcast/paperclip is:pr updated:>=2026-07-28):no_owning_reference49/200 → 38/200 (11 PRs recovered: feat(alertmanager): harden issue intake creation #984, test(ci): verify merged adapter artifact on ARC #976, [codex] bound serialized dispatcher critical scans #963, fix(heartbeat): honor Ally concurrency 15 #936, [codex] land deterministic queued-run dispatch #933, test(ci): run all configured adapter projects #931, fix(heartbeat): classify external OOM kills #927, feat(alertmanager): make issue intake aggregate-safe #923, fix(pipelines): retire exited stage automation issues #916, test(ci): serialize destructive heartbeat cleanup #914, Treat penstock 400 allocation_missing as a retryable transient upstream fault #889).no_owning_reference25/200 → 25/200, 0 changed — confirms the house-label tier is inert wherever the branch tier already resolves, i.e. this is additive only on the branch-less path, not a behavior change for fix(github-webhook): route PR-review author wakes to the owning issue, not an arbitrary Related: backlink (BLO-20886) #962's measured path.sre/blo-20886-pr-review-wake-routing(fix(github-webhook): route PR-review author wakes to the owning issue, not an arbitrary Related: backlink (BLO-20886) #962), sinceresolveOwningPaperclipIdentifiersdoesn't exist onmasteryet. Base should be repointed tomaster(or this PR merged after fix(github-webhook): route PR-review author wakes to the owning issue, not an arbitrary Related: backlink (BLO-20886) #962) once fix(github-webhook): route PR-review author wakes to the owning issue, not an arbitrary Related: backlink (BLO-20886) #962 lands. fix(github-webhook): route PR-review author wakes to the owning issue, not an arbitrary Related: backlink (BLO-20886) #962's own CI has one unrelated flaky failure (heartbeat-queued-backlog-convergence.test.ts, BLO-20396 lane) — confirmed unrelated to the BLO-20886/BLO-21312 diff.Risks
issue_commentgap.Related:as owning and by tests covering ranking.Model Used
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template🤖 Generated with Claude Code