openai / gpt-6-luna / xhigh / xhigh effort preferred over xai / grok-4.7-efficient / high / high effort · close 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
Audit [REDACTED: private project name]'s lazy-video saved-position restore and editor-return seek lifecycle. Trace cold resume, target outside new native duration, metadata/seek stalls, unmount/inspection switch, and editor cancellation; identify only reproducible correctness defects, specify the smallest safe implementation and 0-3 targeted regression tests, preserving server watched-proof/certification boundaries.
openai / gpt-6-luna / xhigh / xhigh effort answer
**Analysis mode: direct, snapshot-only.**
### Finding: out-of-range saved positions can never complete resume
**High confidence, conditional on native media behavior.** `begin()` stores and seeks the requested time without knowing the video duration (`useReviewResumePlayback.ts:32–40`). After metadata loads, the poller keeps comparing `currentTime` with that original target and reissues the same seek whenever they differ (`:55–60`). If a shorter replacement video clamps the seek to its finite duration, the target remains unreachable: `onReady()` is never called, and the hook eventually displays its timeout notice while leaving the request pending (`:50–53, :62–67`).
**Smallest safe fix:** Once a finite positive duration is known, normalize an out-of-range request to the media’s valid end position, update the request target, and send that normalized time through `seek()` so both native playback and the React cursor use the same target. Keep the existing readiness gates; do not call `onReady()` merely because a target was clamped. This is a client-side cursor correction only—do not treat it as watched proof or change server certification/proof boundaries.
**Targeted regression test (one):** Resume to a saved time beyond a shorter native duration; simulate the browser clamping the native seek, then verify the normalized target is sought and readiness occurs only after both native time and React cursor reach it.
### Lifecycle assessment
- **Metadata and seek stalls:** The timeout path pauses and displays an error but does not release the pending request or call `onReady()`; the supplied test explicitly expects pending to remain true when metadata is missing (`useReviewResumePlayback.test.tsx:48–58`). A stalled native seek is similarly fail-closed. These are not demonstrated correctness defects; preserve the explicit retry behavior.
- **Inspection switch and unmount:** Inspection changes clear the request and pending state through effect cleanup/setup (`useReviewResumePlayback.ts:41–44, :69–70`); unmount clears the interval and request (`:69`). No reproducible stale-ready defect is shown.
- **Editor cancellation:** The poller pauses and cancels when `shouldCancel()` becomes true (`:47–48`); the test verifies that closing the editor does not revive the canceled resume (`useReviewResumePlayback.test.tsx:60–72`).
- **Editor-return seek:** The resume branch routes through `beginResume`; the manual branch immediately calls `seek()` (`useReviewReturnSeek.ts:32–35`). Whether that manual seek handles lazy metadata or an out-of-range target depends on the supplied `seek` callback, whose implementation is not in this snapshot.
The `coverageRecovery` dependency is also outside the packet, so the recovery-query branch’s behavior cannot be assessed beyond observing that it suppresses return-seek consumption (`useReviewReturnSeek.ts:19–20`).
xai / grok-4.7-efficient / high / high effort answer
The cold-resume hold, the inspection-switch cleanup, and the unmount cleanup are correct. Two defects in the resume poller are reproducible, and one in the return-seek consumption is reproducible. The success gate must stay unchanged so a clamped or unmatched position cannot certify a watched resume.
## Defects
**1. A bookmark outside the current native duration seek-livelocks.** High confidence. In `useReviewResumePlayback.ts:55-60`, once `readyState >= 1` and `duration` is finite, any `|currentTime - target| > 0.1` calls `seek(target)` again. The media element clamps `currentTime` to `duration` and then clears `seeking`. If `target > duration + 0.1`, the difference never closes, so the poller seeks every 100 ms until the 15-second watchdog. That storm can interrupt lazy duration growth. `onReady` is not called, which is the right certification outcome, but only because the mismatch never clears.
**2. The 15-second failure is not terminal.** High confidence. `useReviewResumePlayback.ts:50-53` pauses and calls `setMessage`, then returns without clearing or flagging the request. `setMessage` always does `setNotice({...})` with a new object (`useReviewResumePlayback.ts:24-26`), so every later tick re-renders and calls `pause()` again for the rest of the inspection. The existing timeout test requires `pendingRef` to stay true and `onReady` not to run. Those must be preserved. What is wrong is the non-idempotent pause and notice rewrite, including after an unreachable target finally times out.
**3. A lingering return token is applied again when `inspectionId` changes.** Medium-high confidence. `useReviewReturnSeek.ts:21-34` consumes `` `${inspectionId}:${pendingSeekS}:${resume}` ``. The file’s own comment says the old route can still render after `setSearchParams`. An inspection switch in that window produces a new key, so `beginResume` runs for the new inspection at the previous bookmark. That can start a certified resume on the wrong asset. The same-inspection re-render guard does not cover this.
Editor cancellation after a resume has already started is correct: `shouldCancel` is checked before `onReady`, and the existing test holds. Two adjacent holes should be closed in the same patch, not treated as separate lifecycle bugs. `begin` (`useReviewResumePlayback.ts:32-39`) does not consult `shouldCancel`, and the cancel branch at line 48 pauses media the editor now owns.
## Smallest safe implementation
Keep the initial `begin()` seek. Do not treat a clamped time as success. Do not call `onReady` unless both cursors are within 0.1 seconds of the original finite target, `canResume()` is true, and `shouldCancel` is false. Do not clear `pendingRef` on failure.
In `begin`, return immediately when `shouldCancel()` is true, or when `targetS` is non-finite or negative. Do not arm, pause, prepare, or seek. Store `failed: false` on the request.
In the interval:
- On `shouldCancel`, call `cancel()` only. Do not pause.
- On timeout, if `failed` is not already set, pause once, set the existing failure string once, and set `failed`. Then return. Leave `pendingRef` true and do not call `onReady`.
- After `readyState >= 1`, if `duration` is finite and `target > duration + 0.1`, return without seeking and without `onReady`. A later larger duration can still complete through the existing success path. If `duration` is not yet finite, keep waiting as today.
- Leave the success block at `useReviewResumePlayback.ts:62-67` unchanged.
In `useReviewReturnSeek.ts:21`, consume `` `${pendingSeekS}:${resume}` `` only. Still clear `consumedRef` when `seek_s` is empty, so a later real edit of the same bookmark works.
## Regression tests
Add these three tests next to the existing ones. Do not change the current assertions.
1. **Outside duration, then growth.** `begin(900)` with `duration` 100, `readyState` 2, and `currentTime` 100. Advance several ticks. `seek` must not be called again, and `onReady` must not run. Then set `duration` to 1600 and advance one tick. `seek(900)` must run once. After native and React times match, `onReady` runs once. This proves a clamped playhead is not certified and a provisional short duration can still recover.
2. **Timeout is idempotent.** With no metadata, advance past 15 seconds. The failure notice appears, `pendingRef` stays true, and `onReady` does not run. Advance another second. `pause` call count and the notice string must stay unchanged. `pendingRef` must stay true.
3. **Lingering token, other inspection.** Render the guided-return harness with `seek_s` and `resume_scan=1`, then render again with another `inspectionId` and the same params. `prepareVideo` and `begin`/`seek` must run only for the first inspection. Clearing the params and returning the same token later must still run a second time.
## Discarded
- The cold-resume dual cursor hold, the re-seek when a competing zone moves an in-range playhead, the unmount interval cleanup, and the A-to-B-to-A notice drop all match the tests. No change is needed.
- Clearing the request in the interval effect setup is required on inspection change and does not wipe `begin()` in production effect order. A Strict Mode double-invoke can drop an already-consumed resume in development only. That is not a production defect.
- Updating `latest` in an effect is safe for this composition: the resume hook is declared first, so `begin()` sees the current options.
- A `NaN` target would skip both `>` checks and reach `onReady`. The return-seek caller already rejects non-finite times. The `begin` guard above closes the public entry without a separate scenario.
- Clamping and then calling `onReady` would violate watched-proof and certification. It was rejected.
- Clearing `pendingRef` on timeout would contradict the existing hold-visibly test and could release the scanner. It was rejected.
- The non-resume `seek(time)` path ignores `ready`. Whether that drops the seek depends on the injected `seek`, which is not in the packet.
## Missing evidence
`coverageRecovery.js` is outside the packet. If `parseCoverageRecoveryParams` stays non-null while `seek_s` is present, the return effect never consumes that token. Do not change that deferral until that helper is read. The parent that honors `pendingRef` and `onReady` is also outside the packet, so this patch must keep failure as pending, not ready.
## Next action
Patch only those two hooks as above, add the three tests, and re-run the existing resume and return-seek tests. Do not certify a position the native and React cursors did not both reach.Primary judge's stated reason
The forced, weak preference is B: its narrower conclusions and explicit client/server distinction better respect the evidence-only correctness requirement. This is not an established material quality gap; A provides useful additional lifecycle analysis and a better duration-growth safeguard. An independent review could reasonably favor those benefits.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: e8b943ba-5475-4c9f-82d2-c82f9157debd. Pair: brp1_b28c2fb9f944254641c8c16284fcb65cc16c8ea5fd4a3b554a420ab32611e205. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.