Require fresh authorization for consequential pull reviews #507

Closed
opened 2026-08-10 18:49:33 +00:00 by timmy · 0 comments
Owner

Problem

Pull-request APPROVE and REQUEST_CHANGES decisions can be published by any active dashboard session, including automatically from the closed-app offline outbox. Merge, issue closure, and device revocation already require fresh authorization, but consequential review decisions do not.

Vertical slice

  • Require a fresh, single-use grant for approve/request-changes, bound to repository, PR, head SHA, and decision.
  • Keep comment-only reviews frictionless.
  • Hold queued consequential reviews in an explicit awaiting-authorization state instead of treating HTTP 428 as permanent failure or retrying automatically.
  • Let the foreground operator authorize and resume the same queued review without replacing its idempotency key or draft.

Acceptance

  • Missing, mismatched, expired, or replayed grants fail before any upstream read/mutation.
  • Online submission uses the existing fresh-authorization prompt/retry flow.
  • Background 428 preserves queued content and enters awaiting authorization with no automatic retry.
  • Foreground authorization resumes exactly once using the original operation ID and expected head.
  • Comment decisions remain unchanged; focused and full tests pass.

Evidence

src/main.py protects merge but not submit_review; frontend/background-issue-sync.js currently converts all 4xx responses to attention; historical issue/PR and commit title scans found offline review delivery (#419/#423) and fresh authorization (#341/#483), but no decision-bound review authorization.

## Problem Pull-request `APPROVE` and `REQUEST_CHANGES` decisions can be published by any active dashboard session, including automatically from the closed-app offline outbox. Merge, issue closure, and device revocation already require fresh authorization, but consequential review decisions do not. ## Vertical slice - Require a fresh, single-use grant for approve/request-changes, bound to repository, PR, head SHA, and decision. - Keep comment-only reviews frictionless. - Hold queued consequential reviews in an explicit awaiting-authorization state instead of treating HTTP 428 as permanent failure or retrying automatically. - Let the foreground operator authorize and resume the same queued review without replacing its idempotency key or draft. ## Acceptance - Missing, mismatched, expired, or replayed grants fail before any upstream read/mutation. - Online submission uses the existing fresh-authorization prompt/retry flow. - Background 428 preserves queued content and enters awaiting authorization with no automatic retry. - Foreground authorization resumes exactly once using the original operation ID and expected head. - Comment decisions remain unchanged; focused and full tests pass. ## Evidence `src/main.py` protects merge but not `submit_review`; `frontend/background-issue-sync.js` currently converts all 4xx responses to attention; historical issue/PR and commit title scans found offline review delivery (#419/#423) and fresh authorization (#341/#483), but no decision-bound review authorization.
timmy self-assigned this 2026-08-10 18:49:33 +00:00
timmy closed this issue 2026-08-10 19:04:02 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#507
No description provided.