← Model losses

Head-to-head comparison

openai / gpt-6.1-sol / high / high effort preferred over xai / grok-4.7-efficient / low / low 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.1-sol / high / high effort answer

## Findings

### 1. Saved targets beyond native duration can never finish restoring
**High confidence.** In `useReviewResumePlayback.ts:55–63`, native duration is checked for validity but never bounds `request.targetS`. For example, restoring `900` into a video whose duration is `600` repeatedly seeks to `900`; a browser-clamped cursor at `600` cannot satisfy either completion check. After 15 seconds, restoration remains pending with the failure notice (`50–53`). Retrying the same bookmark repeats the failure.

**Smallest safe fix:** Once valid metadata exists, bound the request target to native duration before comparing or seeking. Use that effective target consistently for native completion, React-cursor completion, and `getTarget()`. Keep `canResume()` gating intact. Clamping a navigation cursor must not create watched coverage or certification evidence.

### 2. Brief editor ownership does not cancel a pending resume
**High confidence.** Cancellation is checked only by the 100-ms interval (`48`). An editor can open and close in separate committed renders between ticks. `latest.current` then contains the closed-editor state, so the pending request survives and can subsequently call `onReady()`.

The existing cancellation test waits a full polling interval while editing (`useReviewResumePlayback.test.tsx:63–65`), so it misses this case.

**Smallest safe fix:** Also check cancellation in an effect after committed options update. When a same-inspection request exists and `shouldCancel()` is true, pause and cancel immediately. Retain the polling check as a backstop.

## Lifecycle assessment

- **Cold resume:** Correctly waits for valid metadata, native seek completion, the matching React cursor, and `canResume()` (`55–67`). The existing cold-resume test exercises these gates.
- **Metadata/seek stalls:** After 15 seconds, the hook pauses, shows a failure notice, and retains pending ownership. A fresh `begin()` resets the deadline. This is deliberate, fail-closed behavior—not independently a defect.
- **Unmount/inspection switch:** Cleanup clears the interval and request (`69`); inspection changes also reset pending state. Notice invalidation prevents A→B→A resurrection (`20–23`). No ordinary post-unmount playback defect is established.
- **Editor-return consumption:** Marking the key before navigation/playback (`useReviewReturnSeek.ts:21–35`) prevents repeated consumption while Router still renders the old parameters. The supplied test covers this.

### Conditional lifecycle issue: StrictMode effect replay
With React StrictMode’s initial effect replay, the return effect can consume the URL and start restoration; the playback effect’s cleanup then clears that request. On replay, `consumedRef` suppresses another start. The result is a “Returning…” notice with no pending request.

This is reproducible from these hooks under StrictMode, but the packet does **not** establish whether [REDACTED: private project name] enables it. If applicable, make playback effect re-setup rearm an interrupted same-inspection request without repeating URL consumption; preserve real unmount timer cancellation and inspection/editor cancellation.

## Targeted regressions — at most three

1. **Shortened video:** Bookmark exceeds duration; restoration uses the bounded target and calls `onReady()` only after both cursors match and `canResume()` permits it.
2. **Brief editor session:** Commit editor-open and editor-closed renders without advancing timers; subsequently satisfy both cursors and verify `onReady()` never fires.
3. **If StrictMode is supported:** Mount the integrated guided-return harness under StrictMode; verify restoration survives replay without duplicate URL consumption.

## Limits and next action

`coverageRecovery` is outside this packet, so recovery-parameter precedence cannot be validated. The implementations of `seek`, `onReady`, and server watched-proof/certification are also not supplied. Do not weaken those boundaries or treat restored position as watched evidence.

Next: implement the two confirmed fixes and their focused tests; validate StrictMode applicability before expanding the lifecycle change. Analysis was direct and limited to the supplied snapshot.

xai / grok-4.7-efficient / low / low effort answer

