← Model losses

Head-to-head comparison

openai / gpt-6.1-sol / high / high effort preferred over openai / gpt-6-luna / 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

Assess the review-pack boot, retrieval, and adoption boundaries for architectural consistency under retries, changed inspection state, and partial failure. Identify a concrete invariant that is missing or inconsistently enforced, trace its path through the supplied implementation, and propose the smallest cohesive correction plus regression coverage.

openai / gpt-6.1-sol / high / high effort answer

## Finding: boot state is not bound to the adopted pack version

**High confidence:** the supplied implementation permits the current pack pointer, boot payload, and retrieved pack bytes to describe different versions.

**Missing invariant:** changing the adopted artifact must atomically replace or invalidate its derived boot state; delayed writers must not restore boot data from an obsolete version.

### Evidence and reproducible triggers

All paths below are under `[REDACTED: private project name]/backend/app/`.

1. **Adoption preserves old boot state.**  
   `services/review_pack_adoption.py:120–162` updates the path/job, invalidates acceptance, and audits the version change—but neither updates nor clears `review_boot_json` or `review_boot_pack_sha256`.

   Reproduction:
   - Populate boot from pack A using `apply_review_boot` (`services/review_boot.py:144–152`).
   - Adopt pack B with a different path or job.
   - The inspection now points to B while retaining A’s boot payload and SHA.
   - Retrieval selects the current pointer B (`routers/review_pack.py:4068–4121`).

2. **A delayed boot writer can overwrite newer state.**  
   Both boot persistence functions select only by inspection ID, without checking the expected pack path/job:
   - Caller-owned transaction: `services/review_boot.py:155–182`.
   - Dedicated session: `services/review_boot.py:185–208`.

   After B is adopted, a delayed `persist_review_boot_from_bytes(id, bytes_A)` can successfully install A’s boot again. Rejecting older jobs during adoption (`services/review_pack_adoption.py:101–118`) does not protect this separate write boundary.

3. **Successful in-place edits also cause divergence.**  
   Inspection-start changes rewrite `inspection.json` at `routers/review_pack.py:2873–2881`; heatmap regeneration rewrites it at `3951–3954`. Neither visible path refreshes boot. Inspection-start is particularly concrete: boot contains that field (`services/review_boot.py:126`), so the displayed start and stored boot start can differ after a successful request.

4. **Failure preserves potentially stale boot.**  
   Invalid pack bytes make `apply_review_boot` return `False` without clearing previous columns (`services/review_boot.py:146–152`). Persistence exceptions are non-blocking (`177–182`, `203–208`). Heatmap publication also precedes the DB commit; a subsequent failure rolls back DB state but leaves changed storage bytes (`routers/review_pack.py:3954–3983`).

### Implications

Boot is a free-floating projection rather than an adopted-version projection. This permits obsolete first-paint locations/start markers and makes retries capable of reversing newer boot state.

There is also a related certification boundary: adoption defines version changes exclusively through path/job differences (`services/review_pack_adoption.py:120–122`). Changed bytes at the same path/job are therefore invisible to that invalidation mechanism. The supplied router rewrite paths do not visibly invoke it.

The track-response SHA does not solve this: it attests the canonical footage trajectory, not the complete pack or boot payload (`routers/review_pack.py:423–497`, `4208–4236`).

## Smallest cohesive correction

Centralize **publication plus adoption of a version-bound boot projection**, rather than adding unconditional stamping calls:

- On every adopted version change, replace boot from the candidate’s exact bytes in the adoption transaction, or clear both boot columns when boot is unavailable.
- Require background boot writers to supply an expected artifact identity and verify it under the same inspection lock before writing. Obsolete attempts must be no-ops.
- Route inspection-start and heatmap publications through that boundary.
- Use an immutable revision key for changed published bytes, with an expected-current-version check for edits. Upload the revision first; then atomically commit its pointer, boot, acceptance/sign-off transition, and audit.

The immutable revision is necessary for the supplied partial-failure ordering: merely stamping boot after overwriting the existing object still leaves changed storage paired with rolled-back DB state. An unsuccessful DB adoption should leave only an unreferenced candidate, not modify the currently referenced artifact.

## Regression coverage

