← Model losses

Head-to-head comparison

claude-code-cli / claude-opus-5-5 / high / high effort preferred over claude-code-cli / claude-sonnet-5-5 / 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

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-opus-5-5 / high / high effort answer

# Evidence packet: admission-repair patch review

This is a direct, single-lane review of the packet only. I made no tool calls, ran no tests, edited no files and reviewed no code outside the packet.

## 1. Findings

### F1 (Medium, implementation fact): a returned outcome does not check how far admission got

**Evidence:** `repair.patch` lines 112–114 set the final state only from `launched.ok`, `launched.durableRunCreated` and `runID`. They never read `receipt.admissionStage`. The stage is used only in the thrown-error path (lines 118–124).

This leaves two gaps on the deferred path:

- **(a) Rejection after the root exists.** Suppose the engine calls `createRoot` (stage becomes `root-created`, line 98) and then returns `{ok:false}` instead of throwing. That could happen if a trial reservation fails inside the `try` at line 57 and the engine converts it into a returned rejection. The receipt becomes a clean `admission-rejected`, even though a root session now exists. That contradicts the comment "Once root creation starts, preserve the existing uncertainty fence" (line 119).
- **(b) Success without a root.** Suppose the engine returns `ok:true, durableRunCreated:true` without ever calling `beforeAdmissionCommit`. The stage is still `preflight`, yet the receipt becomes `running` with a `rootSessionID` that was never created (line 83).
  - This is plausible. The callback at line 53 is indented one level deeper than the old stamping call (6 spaces vs 4 at line 45), so it sits inside an enclosing block not shown in the packet.
  - Any code path that reaches `saveRun` without entering that block would bypass both the callback and difficulty stamping.

**Fix:** When the request is deferred:
- Treat it as `running` only if `admissionStage === "root-created"`.
- Mark any non-running outcome at `root-create-started` or `root-created` as `admission-uncertain`, or as rejected with `rootCreated:true` recorded.

**Confidence:** High that the check is missing. Medium that the engine can actually produce (a) or (b), because the enclosing block is outside the packet.

### F2 (Medium, implementation fact plus dependency gap): evidence paths are limited in count and length, not in location

**Evidence:**
- JS validation (line 75) and Python validation (lines 152–157) only check: it is an array, 1–64 entries, each a non-blank string of at most 1000 characters.
- Neither side rejects absolute paths, `..` segments, duplicates, NUL characters, or leading/trailing whitespace.
- The JSON schema (line 65) applies the same limits.

**Gaps:**
- The packet shows no engine code that reads `input.matchedEvidencePaths`. The engine hunks only reference `matchedEvidence.lanes` (lines 42–43). So "bounded evidence scope" is enforced only as transport limits. Whether paths are confined to the allowed directory, and whether they are honoured at all, cannot be verified here.
- The legacy (non-deferred) path also forwards `matchedEvidencePaths` (line 110, `input` passed as-is). The Python bridge allows them for qualification jobs without a job spec (test line 224 sets `purpose='qualification'`). If the legacy engine ignores the field, the declared scope is silently dropped.

**Fix:**
- Normalise paths and reject absolute paths, `..` and duplicates at the RPC boundary.
- Or reject `matchedEvidencePaths` unless the request is deferred.
- Confirm that the engine consumes the field and confines it to the location directory.

### F3 (Low, implementation fact): judge-only completion is not tied to the receipt's requested mode

**Evidence:** Line 133 marks either `synthesized` or `judge-only` as `completed` for any receipt.

**Consequences:**
- A `judge-only` receipt (line 86) whose run reports `synthesized` would be accepted as completed. That would hide an unwanted synthesis dispatch.
- A normal receipt whose run reports `judge-only` would also be accepted.

**Fix:** Require `phase === (receipt.synthesisMode === "judge-only" ? "judge-only" : "synthesized")`.

### F4 (Low, implementation fact): `createRoot` can run more than once

**Evidence:** `createRoot` (lines 94–100) has no once-guard.

**Consequence:** If the engine ever calls the callback twice, `session.create` runs again with the same ID. The second call likely fails, and the receipt becomes uncertain. This is safe because it fails closed, but it is avoidable.

**Fix:** Guard the callback so it runs at most once.

### F5 (Low, implementation fact): pre-root errors are stored verbatim and are permanent

