Problem
The Review gate evaluates review state currently visible through GitHub's API. If a PR-level Codex severity finding is deleted, that comment is no longer available to a later scheduled evaluation, so the gate cannot distinguish deletion from absence.
This is the deferred finding from #147. Deletion is an overt, logged, destructive action by an actor who already has write access; closing it robustly requires repository-owned durable state rather than more event-specific logic in the current gate.
Scope
Design the smallest trusted mechanism that remembers observed PR-level Codex findings after GitHub no longer returns the comment. Keep evaluation and check publication on default-branch code and preserve the existing blocking, minimization, author, badge, exit-code, and exact-head contracts.
Acceptance criteria
- Define the durable record, trusted writer, canonical identifiers, retention, and cleanup behavior.
- A previously observed severity finding remains blocking after its source comment is deleted unless a durable fixed, stale, rejected, or linked-follow-up disposition exists.
- Hide → Resolved remains the supported non-destructive clearing path.
- A deletion cannot convert a prior failure into success merely because current API state omits the comment.
- Check publication remains bound to the captured PR head and uses the exact
Review gate context.
- Fork behavior and any residual gap are explicit.
- Tests use synthetic fixtures and cover observation, deletion, disposition, reconciliation, retry exhaustion, and malformed or missing state.
- No PR-authored code runs with write permissions, and no new dependency is introduced.
Verification
Run the focused review-gate tests plus Pack's full Vitest, typecheck, lint, formatting, actionlint, workflow preflight, and diff checks. Document the live-validation boundary for any default-branch-only workflow behavior.
Problem
The Review gate evaluates review state currently visible through GitHub's API. If a PR-level Codex severity finding is deleted, that comment is no longer available to a later scheduled evaluation, so the gate cannot distinguish deletion from absence.
This is the deferred finding from #147. Deletion is an overt, logged, destructive action by an actor who already has write access; closing it robustly requires repository-owned durable state rather than more event-specific logic in the current gate.
Scope
Design the smallest trusted mechanism that remembers observed PR-level Codex findings after GitHub no longer returns the comment. Keep evaluation and check publication on default-branch code and preserve the existing blocking, minimization, author, badge, exit-code, and exact-head contracts.
Acceptance criteria
Review gatecontext.Verification
Run the focused review-gate tests plus Pack's full Vitest, typecheck, lint, formatting, actionlint, workflow preflight, and diff checks. Document the live-validation boundary for any default-branch-only workflow behavior.