← Model losses

Head-to-head comparison

claude-code-cli / claude-sonnet-5-5 / low / low effort preferred over xai / grok-4.7-efficient / high / high 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

Review the complete proposed admission-repair diff and regression files in uti26-admission-repair-review.packet.md. Find actionable defects in deferred pre-root validation, ambiguous create outcomes, concurrent/idempotent receipts, bounded evidence scope, and explicit judge-only terminal handling. Cite severity and exact file/line evidence from the packet. Distinguish implementation facts from test gaps; if none, say so. Do not edit files, run tests or claim broader untouched code was reviewed.

claude-code-cli / claude-sonnet-5-5 / low / low effort answer

# Evidence packet: admission-repair review (packet lines only)

Direct review only, with no tools run. Nothing outside the packet was read, and I make no claim about the untouched `native-run.js` or `transition` code.

## 1. Findings

**F1 (Medium, implementation fact): a non-throwing engine rejection after root creation is recorded as a definite rejection.**
- Evidence: `direct-rpc.js` lines 112-114 set `state = "admission-rejected"` whenever `launched.ok !== true`. That check ignores `receipt.admissionStage`.
- The uncertainty fence (lines 118-124) applies only to thrown errors.
- If the real engine catches an error after the callback (`native-run.js` line 53) and returns `{ok:false}`, a receipt with stage `root-create-started` or `root-created` becomes a plain rejection. That is an orphan root, or an ambiguous create, reported as a known rejection.
- The test at lines 188-193 uses a mock that rethrows, so it does not exercise this path.
- Fix: if stage is not `preflight` or `legacy-admission` and `durableRunCreated !== true`, set `admission-uncertain`, or at least record `rootCreated`.

**F2 (Medium, implementation fact plus test gap): "running" does not require that the root was created.**
- Evidence: line 113 sets `running` on `ok && durableRunCreated && runID`. It does not assert `admissionStage === "root-created"` in the deferred path.
- If any engine path saves a run without invoking `beforeAdmissionCommit` (the patch adds only one call site, line 53), the receipt is `running` against a nonexistent root session.
- No test covers an engine that returns success without calling `create`.

**F3 (Medium, uncertainty): every pre-callback throw is classified as a definite, permanent rejection.**
- Evidence: line 120 treats any throw while stage is `preflight` as `admission-rejected`, with `rootCreated:false` and `modelDispatched:false` (line 124). The stage only changes inside `createRoot`.
- This is correct only if everything before line 53 has no side effects. The patch removes `stampTaskDifficulty` from before that point (line 45 deleted), but I cannot see the other pre-callback code (receipt revalidation, evidence reading, session or Mission Control calls).
- Transient errors such as storage or I/O failures become non-retryable under the same request ID.
- The preflight code may also use `toolContext.sessionID` before the root exists. This is unverifiable from the packet.

**F4 (Low-Medium, implementation fact): the judge-only terminal rule is not tied to receipt mode.**
- Evidence: line 133 accepts `phase` in `["synthesized","judge-only"]` for any receipt.
- A non-judge-only receipt that returns `judge-only`, or a judge-only receipt that returns `synthesized`, becomes `completed`.
- The check should be `receipt.synthesisMode === "judge-only" ? "judge-only" : "synthesized"`.
- It also does not check that the `synthesis` skipped state is present.
- Related test gap: the RPC schema (line 64) allows `synthesisMode` without `moaJobSpec`. The only test (line 203) checks an invalid enum value. Judge-only without a V2 spec, and `synthesisMode` combined with a follow-up, are untested at the RPC level. Python rejects the first case (line 149), but RPC-level enforcement is not visible in the packet.

**F5 (Medium, uncertainty and test gap): evidence-scope bounds are shape-only, and engine consumption is unproven.**
- Evidence: `direct-rpc.js` line 75 and `server.py` lines 152-157 check count (1-64), type, non-blank and length ≤1000.
- Neither checks absolute paths, `..` traversal, duplicates or normalization. Confinement would have to happen in the engine, which the packet does not show.
- The `native-run.js` hunks never reference `matchedEvidencePaths`. Only a mocked engine receives the field (test line 182), so there is no evidence the engine honors or bounds it.
- Whitespace-only paths are rejected but untrimmed paths pass through as-is.
- JS `length` (UTF-16 units) and Python `len` (code points) differ for non-BMP characters, which is a minor inconsistency.

