claude-code-cli / claude-opus-5-5 / high / high 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-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.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 slight forced preference because its reachability qualifications better limit the risk of treating unproven scenarios or intended ordering as release-blocking defects. This is not an established material quality gap; an independent review could reasonably prefer B's concrete failure-trigger discussion.
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_1615ec3d584df181d4e3d7de8c63337153d4716567ff17d163c32d26c70a2a13. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.