openai / gpt-6.1-sol / 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.1-sol / low / low effort answer
## Conclusion
**One concrete defect is established: retrying a failed checkpoint loses the latest unsaved navigation bookmark.** Watched ranges are retained on a same-revision retry, but the bookmark is not.
Independent, read-only analysis of the supplied snapshot; no tests or external actions performed.
### Finding — checkpoint retry discards an unsaved bookmark
**Evidence:** `[REDACTED: private project name]/frontend/src/components/v3-review/hooks/useReviewProgress.ts:40–45, 81–85, 119–125, 161–180, 214`.
**Shortest triggering sequence:**
1. Hydrate revision R with server bookmark 12 seconds.
2. Normal review playback advances the bookmark to 15 seconds. This updates only the effect-local `position` and React display state.
3. A checkpoint fails with a non-409 error. The hook sets `blocked = true`; server persistence remains at 12 seconds.
4. Click **Retry saving progress**, provided by `V3LayoutShell.tsx:2155–2158`.
5. Retry increments `attempt`, disposing the old lifecycle. Cleanup cannot save its bookmark because `flush()` exits when blocked (`useReviewProgress.ts:104–106, 194–196`).
6. The replacement lifecycle fetches the server bookmark and assigns 12 seconds, discarding 15 seconds (`:165–167`).
**Consequence:** The review cursor visibly moves backward and subsequent resume targets the older position (`V3LayoutShell.tsx:956–962`). Without further playback, successful retry never persists the lost bookmark.
This is not expected revision disposal: reviewer, inspection, pack identity, and revision can all remain unchanged. Same-revision watched ranges survive through the store union (`useReviewProgress.ts:169–177`), making the bookmark loss specifically asymmetric.
**Confidence:** High.
**Smallest safe correction:** Retain the pending bookmark outside the replaceable effect, bound to reviewer, inspection, pack identity, and hydrated revision. On retry hydration, preserve that pending value **only when the fetched revision matches**, and leave its checkpoint signature dirty until successfully acknowledged. Preserve the latest navigation value—not the maximum timestamp, since intentional backward navigation is valid. Discard pending state on identity/revision changes, 409 invalidation, and acknowledged restart.
**Focused regression cases:**
- Failed non-409 checkpoint → same-revision retry → latest bookmark remains displayed and is persisted.
- Failed checkpoint with a legitimate backward bookmark → retry preserves that value.
- Retry returns a different revision → old bookmark and ranges are discarded.
- Reviewer or inspection changes → pending bookmark cannot migrate.
- Acknowledged restart → bookmark becomes the restart response value, with no resurrection of the pending cursor.
## Lifecycle assessment
- **Hydration:** Requires the current inspection session, reviewed-zone metadata, authenticated reviewer, and pack SHA. Disposed responses are ignored; SHA mismatch fails hydration. Local ranges merge only when `playedCoverageRevision` matches the fetched revision (`useReviewProgress.ts:33–37, 161–181`).
- **Serialization and tail draining:** Within one lifecycle, `inFlight` serializes PUTs. A flush requested during a PUT waits, then snapshots the latest tail (`:104–129`). The pagehide regression explicitly covers this (`__tests__/useReviewProgress.test.tsx:230–244`).
- **Stop and unmount:** Pause triggers flush; cleanup starts a final flush before disposal. Disposal prevents late UI/store merges while allowing the captured checkpoint to finish. Inspection navigation preserves the old lifecycle’s captured ranges because its subscription ignores another inspection (`:88–96, 194–207`). These behaviors alone do not establish data loss.
- **Failure and 409:** Failure blocks subsequent writes. A live 409 also removes local coverage/pass/submission and makes hydration false. Fetching a different revision does not relabel old ranges; the test covers this (`:119–125`; tests `:216–229`).
- **Restart:** Ordinary checkpoints are suppressed while restart waits for an existing PUT. Coverage is cleared only after reset acknowledgement, and the returned revision replaces the previous one (`:131–159`). The supplied restart test confirms that ordering (`tests:245–263`).
- **Epoch changes:** Fresh passes explicitly clear coverage and create a new pass; invalidating resets clear matching coverage/pass state. The progress hook requests rehydration when an epoch changes with no pass (`useV3SessionStore.ts:1047–1061, 1396–1440`; hook `:208–213`). Clearing coverage at these boundaries is not, by itself, unintended loss.
## Caller and invariant verification
`InspectionContext.tsx:181–183, 233–261` establishes inspection-scoped sessions and hydrates authoritative review metadata. `V3LayoutShell.tsx:641–648, 981–985` supplies the capture gate and performs explicit persisted restart before starting fresh playback.
`api/inspections.ts:975–995` keeps partial-progress GET/PUT distinct from completion POST. Completion candidates require the current inspection/pass, pack identity, queue completion, and watched coverage; completion callbacks are inspection/pass guarded (`fullVideoReview.ts:163–194`; `useFullVideoReviewAttestation.ts:79–94`; store `:1076–1138`). **Partial progress does not establish acceptance or certification.**
The range union merges only overlaps and exact touches, preserving every positive gap (`mergeReviewProgress.ts:17–24`; tests `:14–16`). Backend tests corroborate reviewer-scoped revisions, persistence, and stale-revision rejection only (`backend/tests/test_review_progress.py:19–61, 82–112`).
The supplied hook tests do **not** cover failed-checkpoint bookmark retention across retry. Outside-packet authentication/API-client behavior remains uncertain; no cross-reviewer request attribution defect is inferred.
**Next useful action:** Implement the identity-bound pending-bookmark retention and add the focused 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
B provides an actionable correction for an ordinary same-revision retry that otherwise restores an older resume bookmark. This is a supported correctness and practical-usefulness advantage, not merely a forced slight preference or a formatting advantage. It does not establish watched-range loss, cross-reviewer leakage, or acceptance bypass.
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_6e26097159cbfce417699bbdb29cc7d4a503ee35981d57992d306d11d5f06c9e. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.