The out-of-range bookmark is the only production correctness defect. Metadata stalls, inspection switches, unmount, and editor cancel match the tests. Do not treat a clamped end as a successful restore.

1. Conclusion
An unreachable saved position never settles and can disturb certification boundaries. In `useReviewResumePlayback.ts`, once `readyState >= 1` and duration is finite, any native time more than 0.1s from `request.targetS` calls `seek(request.targetS)` again (lines 55–60). If the bookmark is past the new duration, the element clamps and that difference stays above 0.1s, so the hook re-seeks about every 100ms until the 15s branch (lines 50–53). That branch pauses, sets “Could not restore…”, leaves `pendingRef` true, and does not call `onReady`. It does not latch, so every later tick calls `pause()` and `setMessage()` again. The first `begin()` seek (line 39) can already be past the end. Repeated end-seeks are the certification risk; `onReady` is the scanner handoff (file comment, lines 3 and 62–67) and must not run for a frame that does not exist. Confidence: high.

Cold resume, metadata stall, inspection switch, and editor cancel behave as the tests require. The interval waits for metadata, `seeking === false`, a native match, and a React `currentTime` match before `onReady` (lines 55–67). The 15s path keeps `pendingRef` true and does not call `onReady` (test lines 48–54). Inspection changes drop the notice during render (hook lines 21–23) and clear the request when the effect re-subscribes (lines 41–43, 69–70); A→B→A does not revive it. `shouldCancel` pauses and `cancel()`s, and a later ready frame does not call `onReady` (test lines 60–71). `useReviewReturnSeek` marks the key before navigation (lines 22–31), so stale `seek_s`/`resume_scan` renders do not double-fire (test lines 88–110).

Smallest safe fix, only in the interval after the existing cancel check: if duration is finite and `targetS > duration + 0.1`, or if the 15s deadline has passed, take one terminal failure. Pause once, set the existing failure message, keep `pendingRef` true, set `requestRef` to null so later ticks no-op, and do not seek again or call `onReady`. Do not clamp-and-complete.

2. Alternatives and discarded hypotheses
Discarded: clamping the bookmark to duration and calling `onReady` when both clocks match that end. That would release the scanner for media the saved frame is not in. Discarded: clearing `pendingRef` on that path. The timeout test requires it to stay true. Discarded: treating the 15s metadata hold itself as a bug. Late metadata must not auto-certify after the failure copy. Discarded: a Strict Mode wipe where effect setup and cleanup null `requestRef` (lines 42–43 and 69) after `useReviewReturnSeek` has consumed the key (lines 22–25), so a strict remount would not call `begin` again. Real unmount and inspection-id change should clear. Deps are stable, so this is dev-only, not a production defect. Discarded: the 100ms `shouldCancel` gap. An editor open and close inside one quiet interval could miss cancel. Not a realistic editor session.

3. Missing evidence
`parseCoverageRecoveryParams` is outside the packet (`../coverageRecovery`). If it returns non-null for `seek_s` plus `resume_scan=1`, the return-seek effect never consumes (hook line 20) and the guided-return test would not hold. Parent `onEnded` or watch-proof listeners are also outside the packet, so the certification risk of repeated end-seeks is inferred from this hook’s `onReady` gate, not from server code.

4. Next action
Add one regression: begin at a time past a finite duration, advance one interval, expect no further raw `seek` of that time, the failure notice, `pendingRef` still true, and `onReady` not called even after a React time equal to duration. Optionally add a second: after 15s without metadata, further 500ms advances do not call `pause` again. No third test.

Primary judge's stated reason

Weak, forced preference for B: its cancellation analysis and targeted test better address an explicitly requested lifecycle case without relying on assumptions about realistic editor duration. A offers a defensible, more conservative out-of-range policy. This is not an established material quality gap, and an independent review could reasonably reject the preference.

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_1d1a0ef838250b05b599056ec6bf9c5acd822d5f48aef04c3f4ffdc51c57d9f9. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.