openai / gpt-6-astra / low / low effort preferred over cursor / composer-2.5 / Composer 2.5 default / unknown effort · clear win.
Primary judge: Sol 6.1, requested Low. Effective provider effort and internal attempts were not verified. A close win is still a scored preference; it does not establish a material defect.
Reviewed public evidence
Task goal
Review [REDACTED: private project name]'s persisted reviewer-progress lifecycle as a client-side concurrency/state problem. Trace hydration and stale-response guards, in-flight checkpoint serialization and latest-tail draining, unmount/stop flush, failure and retry, restart, and transitions when reviewer, inspection, review revision, or coverage epoch changes. Use the hook and tests as primary evidence, then verify the exact InspectionContext/V3LayoutShell/store/API/attestation callers named in the supplied paths. The backend test is corroborating evidence only for reviewer-scoped revisions and persistence; do not expand this into a backend audit. Identify only concrete source-proven correctness defects or explicitly conclude that the supplied evidence shows no defect; distinguish a real user-visible data-loss/stale-state scenario from expected disposal and epoch-reset behavior. Explain the shortest triggering sequence, affected state and persistence outcome, and the smallest safe correction with focused regression cases. Do not edit files, run tests, make API calls, or infer acceptance/certification from partial progress. Preserve reviewer isolation, inspection scoping, revision/409 semantics, server-owned completion, and the no-gap watched-range union.
openai / gpt-6-astra / low / low effort answer
## Conclusion
**One concrete data-loss defect is established: retrying a failed checkpoint can discard an unsaved navigation bookmark.** Watched ranges survive a same-revision retry, but the bookmark does not.
Independent, read-only analysis of the supplied snapshot; no tools, tests, or external actions.
### Finding: retry replaces the unsaved bookmark with the older server value
**Evidence:** `[REDACTED: private project name]/frontend/src/components/v3-review/hooks/useReviewProgress.ts:39–42, 81–85, 119–125, 161–178, 205–214`.
Shortest triggering sequence:
1. Hydrate revision R with server bookmark **12 seconds**.
2. Play and pause at **15 seconds**. `recordPosition()` stores 15 in the effect-local `position` and React state.
3. The pause checkpoint fails with a non-409 network/server error. The hook sets `blocked = true`, retaining the local bookmark and watched ranges.
4. Click **Retry saving progress**, the actual Shell control at `V3LayoutShell.tsx:2155–2158`.
5. `retry()` increments `attempt`, disposing the old effect and creating a new one. Cleanup cannot save because the old effect is blocked.
6. GET returns the unchanged revision R and bookmark 12. Hydration assigns `position = saved.resume_position_s`, losing 15. Unlike watched ranges, there is no retained same-revision bookmark to merge.
7. While paused, the new effect’s `positionArmed` is false, so neither the timer nor an ordinary flush recovers 15. Leaving and reopening resumes from 12.
**Outcome:** the latest navigation position is lost even though the reviewer followed the offered retry workflow. If ranges are unchanged, the new signature already equals `acknowledged`, so no replacement PUT occurs. If ranges changed, those ranges can be saved with the older bookmark.
This does **not** fabricate watched footage or establish completion.
**Confidence: high.** All necessary transitions and the user-facing retry caller appear in the supplied sources.
**Smallest safe correction:** retain a dirty bookmark across retry generations, explicitly scoped to reviewer, inspection, and revision. After GET, reuse it only when all identities still match; otherwise discard it. Keep that bookmark dirty until its matching PUT succeeds. Do not use the current paused video time as a substitute: the existing editor/recovery/source-reset protections deliberately reject that shortcut.
**Focused regression cases:**
- Failed pause PUT at 15 → retry GET returns 12 under the same revision → PUT persists 15.
- Repeat with additional disjoint watched ranges; preserve both the bookmark and exact gaps.
- Retry returns a different revision, or reviewer/inspection changes → old dirty bookmark is discarded.
- Retry while paused in an editor/recovery detour → preserve the original review bookmark without capturing the detour position.
## Lifecycle assessment
| Transition | Source-grounded behavior |
|---|---|
| **Initial hydration** | The hook requires enabled state, reviewer identity, matching inspection session, hydrated metadata, and SHA (`useReviewProgress.ts:33–37`). GET responses are ignored after disposal or inspection change and rejected on SHA mismatch (`161–163`). Local ranges are retained only when `playedCoverageRevision` matches the fetched revision (`169–177`). |
| **Checkpoint serialization** | Within one effect generation, `inFlight` permits one PUT. Additional flushes await it and recursively reevaluate the latest snapshot (`104–128`). A successful response unions server ranges with playback earned during the request (`95–103, 115–118`). |
| **Latest-tail draining** | A checkpoint arriving during a PUT waits and then sends any changed tail. The supplied test explicitly covers pagehide with `[0,5]` in flight and `[0,6]` pending (`useReviewProgress.test.tsx:230–244`). A lone PUT does not itself immediately drain later playback; the next timer/event supplies that flush. |
| **Pause/unmount** | Pause triggers a flush (`207`). Cleanup calls flush before setting `disposed`, then unsubscribes (`194–203`). An already-waiting cleanup flush can continue persisting its captured latest tail after disposal, while `mergeSaved()` refuses to mutate disposed UI state. Disposal alone is therefore not evidence of dropped coverage. |
| **Failure/409** | Any PUT failure blocks further checkpoints. A live 409 additionally removes hydration and clears coverage/pass/submission (`119–125`). Retry fetches authoritative revision state; changed-revision ranges are discarded rather than relabeled. The existing test covers this (`216–229`). |
| **Restart** | Restart prevents checkpoints, waits for the current PUT, and retains old coverage until the restart response succeeds (`131–158`). The Shell pauses first and starts a fresh pass only after success (`V3LayoutShell.tsx:981–985`). The test verifies acknowledgement-before-clearing and checkpoint suppression (`245–263`). |
| **Inspection changes** | `InspectionContext.tsx:181–183` establishes the session boundary in a layout effect; store initialization clears prior inspection coverage and scan state (`useV3SessionStore.ts:844–894`). The hook’s subscription ignores other inspections, preserving the old generation’s captured tail for cleanup. |
| **Reviewer/revision changes** | Reviewer identity is an effect dependency; fetched revision equality controls local-range reuse. The backend tests corroborate reviewer-specific revisions and 409 rejection after restart/pack rewrite (`test_review_progress.py:19–61`). No cross-reviewer successful persistence is established by this packet. |
| **Coverage epochs** | The hook requests rehydration on epoch change only if no pass remains (`209–213`). A fresh-from-top store transition deliberately clears coverage, creates a new pass, and increments the epoch (`1396–1440`); it therefore does not automatically rehydrate old ranges. Scoped invalidation preserves unrelated inspection coverage/pass (`1047–1060`). These intentional resets are not, by themselves, defects. |
## Verified invariants and limits
- **No-gap union:** `mergeReviewProgress.ts:19–23` merges only overlaps/exact touches; tests explicitly retain tiny positive gaps. Checkpoint clipping intersects ranges with the server interval without bridging gaps (`useReviewProgress.ts:55–60`).
- **Completion remains separate:** progress hydration/checkpointing does not set server completion. The attestation caller constructs a completion candidate separately, submits through `/full-video-review`, and applies responses through inspection/pass guards (`useFullVideoReviewAttestation.ts:57–94`; `fullVideoReview.ts:143–195`; `useV3SessionStore.ts:1076–1138`; `api/inspections.ts:255–285`).
- **Existing tests do not cover the finding:** their authentication identity and inspection are fixed; they cover successful bookmarks, detours, range merging, 409 retry, pagehide draining, and acknowledged restart, but not a non-409 bookmark failure followed by retry.
- **Evidence boundary:** the API client’s authentication/transport behavior and the playback-range producer are outside this packet. Consequently, actual browser-exit delivery guarantees and transport-level account-switch behavior cannot be established here.
**Next useful action:** implement the scoped dirty-bookmark retention and add the focused failure/retry regressions above.
cursor / composer-2.5 / Composer 2.5 default / unknown effort answer
## Evidence packet: persisted reviewer-progress lifecycle (client concurrency)
### 1. Conclusion (confidence: **high** for “no proven persistence defect**; **medium** for transient UI-only edge)
The supplied hook, store, shell wiring, merge helper, attestation path, and tests describe a **coherent, fail-closed** client lifecycle for reviewer-scoped partial playback. I do **not** find a **source-proven** defect that causes **silent server data loss**, **cross-reviewer leakage**, **stale revision writes (409 bypass)**, or **gap-filling in watched-range unions**. What remains is mostly **expected disposal / epoch-reset behavior**, plus one **asymmetric local-store policy** on load failure vs 409 that is **mitigated by UI gating and visible error state**, not shown to corrupt server state.
---
### Lifecycle trace (evidence-grounded)
#### Activation and scoping (`useReviewProgress.ts`)
The persistence effect runs only when:
- `enabled`, `inspectionId`, `reviewerId` (auth), `sessionId === inspectionId`, `reviewStateHydrated`, and pack `sha` (`inspection_json_sha256`) are all present (lines 33–37).
That ties checkpoints to **one inspection**, **one reviewer**, and **one pack identity** before any `revision` exists.
#### Hydration + stale guards
1. On mount/dep change: local UI state resets (`hydrated`, `hasStarted`, `resumePositionS`) (lines 33–36).
2. `GET` via `fetchReviewProgress`; **pack gate**: `saved.inspection_json_sha256 !== sha` throws (lines 161–163) → catch shows restore error; **`revision` is never set**, so **flush cannot PUT** (lines 104–106, `!revision`).
3. On success: `revision`, `endS`, bookmark; **`acknowledged`** signature seeded from server `played_ranges` (lines 164–168).
4. **Same-revision local reuse**: if `playedCoverageRevision === revision` and coverage is for this `inspectionId`, merge local ranges before server merge (lines 170–171); else start from `[]` and, if revision changed, clear `fullVideoReviewPass` / `fullVideoReviewSubmission` (lines 172–176).
5. `mergeSaved` unions server intervals with in-memory ranges via `mergeReviewProgress` (no positive-gap bridge) (lines 95–102, `mergeReviewProgress.ts` lines 1–25).
6. **`mergeSaved` / `sameInspection()`**: updates store only if `reviewSessionInspectionId === inspectionId` (lines 49, 96–97).
**Inspection / session boundaries** (`InspectionContext.tsx`, `useV3SessionStore.ts`):
- `beginInspectionReviewSession` (layout effect, lines 181–183) clears scan/coverage maps and bumps `coverageEpoch` when the inspection changes (store lines 844–892).
- `hydrateInspectionReviewState` for a **different** `inspectionId` atomically resets coverage and scan atoms (store lines 913–946); **same inspection** re-hydration keeps the live scan cursor (lines 948–956).
#### In-flight serialization + latest-tail drain
- Single-flight: `if (inFlight) { await inFlight; return flush() }` (lines 104–107).
- After save: `acknowledged = signature`; `mergeSaved(response)`; state `'saved'` only if post-merge signature matches (lines 115–118).
- **Pagehide during save**: test proves second PUT with tail `[[0,6]]` after first completes with `[[0,5]]` (`useReviewProgress.test.tsx` lines 230–243).
#### Unmount / stop flush
- Cleanup: `void flush()` then `disposed = true`; timers/listeners removed (lines 194–204).
- Pause: `useEffect` calls `flushRef` when `!isPlaying` (line 207).
- `visibilitychange` / `pagehide` call same `flush` (lines 191–193).
Late responses: `mergeSaved` and state updates guard on `disposed` / `sameInspection()`.
#### Failure, retry, 409
- Save error: `blocked = true`; **409** additionally `setHydrated(false)` and clears `queueScanPlayedTimeCoverage`, `fullVideoReviewPass`, `fullVideoReviewSubmission` (lines 119–124).
- Test: after 409, `retry()` refetches new revision and **does not relabel** old samples onto new revision (test lines 216–228).
- `retry()` = `setAttempt` → full effect re-run (line 214).
Backend corroboration (not audited here): stale `revision` → **409**; restart bumps revision; reviewer isolation (`test_review_progress.py` lines 44–57, 19–33).
#### Restart
- `restarting` blocks normal flush; awaits `inFlight` first (lines 131–135).
- `PUT` with `restart: true`; on success: new `revision`, cleared coverage in store, `acknowledged` for empty ranges (lines 137–148).
- Test: during in-flight restart, **old coverage retained** until ack; no extra non-restart saves after success (test lines 245–262).
- Shell: `handleRestartFullReview` pauses, `await reviewProgress.restart()`, then `startFreshReview()` (`V3LayoutShell.tsx` lines 981–984) — chains **server restart** with **new queue pass** (`startQueueScanFromBeginning`, store lines 1396–1440).
#### Revision / pack / coverage epoch transitions
| Event | Review-progress hook | Store coverage / pass |
|--------|----------------------|------------------------|
| Inspection change | Effect deps `inspectionId`; new fetch | `beginInspectionReviewSession` clears coverage; epoch++ |
| `sha` change | Effect re-runs (`sha` dep) | Successful fetch with **new** `revision` resets local tail when `playedCoverageRevision !== revision` (lines 172–176) |
| `coverageEpoch++` | Re-fetch only if `fullVideoReviewPass == null` (lines 208–213) | `startQueueScanFromBeginning` clears local coverage, new pass id, epoch++ (store 1425–1439) — **by design**: durable server union unchanged until explicit `restart` |
| Queue scan stop | N/A | `setQueueScanMode(false)` **preserves** `queueScanPlayedTimeCoverage` (store 1356–1358); test lines 52–61 |
**Not acceptance from partial progress**: `buildFullVideoReviewSubmissionCandidate` requires `isFullInspectionQueueComplete` (`fullVideoReview.ts` lines 143–177); shell passes `reviewProgress.hydrated && overridesReady` into attestation (`V3LayoutShell.tsx` 1009–1018; `useFullVideoReviewAttestation.ts` 57–81).
#### Shell integration (`V3LayoutShell.tsx`)
- `useReviewProgress` with `capturePosition` gated by `canCaptureReviewPosition` (queue, recovery, edit routes) (lines 641–647, 659–660).
- Full review start/restart/coverage recovery **blocked** until `reviewProgress.hydrated` (e.g. 872, 950, 982, 686).
- Resume seek waits `overridesReady && reviewProgress.hydrated` (663–666).
- Error UI with retry (2155–2159).
#### API surface (`inspections.ts`)
- `fetchReviewProgress` / `saveReviewProgress` — typed `revision`, `played_ranges`, optional `restart`, `resume_position_s` (lines 975–995). No react-query cache race in this path; hook owns concurrency.
---
### 2. Alternatives / discarded hypotheses
| Hypothesis | Verdict |
|------------|---------|
| **Unmount flush writes into wrong inspection’s Zustand** | Discarded: `mergeSaved` requires `sameInspection()`; cleanup sets `disposed`. |
| **In-flight save drops tail** | Discarded: covered by test (pagehide + second save). |
| **409 leaves client writing stale revision** | Discarded: `blocked` + store clear + `hydrated false`. |
| **Restart races with periodic flush and wipes new playback** | Discarded: `restarting` blocks flush; test holds coverage until restart ack. |
| **Epoch bump should always re-hydrate review-progress** | **Expected behavior**: epoch bump with **non-null** `fullVideoReviewPass` intentionally does **not** bump `attempt` (lines 208–213); fresh scan clears **local** coverage only; server union still reviewer-scoped partial evidence until `restart`. |
| **Failed initial GET + continued playback loses watched proof** | **Partially true locally**, mitigated: without `revision`, flush no-ops; user sees error; full-review paths require `hydrated`. Manual play could grow store ranges without PUT until `retry()` — **fail-closed persistence**, not silent server corruption. |
| **`mergeReviewProgress` bridges gaps** | Discarded: tests require positive gaps preserved (merge test lines 14–16; hook test lines 37–49). |
---
### 3. Missing evidence (consequence)
- **`usePlayedSpanAttestation` / `playedRangeAttestation`**: epoch invalidation referenced in store comments (lines 422–429) but not in packet — cannot fully verify attestation ↔ checkpoint ordering; shell still gates completion POST on `buildFullVideoReviewSubmissionCandidate`.
- **Backend review-progress handler** (beyond tests): revision/409/pack-reset semantics taken from tests only.
- **`canCaptureReviewPosition` implementation**: only exercised via tests importing it; shell gates align with test keys (test lines 210–214).
Uncertainty does **not** establish a defect in the hook’s serialization or revision semantics.
---
### 4. Smallest safe correction (only if product wants stricter fail-closed UI)
**Not required to fix a proven persistence bug** in the packet. If product wants to remove **stale local coverage** after failed hydration (network or `Review revision changed`):
- On fetch failure (and optionally on sha mismatch before throw), clear `queueScanPlayedTimeCoverage` for `inspectionId` when `revision` was never bound — mirror 409 store hygiene (lines 121–123).
**Focused regression cases** (if implemented):
1. Fetch fails → store coverage cleared → `retry()` → server empty ranges hydrate correctly.
2. Fetch fails → user cannot start full review without `hydrated` (unchanged).
3. 409 path unchanged (test 216–228).
---
### 5. Next useful action
For the mixture-of-agents synthesizer: treat **supplied evidence as showing no user-visible persistence defect** under stated invariants (reviewer isolation, revision/409, server-owned completion, no-gap union). Label **fetch-fail vs 409 local-store asymmetry** as **UX/consistency**, not proven server data loss, unless an out-of-packet path allows full acceptance without `reviewProgress.hydrated`.
**No `MATERIAL_EVIDENCE_CONFLICT`** in the supplied snapshot.Primary judge's stated reason
A provides a materially useful correctness finding, a scoped dirty-bookmark correction, and focused regressions for the actual retry workflow. This is a clear task-grounded advantage rather than a forced slight preference: B instead concludes no user-visible persistence defect and proposes optional load-failure hygiene that does not address the demonstrated bookmark loss. The judgment remains limited to source reasoning, not observed execution.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: 67ab98b0-26bb-40e8-b4d2-2ac3636a541c. Pair: brp1_abf0f954fc4eabd8a7df52a9a0b549b9588659d23b65db04a576c26357826587. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.