openai / gpt-6.1-sol / high / high effort preferred over openai / gpt-6-luna / xhigh / xhigh 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 / xhigh / xhigh effort answer
## Conclusion — high confidence
The missing invariant is that review-boot data must belong to the inspection’s **currently adopted pack version**. The adoption code defines a version change as either a path or producer-job change, but boot writes are not bound to either.
`build_review_boot` hashes the pack bytes, and `apply_review_boot` stores the payload and hash together (`review_boot.py:106–152`). But both write paths accept only an inspection ID and bytes: the savepoint-based writer (`155–183`) and the dedicated-session writer (`185–219`) do not check the current pack path or job. Meanwhile, `adopt_review_pack` changes the pointer/job and invalidates acceptance when either changes (`review_pack_adoption.py:101–139`), but does not clear or update the boot fields.
This creates two reproducible stale-data cases:
- If adoption of pack B succeeds but B’s best-effort boot write fails, pack A’s boot remains stored.
- If a delayed retry writes A’s boot after B is adopted, it can overwrite the boot for B. The adoption’s stale-job check does not protect boot writes.
The stored SHA identifies the bytes used to build a boot payload; the supplied code does not enforce that it matches the currently adopted pack. The `review_boot.py` module says the inspection GET serves this DB sibling before pack bytes arrive (`lines 1–6`), so stale boot could affect first paint. **The retrieval route is not included**, so I cannot establish whether it separately suppresses stale boot data.
## Smallest cohesive correction
Make boot state part of the adopted pack version:
1. In the adoption transaction, clear both boot fields whenever `path_changed` or `job_changed`.
2. Require boot writers to receive the expected pack path and producer job ID, and write only if those still match the inspection under a row lock. This prevents an old retry from repopulating stale boot after adoption. Retrieval should fail closed when boot version identity does not match the current adopted version.
Clearing handles a failed new boot write; the conditional write handles delayed old retries. Both are needed.
## Regression coverage
- Adopt B after boot A; simulate B’s boot-write failure and verify no A boot remains eligible.
- Adopt B, then run a delayed/retried A boot write; verify it is rejected, including when the path is unchanged but the producer job ID changed.
- Verify a matching B boot write stores its payload and hash, and that adoption rollback leaves the previous pointer and boot state intact.
**Uncertainty:** The snapshot omits the retrieval route, `Inspection` model, boot-writer call sites, and tests. Those are needed to verify current read-side checks, field behavior, and whether writers currently run before or after adoption.
Primary judge's stated reason
Weak, forced preference for B: its concrete router rewrite and commit-failure traces better connect the common finding to the whole requested outcome and motivate additional regression cases. This is not an established material quality difference; A's smaller actionable correction remains a credible alternative, and an independent review could favor 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_2cec3a4c0b06c0ded8b35d7f4a9e60a2f9444d5d4ae6e4ff692352b82fb1f907. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.