← Model losses

Head-to-head comparison

openai / gpt-6-luna / high / high effort preferred over claude-code-cli / claude-haiku-5-5 / medium / medium 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

Read-only implementation analysis. A cache starts fetch(key) and stores its promise. invalidate(key) removes it; a new fetch stores a new promise. The old request completes later and writes its stale value unconditionally; its finally also deletes the new promise. Design minimal per-key generation and identity checks for both successful completion and cleanup, including rejection, concurrent callers, and invalidation. Explain which cancellation guarantees are actually needed. Give two deterministic interleavings to verify. No edits, tools or executed-test claims. Three numbered items, under180words.

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

1. Keep a per-key generation and in-flight promise identity. `fetch` reuses the current promise; otherwise capture the generation, create and store a promise, and on success cache its value only if the generation is unchanged and that promise is still current. In `finally`, clear the in-flight promise only under the same checks. This prevents stale success and cleanup from affecting a replacement.

2. `invalidate` increments the generation and clears the cached value and in-flight identity. Rejections use the same guarded `finally`, allowing a current failed request to be retried without an old rejection deleting a newer request. Concurrent callers share the stored promise. Cancellation is not needed for correctness: invalidated work may finish, but its result is ignored. Abort is only an optional resource-saving measure.

3. Verify with deterministic deferred promises: (a) start old request, invalidate, start and resolve new request, then resolve old; the new value and state remain. (b) start old request, invalidate, start new request, then reject old; the new promise remains joinable and can resolve successfully.

claude-code-cli / claude-haiku-5-5 / medium / medium effort answer

1. **Guard completion and cleanup by entry identity.** Store `{promise, gen}` per key, with `gen` from a per-key counter that survives deletion so a recreated entry never matches a stale token. On success, write the value only if `entries.get(key)?.gen === gen`. In `finally`, delete only under the same check. Rejections use the same guard and rethrow so current callers see their own outcome. Concurrent callers share the matching entry's promise, and `invalidate` deletes the entry.

2. **Cancellation is not needed for correctness.** Identity checks make stale settlements inert. `AbortSignal` only saves network work and must not be the mechanism that prevents stale writes.

3. **Interleavings to verify:** (A) `fetch` starts P1 (gen1), `invalidate(key)`, `fetch` starts P2 (gen2), then P1 resolves with stale v1. Expect no cache write, and P2 stays mapped. P2 then resolves with v2, which is cached. (B) Same setup, but P1 rejects while P2 is pending. Expect P1's handler to leave P2 mapped, P2's callers to be unaffected, and a later `fetch` to succeed after P2 settles.

Primary judge's stated reason

B is the slight forced preference because its explicit invalidation transition makes the proposed design easier to implement without leaving previously cached data valid. A's unique-token design and stronger pending-success interleaving substantially counterbalance that advantage. This is not an established material quality gap; 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: 9c8e2bb2-6ea9-4ce6-9ef5-3d06faca2bbd. Pair: brp1_0f902c7f6b875b5477ff46f4a5743a274ade05da87e5328fcac0c078abe87173. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.