**F6 (Low, test gap): concurrency and idempotency coverage is thin.**
- Tests replay sequentially (lines 186, 192, 198).
- There is no concurrent same-`requestID` submit or advance test.
- There is no test of a crash while stage is `preflight`, or of recovery from a persisted `admitting` receipt with a stage.
- There is no engine-level test of callback ordering, such as the callback running before `stampTaskDifficulty`, or the callback not running on a rejection.
- Three consecutive `transition(receipt,"admitting")` calls on the same state (lines 96, 99, 103) depend on `transition` accepting same-state writes. This is not shown, and I did not run the tests.
- `inputHash` is computed outside the packet, so I cannot confirm it covers `matchedEvidencePaths`. If it does not, replay with different paths would be accepted silently.
- `admissionStage` is never cleared, which is harmless but untested.

## 2. Likely false positives and discarded hypotheses
- The flight lock (`native-run.js` lines 16-22) still wraps the callback, so a double create within one root is unlikely.
- Moving the difficulty stamp after the callback (lines 45 and 54) looks safe, assuming `plan` and `input` are in scope at the new site. I cannot see the enclosing scope.
- Follow-up rejection of `matchedEvidencePaths` (line 78) is consistent with Python (line 153).
- The closure reassigning `receipt` (lines 94-100) is intentional and fine.

## 3. Missing evidence
- `transition`, `owner` and `inputHash` implementations.
- The engine's evidence and path consumption.
- The code between lines 3287 and 3765 of `native-run.js`.
- The `_direct_rpc` signature.
- The source of the "explicit task declaration" error text expected by the test at line 203.

## 4. Next action
Fix F1, F2 and F4 in `direct-rpc.js`. Add tests for each:
- an engine that returns `{ok:false}` after calling `create`;
- an engine that returns success without calling `create`;
- a mismatched phase and mode pairing.

Then confirm the engine confines `matchedEvidencePaths`.

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

The patch has actionable correctness defects. The deferred path can turn infrastructure failures into sticky denials, and post-create outcomes are classified inconsistently. Judge-only completion and evidence bounds are weaker than the new fields imply. Native callback order is only partly visible and is not exercised by the new tests.

## Findings

1. **High — every pre-root throw becomes a sticky semantic rejection.** In `direct-rpc.js` (packet lines 118–124), `rejectedBeforeRoot` is only `receipt.admissionStage === "preflight"`. Any throw in that stage is persisted as `admission-rejected` with a synthetic `{rootCreated:false, modelDispatched:false, stage:"preflight"}`. The test at lines 181–186 makes that denial non-replayable. Confirmed triggers that are not semantic preflight failures: missing `launchMoAAfterPreflight` (line 106) and the in-flight throw in `launchMoA` (lines 17–18), which happens before `createRoot`. Capability mismatch and lock collision permanently consume `requestID` and look like a known no-root denial. Implication: operators can treat an engine/skew or concurrency fault as a final evidence rejection.

2. **High — create outcome is not reconciled with receipt state.** `createRoot` (lines 94–100) sets `root-create-started` and persists it before `session.create`, then sets `root-created` without reading the create result. The catch (lines 120–123) then treats every later throw as `admission-uncertain`, including a definite pre-commit adapter failure. The success path (lines 112–113) does the opposite: any returned `ok !== true` becomes `admission-rejected`, and `running` does not require `admissionStage === "root-created"`. A return after the callback can be a clean rejection even though a root exists; a throw before any host commit cannot be a clean rejection; a success return without calling the callback can still be `running`. Ambiguous create is not actually distinguished.

