Resolve review reactions to an archie-owned task, drop the rest #1171

Closed
opened 2026-10-27 13:39:18 +00:00 by sam · 0 comments
Owner

Resolve a reaction's PRNumber to the archie task that owns it, and drop
everything else.

Step 4 of docs/prds/pr-review-remediation.md, and the authorization boundary
named in its decisions 3 and 6: a review event must only ever cause work
against a PR archie itself opened and still owns. Without it a signed webhook
for any repository the bot can see enqueues work.

The lookup does not exist. pr_number is written by internal/store/store.go
(lines 250, 291, 325, 384, 397, 414) and never read in a WHERE clause. This
needs:

  • a TaskStore method keyed on (owner, repo, pr_number)
  • a matching StateStoreService RPC; a Go interface method on a store facade
    without one is forbidden (CLAUDE.md, internal/infrastructure/staterpc)
  • an index on those three columns

Unmatched, merged, closed and archived PRs are all dropped through one
counter.

Acceptance: a reaction for a PR with no task is dropped and counted; one for a
merged or archived task is dropped and counted; one for a live pr_open task
resolves to that task.

Close reason

Closed


Imported from beads archie-core-8li9.2 · GitHub #914 · type feature · priority P1 · created 2026-09-18 · closed 2026-09-18

Resolve a reaction's PRNumber to the archie task that owns it, and drop everything else. Step 4 of docs/prds/pr-review-remediation.md, and the authorization boundary named in its decisions 3 and 6: a review event must only ever cause work against a PR archie itself opened and still owns. Without it a signed webhook for any repository the bot can see enqueues work. The lookup does not exist. pr_number is written by internal/store/store.go (lines 250, 291, 325, 384, 397, 414) and never read in a WHERE clause. This needs: - a TaskStore method keyed on (owner, repo, pr_number) - a matching StateStoreService RPC; a Go interface method on a store facade without one is forbidden (CLAUDE.md, internal/infrastructure/staterpc) - an index on those three columns Unmatched, merged, closed and archived PRs are all dropped through one counter. Acceptance: a reaction for a PR with no task is dropped and counted; one for a merged or archived task is dropped and counted; one for a live pr_open task resolves to that task. ### Close reason Closed --- _Imported from beads `archie-core-8li9.2` · GitHub #914 · type feature · priority P1 · created 2026-09-18 · closed 2026-09-18_
sam added the highfeature labels 2026-10-27 13:39:18 +00:00
sam self-assigned this 2026-10-27 13:39:18 +00:00
sam closed this issue 2026-10-27 13:39:18 +00:00
sam added a new dependency 2026-10-27 13:42:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1171