openai / gpt-6.1-sol / low / low effort preferred over openai / gpt-6-luna / low / low 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.
openai / gpt-6-luna / low / low effort answer
## Conclusion
A concrete stale-checkpoint race is visible in `useReviewProgress.ts`: a successful in-flight save can overwrite a newer restart’s revision and coverage.
**Trigger:** begin a normal checkpoint save, then invoke `restart()` while that save is pending. After the first save resolves, `restart()` sends its reset and receives the new revision. But the first save’s continuation also runs `mergeSaved()` (lines 115–117), which merges its old-revision ranges into the store; `mergeSaved()` checks only inspection identity (lines 95–102), not whether the save still belongs to the current revision or restart. The restarted hook then sets `latest = []` and clears coverage (lines 139–147), but a late merge can repopulate old coverage after that reset.
This is more than expected disposal: if the late merge happens after the restart acknowledgement, the UI can show pre-restart coverage and the next checkpoint can try to save those ranges using the new revision. The server may reject or persist them, depending on ordering; either way the client’s acknowledged reset is not reliably reflected. The test at `useReviewProgress.test.tsx:245–263` covers a checkpoint arriving *during* restart, but not the old save response’s merge after restart acknowledgement.
**Smallest safe correction:** bind each async save response to the revision/reset generation that launched it, and ignore its merge/state effects if that generation is no longer current. Add a deferred-save regression that resolves the old save after restart succeeds, asserting coverage stays cleared and no old ranges are submitted under the new revision.
## Other lifecycle assessment
- Hydration is inspection-session guarded: fetch checks `disposed` and `sameInspection()` before applying results (`useReviewProgress.ts:161–179`). Revision mismatch through the 409 path clears hydration and coverage rather than relabeling old samples (`:119–125`); the corresponding retry test confirms this (`useReviewProgress.test.tsx:216–228`).
- In-flight checkpoints serialize through `inFlight`; subsequent flushes wait and recursively drain the latest tail (`useReviewProgress.ts:104–129`). Pagehide/visibility flushes use that path (`:190–204`), and the test verifies latest-tail draining (`useReviewProgress.test.tsx:230–243`). Unmount calls flush before marking the instance disposed (`:194–204`), so the request can continue, while its UI/store merge is still inspection-guarded.
- Non-409 failures block further writes until retry (`useReviewProgress.ts:119–125`); retry recreates the effect via `attempt` (`:205, 214`). This appears intentional fail-closed behavior, not silent acceptance.
- Inspection changes reset session-scoped state in `InspectionContext.tsx:181–183` and the store (`useV3SessionStore.ts:844–894`). Coverage epoch changes trigger a retry only when no full-video pass exists (`useReviewProgress.ts:208–213`); restart and session transitions intentionally invalidate coverage. The packet does not establish a separate reviewer-change teardown beyond the hook’s `reviewerId` effect dependency.
- Range merging preserves disjoint gaps (`mergeReviewProgress.ts:17–24`), and partial checkpoints do not mark completion; completion remains tied to the server-owned attestation path (`useFullVideoReviewAttestation.ts:18–25`, `fullVideoReview.ts:135–195`).
**Uncertainty:** the packet does not include API/backend implementation details beyond the corroborating backend tests, so the exact server outcome of a stale range submitted with a new revision cannot be determined. The client-side stale-state race itself is supported by the supplied hook and test paths.
Primary judge's stated reason
B provides an actionable, source-supported failure/retry scenario, an identity-and-revision-bound correction, and focused regressions. A would direct corrective work toward an ordering that its proposed sequence cannot produce. This is a clear correctness advantage, not a slight forced preference, although it does not establish that B exhaustively identifies every possible defect.
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_d3e0380744555c8f0c94e5b1b713d6e2098f4ec4e278052657eb35a55c2d7b60. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.