openai / gpt-6.1-sol / low / low 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 / low / low effort answer
## Finding: boot state is not bound to the adopted pack generation
**High confidence in the service-level defect; end-to-end reachability depends on callers outside this packet.**
**Missing invariant:** a non-null review boot must belong to the inspection’s current `(review_pack_path, review_pack_job_id)` generation. Changing that generation must invalidate the previous boot, and delayed boot writers must not overwrite a newer generation.
### Evidence and reproducible trigger
- `[REDACTED: private project name]/backend/app/services/review_pack_adoption.py:101–118` rejects stale producer jobs under the inspection lock.
- Adoption changes the pointer/job and invalidates review proof transactionally (`124–162`), **but leaves both boot columns untouched**.
- `[REDACTED: private project name]/backend/app/services/review_boot.py:144–152` installs boot content and its SHA without checking the current pointer or producer.
- Both boot persistence entry points identify the destination solely by inspection ID (`155–176`, `185–202`). The dedicated-session writer can therefore run after a different generation has been adopted.
- The SHA identifies the supplied bytes (`133–141`), not their relationship to the current inspection generation.
- Retrieval chooses the current pointer (`[REDACTED: private project name]/backend/app/routers/review_pack.py:4068–4097`), independently of those boot columns.
**Trigger:**
1. Generation A is current, with boot A.
2. Adopt generation B and commit.
3. Boot B publication fails—or a delayed A boot publication completes afterward.
4. The inspection retains or receives boot A while file retrieval selects B.
The intended first-paint fields—start/end times, zones, cards, and location count—can consequently describe a different artifact from the retrieved pack. Repeating adoption of B does not repair this: the same pointer/job takes the no-change branch (`review_pack_adoption.py:163–164`).
There is also a same-generation freshness gap: inspection-start and heatmap writes replace `inspection.json` without updating boot in their displayed implementations (`review_pack.py:2873–2896`, `3951–3976`). Whether another storage layer refreshes boot is not established.
## Smallest cohesive correction
1. **Clear both boot columns inside the existing adoption transaction whenever `version_changed` is true**, including removal and compensation. Failed boot publication then leaves an absent optimization, not misleading data.
2. **Require an expected pack path and producer job for boot persistence.** Lock/reload the inspection and install boot only if both still match. Apply this guard to both persistence entry points; preserve caller-owned transaction semantics.
3. For same-generation JSON rewrites, refresh boot from the exact serialized bytes written, or invalidate it before publication. Do not treat a content SHA alone as a generation guard.
No distributed storage/DB transaction is needed to establish the narrower safety guarantee: unavailable boot is acceptable; cross-generation boot is not.
## Regression coverage
- A → B adoption clears boot atomically with pointer/job changes.
- Delayed A boot publication after B adoption cannot change B’s boot.
- Failed B boot publication leaves boot absent; retry installs B.
- Stale adoption rejection preserves the current boot.
- Same-generation adoption retry preserves a valid boot.
- Clearing a pack and compensation cannot retain the displaced generation’s boot.
- Inspection-start/heatmap rewrite refreshes or invalidates boot; injected publication failures cannot expose old boot as current.
## Limits and alternatives
Proof invalidation itself is explicitly centralized and job-ordered; the packet does **not** establish that adoption bypasses that mechanism. Actual first-paint consumption, boot callers, storage hooks, and cache invalidation are outside the supplied evidence. A consumer-side generation check could reduce impact, but cannot be assumed.
**Next useful action:** implement the adoption clear plus generation-checked boot write, then add the delayed-writer regression first. Analysis was independent and read-only.
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
A has a slight task-grounded advantage: its retrieval trace and rewrite coverage make the proposed correction easier to apply across the supplied boundaries. This is a weak, forced preference between substantially equivalent central findings, not an established material quality gap; an independent review could reasonably favor B's rollback coverage.
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_883512cd00af83f2fa53330ce5cd1a0d3df0011e29b4258204d58d872b906e8d. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.