**Evidence:** Line 122 stores up to 2000 characters of `cause.message` in the receipt and returns it to callers.

**Consequences:**
- Any internal detail in the message (paths, evidence text, Mission Control responses) is persisted.
- Transient failures before the root exists, such as a network error during role qualification, also become a permanent `admission-rejected` for that request ID. The client must use a new request ID.
- This is acceptable if intended, but the contract should document it.

### F6 (Low, conditional): side effects before the callback may be misclassified

**Evidence:** The rejected-before-root classification (line 120) is only correct if `launchMoAExclusive` has no persistent side effects before line 53. The patch moves `stampTaskDifficulty` later (lines 45 → 54), but the packet does not show the code between engine lines 3525 and 3765.

**Consequence:** Any write or emit in that span would be wrongly reported as a clean rejection.

### F7 (Trivial, implementation fact): length is measured differently in Python and JS

**Evidence:** Python `len` and JSON Schema `maxLength` count code points. JS `.length` (line 75) counts UTF-16 units.

**Consequence:** Paths made of characters outside the Basic Multilingual Plane can pass the Python bridge and then be rejected by JS. This fails closed.

## 2. Test gaps (separate from the implementation findings)

**Fake engines only:**
- All JS tests use fake engines (lines 182, 189, 195).
- Nothing exercises the real `launchMoAExclusive`. Callback order relative to receipt revalidation, stamping, reservations, `saveRun` and worker admission is therefore untested.

**Missing receipt cases:**
- No test where the stage is `root-created` and the engine then throws. Expected: `admission-uncertain`.
- No test where the engine returns `ok:false` after `createRoot`, which is F1(a).
- No test where the engine returns `ok:true` without calling `createRoot`, which is F1(b).
- No test of the legacy or follow-up path, where the root is created before `launchMoA` (line 109).

**Weak replay assertion:**
- The replay check at line 192 counts calls but does not assert that the replayed receipt is still `admission-uncertain`.

**Judge-only contract:**
- The test fixes the phase string `'judge-only'` in the fake engine (line 195).
- Nothing confirms the real engine emits that value, and no test covers a mode/phase mismatch (F3).

**Path validation coverage:**
- No tests for more than 64 entries, paths longer than 1000 characters, non-string entries, follow-up requests with paths (lines 78 and 153), traversal or absolute paths.
- No test checks whether `inputHash` covers `matchedEvidencePaths`.

**Concurrency:**
- No test submits the same request ID twice at once. The suite relies on `exclusively`, which is outside the packet.

## 3. Alternatives and likely false positives

- **F1(b) may never happen.** If the enclosing block at engine line ~3765 is on every path to `saveRun`, the scenario is impossible. The check is still cheap defence in depth.
- **F1(a) may be intentional.** A known reservation rejection after the root exists could be a deliberate "known rejection". If so, the receipt should still record `rootCreated:true`.
- **Storage failures are safe.** A failed `transition` write at line 96 still leaves the stage as `root-create-started`, because line 95 mutates the receipt before the write. The result is uncertain, which is correct. A failed write at line 103 leaves the stage as `preflight` with no engine call, which is a correct rejection.
- **Engine refusals before the root are safe.** The flight-guard error (line 18) and a missing engine method (line 106) are both classified as rejections before the root. That is correct, since no root was created.

## 4. Missing dependencies and their effect

These are outside the packet: the `transition`/`exclusively`/replay logic, how `inputHash` is computed, the enclosing block around engine line 3765, the engine code between lines 3525 and 3765, whether and how the engine consumes `matchedEvidencePaths`, and the engine's collect phase value for judge-only runs. As a result, F1(b), F2's enforcement question and F6 stay conditional.

## 5. Next useful action

- Add the stage-aware state check from F1 at line 113.
- Restrict or normalise `matchedEvidencePaths` (F2) and verify that the engine consumes it.
- Tie completion to `receipt.synthesisMode` (F3).
- Add a real-engine integration test that checks callback order and the judge-only phase string.

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`.

Primary judge's stated reason

Forced, weak preference for B because its explicit alternative interpretation better helps a maintainer separate a justified investigation or defensive refinement from a proven correctness repair. This is not an established material quality gap; an independent review could reasonably prefer A's restraint on additional hypotheses.

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_0f80cc8ae6d430b6c87bfe34929d6b25423d2ae85ff0b1cef2d7e98d0f6d2bef. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.