openai / gpt-6-astra / high / high 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 / high / high effort answer
## Conclusion
**Three concrete client-side defects are established:** retry can discard an unsaved bookmark; overlapping hook lifetimes can persist an older bookmark after a newer one; and a late checkpoint response can resurrect epoch-invalidated coverage.
Assessment was independent and source-only. No files were edited, tests run, or API calls made.
Paths below are relative to `[REDACTED: private project name]/frontend/src/`.
## Findings
### 1. Retry discards the unsaved navigation bookmark
**Evidence:** `components/v3-review/hooks/useReviewProgress.ts:39–45, 81–85, 119–125, 164–171, 205–214`.
The bookmark lives only in the effect-local `position`. A failed checkpoint sets `blocked`; Retry creates a new effect whose position is initialized from the server. Unlike watched ranges, the unsaved bookmark has no same-revision preservation path.
**Shortest trigger**
1. Hydrate revision R with bookmark 12.
2. Play and pause at 15; saving 15 fails without reaching persistence.
3. Click “Retry saving progress.”
4. GET returns the unchanged revision R and persisted bookmark 12.
The old effect cannot flush because it is blocked. The new effect adopts 12 and starts with `positionArmed = false`, so remaining paused at 15 does not restore the lost bookmark.
**Outcome:** watched ranges survive through the same-revision store union, but the resume cursor silently moves backward. The Shell consumes this cursor when resuming (`V3LayoutShell.tsx:945–980`) and explicitly offers this retry action (`2155–2159`).
**Smallest safe correction:** retain a dirty bookmark across retry, keyed by reviewer, inspection, and revision. After successful hydration, preserve and checkpoint it only when all identities still match. Discard it on authoritative revision change or acknowledged restart.
**Focused regression cases**
- Failed save of 15 → same-revision GET returning 12 → paused retry must eventually persist 15.
- Changed revision, reviewer, or inspection must not inherit that dirty bookmark.
- Acknowledged restart must replace it with the restart cursor.
**Confidence: high.**
### 2. Serialization ends at the hook-effect boundary, allowing an older disposed tail to overwrite a newer bookmark
**Evidence:** `useReviewProgress.ts:46, 104–128, 194–205`; `api/inspections.ts:984–995`.
`inFlight` is local to one effect. Cleanup intentionally continues draining that effect’s final checkpoint after disposal, but a replacement hook/effect immediately gets an independent queue.
**Shortest trigger**
1. An old hook sends bookmark 10. The server saves it, but its response is delayed.
2. Playback reaches 12; unmount calls `flush()`, which waits for that request.
3. Reopen the same inspection as the same reviewer. Hydrate 10, advance to 15, and successfully save 15.
4. Deliver the old response. Its cleanup waiter recursively calls `flush()` and saves its retained bookmark 12.
The disposed guard prevents UI merging, **not the final PUT**. The replacement hook already considers 15 acknowledged, so unchanged periodic or cleanup flushes do not repair the server’s later value of 12.
**Outcome:** live UI can show 15 while reopening restores 12. Watched-range union remains intact; this is a bookmark ordering defect.
The supplied backend tests corroborate why revision checks do not solve this: ordinary saves reuse one revision (`[REDACTED: private project name]/backend/tests/test_review_progress.py:26–34`), and position-only updates replace the persisted cursor while preserving ranges (`104–106`).
**Smallest safe correction:** use a reviewer/inspection-scoped checkpoint coordinator that survives effect replacement, with revision-bound entries. Order retiring writes before replacement hydration/checkpoints, or otherwise ensure the newest bookmark is the final write. Simply forbidding disposed flushing would lose legitimate final progress.
**Focused regression cases**
- Delayed old PUT, queued cleanup tail, remount, newer bookmark: final persistence must contain the newer cursor.
- Repeat with disjoint watched intervals; preserve both without bridging their gap.
- Reviewer/revision changes must never relabel or replay old queued evidence.
**Confidence: high.**
### 3. A late successful checkpoint can undo coverage invalidation before the epoch effect runs
**Evidence:** `useReviewProgress.ts:88–102, 115–118, 208–213`; `stores/useV3SessionStore.ts:1047–1060`.
`mergeSaved()` checks disposal and inspection identity but does not check coverage generation. It can also recreate a missing pass. Meanwhile, the epoch effect decides whether to rehydrate by checking whether a pass is **currently** null.
**Shortest trigger**
1. A checkpoint is in flight for the current inspection.
2. `bumpCoverageEpoch(currentInspection)` clears its coverage and pass.
3. The old checkpoint success continuation runs before the hook processes the epoch change.
4. `mergeSaved()` unions the old response into the now-empty coverage and recreates `review-progress:<old revision>`.
5. The epoch effect sees a non-null pass and skips `setAttempt()`.
**Outcome:** explicitly invalidated watched coverage and its old pass return to live state, and the intended progress rehydration is skipped. This is stale-state resurrection, not the expected loss of invalidated samples. The supplied evidence does not establish any resulting acceptance or certification outcome.
**Smallest safe correction:** guard response application with a synchronously maintained, inspection-scoped coverage generation. A response predating relevant invalidation must not merge ranges or recreate a pass. Epoch-triggered rehydration should depend on the invalidation event, not a pass that an old callback can recreate.
**Focused regression cases**
- Queue checkpoint success, invalidate the current inspection, then run the success continuation before passive effects: old coverage must remain absent and rehydration must occur.
- An unrelated inspection’s scoped epoch bump must preserve current coverage.
- An explicit fresh-pass transition must not acquire pre-transition coverage from an outstanding response.
**Confidence: high for the client race.** The external review-reset caller is outside the packet; no additional backend-reset behavior is assumed.
## Lifecycle behavior that is correctly supported
- **Hydration:** setup requires reviewer identity, matching inspection session, hydrated metadata, and a SHA. GET responses are rejected after disposal/inspection change or on SHA mismatch. Local ranges are retained only for the returned revision (`useReviewProgress.ts:33–37, 160–181`).
- **Inspection boundary:** `InspectionContext.tsx:175–183` establishes the session in a layout effect; `233–261` hydrates authoritative review metadata.
- **Within one effect:** checkpoints serialize; another flush arriving during a request waits and then drains the latest snapshot. Successful responses union with playback earned in flight (`104–128`). Tests cover both behaviors (`__tests__/useReviewProgress.test.tsx:37–50, 230–243`).
- **Pause/unmount:** pause triggers flushing; cleanup starts flushing before disposal and retains the old inspection’s local tail. Ignoring its subsequent UI response is correct disposal behavior (`194–207`).
- **409:** checkpoint conflicts block further writes, clear local proof, and require hydration. Changed-revision samples are not carried forward; the test exercises this (`216–228`).
- **Restart:** existing coverage remains until acknowledgement; checkpoints are suppressed while restarting. The Shell pauses, awaits restart success, then starts the fresh pass (`V3LayoutShell.tsx:981–985`). The test verifies this ordering (`245–262`).
- **Expected resets:** ordinary scan-mode changes preserve partial coverage. Fresh passes clear coverage and create a pass; relevant invalidation clears it and normally triggers rehydration. Those clears alone are not data-loss findings.
- **No-gap union:** `mergeReviewProgress.ts:12–23` merges only overlapping/touching valid intervals. Tests explicitly preserve tiny positive gaps.
- **Completion remains separate:** progress does not set completion. The attestation hook builds a separately gated candidate and submits it through the full-review API; store callbacks require matching inspection/pass identities (`hooks/useFullVideoReviewAttestation.ts:57–94`, `fullVideoReview.ts:164–193`, `useV3SessionStore.ts:1076–1138`).
## Limits and next action
The packet does not expose authentication transport, browser-unload delivery guarantees, playback sampling internals, or the completion predicate implementation. No defect in those dependencies is inferred.
The next useful action is to add the deferred-response regression cases above, then implement narrowly scoped bookmark retention, cross-lifetime ordering, and coverage-generation guards while preserving reviewer isolation and existing revision/409 behavior.
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
B provides an actionable, source-grounded correction for losing the latest resume cursor during the supplied retry workflow, with identity-scoped retention and focused regression cases. This is a supported substantive advantage, not merely a forced slight preference: A recommends treating the evidence as showing no user-visible persistence defect despite this concrete sequence. Neither answer demonstrates actual execution or certification consequences.
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_f9563d09b1771d292bd02371bc78fc108dec2867cbe4f8d29dfe754e5b53a5d8. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.