1. **A → B adoption:** B’s pointer and boot commit together; unavailable boot clears A’s projection.
2. **Delayed A writer:** after B adoption, attempting to persist A leaves B’s state unchanged.
3. **Retries:** identical adoption is idempotent; older-job adoption changes neither pointer nor boot; A → B → A does not revive prior proof.
4. **In-place edit replacement:** start/heatmap edits publish a revision whose boot SHA matches its exact bytes.
5. **Fault injection:** fail upload, boot derivation, audit/flush, and commit separately. Assert the previously adopted artifact remains coherent and failed candidates cannot become current through a delayed boot write.
6. **Concurrent edits:** an edit based on A cannot overwrite already-adopted B.

## Limits and discarded conclusions

- The inspection-detail reader and frontend reconciliation are outside the packet. Thus **state divergence is established; actual stale UI rendering is not**.
- Cache implementation and adoption call sites are outside the packet; their freshness or caller-level safeguards cannot be assessed.
- Strict older-job rejection and same-version adoption no-ops are useful existing controls. Null-job handling, explicit ordering bypass, and compensation overrides are not independently proven defects.

**Next action:** implement and test the version-bound publication contract before adding more best-effort boot writes.

*Direct analysis of the supplied immutable snapshot; no execution or external inspection.*

openai / gpt-6-luna / low / low effort answer

## Conclusion

**Missing invariant: the boot payload must be invalidated or verified against the currently adopted pack version before it is served.** In the supplied implementation, boot data is version-tagged, but no shown reader checks that tag against the current review-pack pointer or bytes.

`build_review_boot` stores `pack_sha256` alongside the slim payload (review_boot.py:106–130), and `apply_review_boot` writes both fields (144–152). But the supplied code also has a best-effort dedicated-session writer that loads the inspection, applies the boot, and commits without checking whether the inspection still points to the pack that produced those bytes (185–208). If that write is delayed, an older boot can overwrite a newer one. The savepoint writer likewise applies bytes to the supplied inspection without a version check (155–183).

Adoption updates `review_pack_path` and `review_pack_job_id` under lock and invalidates acceptance/signoff when either changes (review_pack_adoption.py:83–89, 120–140), but does not update or clear the boot fields. The boot comment says the DB sibling is served from `GET /inspections/{id}` (review_boot.py:3–6); that reader is outside the packet, so whether it validates `pack_sha256` is **unknown**. The evidence therefore establishes a concrete stale-write risk in boot persistence and an adoption-side gap, but cannot establish that stale boot is actually served.

**Smallest cohesive correction:** make boot publication conditional on the current adopted pack version. Under the inspection row lock, verify that the expected pack identity still matches before writing the boot; on adoption, clear the boot fields (or otherwise make them unservable) in the same transaction as the pointer change. The boot reader should fail closed unless the boot’s pack digest is verified against the current pack version. Keep the existing best-effort failure behavior so boot problems do not block adoption.

## Regression coverage

- Delay an older dedicated-session boot write until after a newer pack is adopted and booted; assert the old write cannot replace the current boot.
- Adopt a new path or producer job while an old boot exists; assert the boot is cleared or rejected by the reader until refreshed.
- Retry adoption of the same path/job; assert it does not unnecessarily invalidate a still-current boot.
- Simulate boot persistence/flush failure; assert pack adoption and its transaction still succeed.

**Alternatives / uncertainty:** `pack_sha256` might already be checked by the out-of-scope GET reader, which would reduce the stale-serving risk, but would not prevent stale boot state from overwriting the current DB value. The packet also omits the pack-rewrite callers, so it does not show whether they serialize boot stamping with adoption or pass a locked/current inspection.

**Next useful action:** inspect the boot reader and pack-rewrite call sites to confirm serving and ordering behavior, then implement the version-conditional write and adoption invalidation with the tests above.

Primary judge's stated reason

B receives a slight forced preference because its router-to-storage-to-database trace and associated fault-injection coverage make the proposed invariant more useful across the requested partial-failure and changed-state scenarios. This is not an established material quality gap; A's smaller intervention remains defensible, and an independent review could prefer it.

This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.

Battle wave: b60a358e-7993-4567-b86d-c5b92705bbea. Pair: brp1_437064ab8227a2b4c5ffea35ed2fcd751ccdf0923145ff219b9f3f856aca1ca6. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.