3. **High — difficulty stamping moved on every launch, not only deferred admission.** `stampTaskDifficulty` is removed from before `runID = randomUUID()` (lines 45–46) and placed after the optional callback (lines 53–54), inside `launchMoAExclusive` for legacy and continuation callers too. `launchMoAAfterPreflight` (lines 25–28) only checks V2 job shape, `continueRunID`, and callback type, then enters that same function. Visible fact: run identity is allocated, and an unshown region runs, before root creation and before stamping. A stamp or reservation failure now happens only after `createRoot` on the deferred path, so it orphans a root and is uncertain rather than a pre-root rejection. Whether the omitted region persists or dispatches is outside the hunk.

4. **Medium — judge-only completion is an unscoped phase allowlist.** Line 133 completes when `complete === true` and `phase` is `synthesized` or `judge-only`. `synthesisMode` is copied onto the receipt (line 86) but is not consulted. A judge-only receipt whose collect result is `synthesized`, or a non-judge-only result with `phase: "judge-only"`, is `completed` even if `synthesis.usageStatus` is not `not-dispatched`. The test at lines 194–198 only covers the matching happy path.

5. **Medium — evidence scope is bounded only by count and string length.** Schema (line 65), `validateInput` (line 75), and `server.py` (lines 152–157) allow 1–64 strings of length 1–1000, reject empty/whitespace-only and follow-up use, and do not reject `..`, absolute paths, NUL/newlines, duplicates, or paths outside `directory`. Whitespace-padded paths such as `" src/a.js "` pass. The `native-run.js` diff never reads `matchedEvidencePaths`. If unchanged guards do not already consume that field, the new bound is transport-only.

## Implementation facts vs test gaps

Facts from the diff: sticky preflight catch; stage set before create and not checked on the running/rejected return path; stamp call moved for all exclusive launches; terminal predicate ignores `synthesisMode`; path checks are length/count only.

Test gaps, not implementation proofs: `tests/admission-repair.test.mjs` mocks `launchMoAAfterPreflight` and never imports `native-run.js`, so callback placement, stamp order, flight-lock classification, and post-create launch failure are untested. No case for missing engine method, `{ok:false}` after create, `phase:"synthesized"` on a judge-only receipt, or unsafe paths. `tests/test_evidence_bridge.py` only checks transport and an empty list; it does not check follow-up, overlong, or non-string paths even though `server.py` implements those checks.

## Discarded

- The new `server.py` check is not dead code: it is indented with `else`/`try` (lines 150–158), so it runs on the success fall-through.
- Follow-up does not accept packet paths: line 78 rejects `matchedEvidencePaths` even though that key is filtered out of `keys`.
- The flight check-then-set is not a same-turn race: `flights.set` runs in the caller before the event loop can re-enter.
- `"judge-only"` is the phase the prompt and the test both use; the defect is the missing cross-check, not the spelling.

## Missing evidence

`transition()` same-state re-entry and field preservation, `owner()` versus `rootSessionID`, the unshown region between run construction and the callback, `stampTaskDifficulty`, and `advance()` short-circuit are outside the packet. Consequence: findings 2 and 3 may be worse if that region commits or dispatches, and finding 1’s flight collision depends on whether session ids are shared. Pinned code may already read `matchedEvidencePaths`; the packet does not show it.

## Next action

Do not activate this patch. Classify only typed semantic preflight failures as `admission-rejected`; keep infrastructure faults uncertain and retryable. Require `admissionStage === "root-created"` before `running`, and treat any post-callback failure, thrown or returned, as uncertain. Confine evidence paths to the submitted directory. Add tests that drive real `launchMoAExclusive` callback order, not only a mocked wrapper.

Primary judge's stated reason

A receives a weak, forced preference because it avoids recommending a high-severity correction to an explicitly intended ordering change. This improves review actionability, but B's more concrete preflight examples counterbalance that advantage. This is not an established material quality gap, and an independent review could reject the preference.

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

Battle wave: f1f06d7f-e063-470d-b7cb-20c74c8223f5. Pair: brp1_5e41da89e64eff722536453cab8a82e6fc8af7116b6292a71abee9e8422f3fc8. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.