xai / grok-4.7-efficient / high / high effort preferred over claude-code-cli / claude-opus-5-5 / 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
From the supplied recorder compatibility source, SDK contracts, maintenance receipt, frozen-run admission proof and idempotency tests, design the smallest acceptance and recovery plan for same-root frozen-result recording. Trace ownership across the native receipt/run, adapter evidence transport, recorder journal and write-attempt fence. Specify exact preconditions, failure interleavings (reload, lost response after append, partial cohort, duplicate caller), authoritative reconciliation reads, rollback limits, and pass/fail checks. Identify what the current supported surface can execute deterministically and any minimal missing interface; distinguish source facts from proposals. Do not invoke tools, edit files, rerun workers/judge, manufacture root tool history, or publish. Return a prioritized plan with exact packet file/line references and explicitly unsupported claims.
xai / grok-4.7-efficient / high / high effort answer
The smallest safe plan is fail-closed reconciliation, not a second scorer call. Same-root frozen recording can deterministically admit once, fence before the scorer, and replay only a stored `direct-score-result`. It cannot deterministically recover a lost response after a journal append, roll back a partial cohort, or prove the included 6/6 receipt against these excerpts.
## 1. Conclusion and prioritized plan
**Ownership.** Four layers, one writer each. Do not let a later layer invent identity for an earlier one.
| Layer | Owner | Authoritative record | When it moves |
| --- | --- | --- | --- |
| Native receipt/run | `readDirectScoringAdmission` + `direct-rpc` `record` | `direct-bridge/v1/request/${requestID}`, `root-run/${rootSessionID}`, `runs/${runID}`, session `metadata.agentTeamsDirect` | Read-only during record |
| Write-attempt fence | `prepareScoreWrite` / `finishScoreWrite` | `score-finalization/${runID}`, `finalization-attempt/${runID}`, `scoreToolCallKey(session,id,messageID)`, in-memory `finalizationAttempts` + scoring activity lease | Before `tool.execute`; terminal state after return |
| Adapter transport | registered `record_agent_outcomes` | No durable score identity. Refuses `{runID,payloadDigest}` | After the native resolver expands input |
| Recorder journal | scorecard worker, not in this packet | `events.jsonl` under `OPENCODE_SCORECARD_DIR` or `[REDACTED: home-relative path]` | Side effect inside `execute`, outside native storage |
| Direct readback | `recordFrozenScore` only | `direct-score-result/${runID}` | After `finishScoreWrite`, not inside it |
Fact: the fence is acquired before any registered scorer call. `recordFrozenScore` calls `prepareScoreWrite` and only then `tool.execute` (`native-run.js:2573-2577`). `prepareScoreWrite` adds `finalizationAttempts` and writes `state:"attempted"` before returning (`native-run.js:2511-2530`). The adapter throws if it still sees `runID` or `payloadDigest` (`adapter/index.js:803-805`).
**P0 preconditions, all required, any miss is fail.** These are source-enforced, not proposed.
1. Entry is `direct-rpc` `record({requestID,payloadDigest})` (`direct-rpc.js:280-285`). Receipt `state==="completed"`, `runID` present, `previousRequestID===null`, `rootSessionID===ownedRoot(requestID)`. Follow-ups cannot record on this path.
2. `readDirectScoringAdmission` returns `state:"verified"` (`direct-scoring-admission.js:10-28`). Otherwise `{state:"unverified"}` and the RPC throws. Locators and hashes alone do not admit (`direct-scoring-admission.js:6-7`).
3. Verified conjuncts that matter for recovery: session id `ses_direct_` + 40 hex and equal to `ses_direct_${sha256(JSON.stringify(requestID)).slice(0,40)}`; same directory; bridge receipt version 1, `admission.ok`, `durableRunCreated`, pointer `runID` match, `inputHash` match; `purpose==="production"`; `synthesisMode==="judge-only"`; `moaJobSpec.source==="job"` and `version===2`; run version 1, `type==="analysis"`, `status==="completed"`, `finalResult.complete`, phase `judge-only`; `run.createdAt >= receipt.createdAt`; every non-question case field canonically equal; frozen, returned, and receipt scoring inputs canonically equal and all digests equal `scorePayloadDigest(frozen.input)`; outcomes length at least 2, unique `childSessionID`s, every `waveID===runID`.
4. `recordFrozenScore` rechecks analysis type, parent session, directory, and `authority(rootSessionID)` falsy (`native-run.js:2562`). Observed polarity: truthy `authority` denies. The function body is not in the packet.
5. `frozen.payloadDigest===payloadDigest===scorePayloadDigest(frozen.input)` (`native-run.js:2564`). No reconstructed rows. The packet’s operational sentence says the same; the code enforces it here and again at `native-run.js:2455-2460` and `2474-2477`.
6. Signal not aborted, and `record_agent_outcomes.execute` is a function (`native-run.js:2568-2570`). Otherwise no attempt is admitted.
7. Inside the fence, after expansion: `scoreRunForInput` returns that same `runID` (`native-run.js:1705-1716`, `2466-2469`); `canonicalJSON({outcomes})` equals the frozen input; every outcome `purpose` equals `run.purpose||"production"`; `validateScoreBatch` passes. One wave only.
`authority`, `ownedRoot`, `validateScoreBatch`, `admitScoreWrite`, `scorePayloadDigest`, and `canonicalJSON` are called but not defined here. Their required call-site results are facts; their other behavior is unknown.
**P0 happy path the current surface can execute.**
1. If `direct-score-result/${runID}` exists and root plus digest match, return it with `replayedReadback:true` and do not call the scorer (`native-run.js:2566-2567`). Mismatch throws `SCORE_INPUT_GUARD_REJECTION` and does not overwrite.
2. Otherwise build a synthetic call: `messageID` is deterministic (`msg_directscore_` + runID without dashes); `id` is `call_directscore_` + random UUID without dashes (`native-run.js:2571-2573`). No session transcript is written by this function. The comment says that; the function does not show a session append.
3. `prepareScoreWrite` snapshots `nativeCallInput` before async work (`native-run.js:2440`), expands the reference to `frozen.input` (`native-run.js:2464`), takes `acquireRunActivity(...,'scoring')` (`native-run.js:2435`, `run-operation-lock.js:7`), then writes the attempted receipt bound to `toolCallID`.
4. Adapter must see outcomes, not the reference. It may still return `recorded:0`, skipped/uncertain rows, or `executionFailure` content without throwing (`adapter/index.js:812-823`, `868-869`).
5. `finishScoreWrite` sets `returned` or `failed` only if `event.id` is a non-empty string, the tool-call binding exists, and `receipt.toolCallID===event.id` (`native-run.js:2537-2550`). Transport success is not score success (`native-run.js:2545-2546`).
6. Only then is `{state:"returned", rootSessionID, runID, payloadDigest, toolCallID, result}` stored (`native-run.js:2580-2581`). That object does not contain journal hashes, recorded counts, or `idempotentReadback`.
**P1 pass/fail checks.** Use frozen `outcomes.length` as N. Do not hard-code the sample’s 6.
Pass the first call only if every read agrees:
- Admission still `verified` for this root, run, and digest.
- `score-finalization/${runID}.state==="returned"`, `payloadDigest` matches, `toolCallID` matches `direct-score-result.toolCallID`, and the id matches `call_directscore_` + 32 hex.
- `direct-score-result` root and digest match, `replayedReadback` absent on the first return.
- **External content check, not enforced by `recordFrozenScore`:** result content has `recorded===N`, `skipped===0`, `uncertain===0`, and is not a validation or execution failure payload. Proposal, required because `native-run.js:2579-2581` stores whatever `execute` returned.
- Second sequential call returns the same stored result plus `replayedReadback:true` and does not execute the tool (`native-run.js:2567`).
- Scoring lease released in `finally` (`native-run.js:2551-2556`). Recovery may then take the in-memory lock only if no activity, flight, or collection remains (`run-operation-lock.js:8`).
- Publication is not part of this path. Do not publish.
Fail closed on guard rejection, idempotent rejection of the first call, adapter reference-form throw, missing tool, abort, authority denial, or any admission conjunct miss.
**P1 authoritative reads.** After reload, only durable keys count. In-memory `finalizationAttempts`, `scoringRunReleases`, and `runOperationLocks` are gone (`run-operation-lock.js:4-8`).
- R1 session metadata `agentTeamsDirect`
- R2 bridge receipt
- R3 `root-run/${rootSessionID}`
- R4 `runs/${runID}` frozen input, digest, `finalResult.scoring`
- R5 `score-finalization/${runID}`
- R6 `finalization-attempt/${runID}`
- R7 `direct-score-result/${runID}`
- R8 tool-call binding; key shape is not in the packet
- R9 `journalSnapshot` only if a reviewed-recovery row exists (`native-run.js:2498-2500`); snapshot implementation is not in the packet
- R10 `reviewed-recovery/${runID}/score-preparation`
Classification:
- R7 match: replay. Deterministic. Do not read the journal to decide this.
- No R5, no R6, no R7, admission still verified: first write still admissible. Deterministic retry.
- R5 `failed`, or R5 `attempted`/`returned`, or R6 present, and R7 absent: consumed. Do not call the scorer. Packet fact: a consumed attempt cannot be replayed.
- R5/R6 present, R7 absent, R10 `state==="ready"`, and journal bytes plus identity still equal the stored plan: the only source-supported replay door (`native-run.js:2497-2502`). `admitReviewedScoreRecovery` is not defined here. If the journal changed, the source throws and admits nothing (`native-run.js:2500`).
- R7 present but root or digest differs: conflict. Do not overwrite (`native-run.js:2567`).
**P2 failure interleavings.**
Reload. Locks do not survive. The durable fence does. A crash between `finalizationAttempts.add` and the storage set can look like “never attempted” after reload; that window is real and tiny (`native-run.js:2511-2513`). A crash after R5 `attempted` is consumed across restart even though the activity lock is gone.
Lost response after append. `execute` can append, then the process can die before R7. Two windows exist: after append and before `finishScoreWrite` (R5 stays `attempted`), and after `returned` but before R7 (`native-run.js:2579-2581`). Neither window stores a pre-execute journal digest. Post-crash attribution of new jsonl bytes to this `toolCallID` is unsupported. Retry hits the fence, not the replay short-circuit. No automatic repair.
Partial cohort. Admission requires at least two unique children, but the adapter can return zero quality rows or a caught worker failure as successful transport. `finishScoreWrite` will still mark `returned` if `execute` did not throw. If `execute` throws, the catch writes `failed` with the generic message `"Direct scorer failed after admission"` and does not write R7 (`native-run.js:2578`). A pre-append adapter throw still consumes the attempt. Partial jsonl rows have no delete path in this packet.
Duplicate caller. Sequential second call after R7 replays. Sequential second call after the fence and before R7 is rejected as already attempted (`native-run.js:2508-2509`). Same in-process `leaseKey` is rejected while the first call holds it (`native-run.js:2434`). Concurrent callers are not safe on the shown code: the activity lock allows multiple scoring activities (`run-operation-lock.js:7`), and admission is read-then-write, not a compare-and-set (`native-run.js:2492-2513`). `exclusively` wraps the RPC handler (`direct-rpc.js:280`) but is not defined, so RPC serialization is unproven. Do not run two recorders.
Recovery versus scoring. Recovery is exclusive and does not queue (`run-operation-lock.js:1-8`). Scoring refuses if recovery is held. After a crash both locks are empty, so the lock does not preserve the fence. R5/R6 do.
**Rollback limits, all source-backed.** None.
- No journal truncate, prefix restore, or row delete appears.
- A failed `score-finalization` write still best-effort writes the legacy attempt, which consumes the next admission (`native-run.js:2525-2527`, `2493`).
- `finishScoreWrite`’s terminal write swallows errors (`native-run.js:2550`), so `attempted` can stick forever.
- R7 is never replaced once present.
- The availability-only first-write exception is rechecked and cannot be shared with a consumed marker (`native-run.js:2486-2507`). It is not the direct-record happy path. `availabilityOnlyScoreReceipt` and `verifyScoreAvailability` are not in the packet.
- Reviewed recovery refuses on digest, original receipt, journal bytes, or journal identity drift (`native-run.js:2500`).
**Deterministic now:** fail-closed admission, same-root/directory/digest/exact-input guards, fence-before-execute, sequential R7 replay, sequential second-attempt rejection once R5/R6 is visible, adapter rejection of an unresolved reference, lease release, cancel-before-admission.
**Not deterministic on this surface:** lost-response repair, partial-cohort repair, concurrent exclusion, “transport succeeded” implying N scores, publication, and treating the sample receipt as a property of these excerpts.
**Minimal missing interface. Proposal, not present.** One read-only reconciler and one narrower completion record. No second scorer, no row rewriter.
`reconcileFrozenScore({rootSessionID,runID,payloadDigest})` should return admission, fence, readback, and `replayable | admissible-first-write | blocked-consumed | uncertain-appended | conflict`, using only R1-R10, without `tool.execute`. `uncertain-appended` cannot be computed until the fence itself stores `journalBytesDigest` and `journalIdentity` before `execute`. Smallest write-side addition: before `execute`, persist `{phase:"admitted", toolCallID, payloadDigest, journalBytesDigest, journalIdentity}`; after `execute`, persist R7 only when content has `recorded===N`, `skipped===0`, `uncertain===0`; otherwise persist `{phase:"uncertain"}` and stop. A human reviewer may later bind that uncertain row to a proven suffix. The current R10 door does not do that job unless someone has already written a still-matching plan by a mechanism absent from this packet.
Confidence: high on excerpted control flow; medium on recovery outcome because `admitScoreWrite`, `admitReviewedScoreRecovery`, and the journal writer are outside the packet; low on transferring the sample 6/6 result onto these excerpts.
## 2. Alternatives, discarded hypotheses, likely false positives
- Discarded: replay the scorer after a crash because the journal might be idempotent. The native fence forbids a second sample even if the worker would have appended zero rows (`native-run.js:2508-2509`). Worker idempotency is not in the packet. The sample’s `secondCallAddedRows:0` is a sequential readback claim, not a crash-recovery proof.
- Discarded: treat `finishScoreWrite` `returned` as recorded quality. The source explicitly rejects that (`native-run.js:2545-2546`), and the adapter can return failure content without throwing.
- Discarded: use the in-memory recovery lock as the cross-restart fence. It is process-local and rejects rather than queues.
- Discarded: reconstruct outcomes from journal rows or from the admission `taskInput`. Admission returns only a task-input subset (`direct-scoring-admission.js:28`). Operational text forbids reconstructed rows. Journal row schema is absent.
- Discarded: require 12 journal rows as a general pass check. The sample says 12 appended rows for 6 outcomes and 6 task-completed plus 6 evaluated rows. Two rows per outcome is a hypothesis, not a contract in these excerpts.
- False positive: `state:"recorded-readback-verified"`, `prefixPreserved`, `idempotentReadback`, and `appendedJournalRows` look like native receipts. `recordFrozenScore` writes none of those fields (`native-run.js:2580`). They are external harness claims.
- False positive: a ready R10 record authorizes a fresh scoring sample. It can only admit through `admitReviewedScoreRecovery` when the journal snapshot still matches, and that function’s effects are unknown.
- The minified guard at `native-run.js:2425-2427` duplicates `2442-2448`. It runs before the lease. It does not change admission. Not a second fence.
## 3. Missing evidence and consequence
Not in the packet, so these claims are unsupported: `admitScoreWrite` reasons; `availabilityOnlyScoreReceipt`; `verifyScoreAvailability`; `admitReviewedScoreRecovery`; `journalSnapshot` fields beyond the four comparisons at `native-run.js:2500`; `scoreToolCallKey`; `finalizationKey`; `authority`; `exclusively`; `ownedRoot`; `validateScoreBatch`; `SCORE_INPUT_GUARD_REJECTION`’s string; the scorecard append path and whether it is the same file recovery reads; how `directAdmission.get` is attached to the worker client (`recorder/root-admission.js:2-8` only says the adapter supplies it); journal row schema; any publisher.
Consequence: a crash after a possible append must be classified `blocked-consumed` or `uncertain-appended`, never retried. If the worker journal path and the recovery `events.jsonl` path differ, R10 will fail closed or, worse, snapshot the wrong file. That split is unproven and must be treated as unresolved before any recovery admission. The sample receipt cannot be used as a regression oracle for these excerpts until the pin algorithm is defined and matches.
The included sample is instance evidence only: root `ses_direct_ab7a3ebdaee184931f6eb3e147eeac4fe426758a`, run `f1f06d7f-e063-470d-b7cb-20c74c8223f5`, digest `sha256:77731a2e4245500baddd6f2f8b4438e8d4ec17eef22d8643417c1e2aebe0676c`, request `uti26-admission-repair-review-20261013-v2`, recorded 6, skipped 0, uncertain 0, publication false. This lane did not recompute `questionSHA256` or the session-id derivation.
## 4. Next useful action
Add the read-only reconciler over R1-R10 and the pre-execute journal identity on the attempt receipt. Until that exists, the accepted operator action after any ambiguous crash is: read R5, R6, and R7; if the fence exists and R7 does not, stop; do not call `record`, do not recover the journal, do not publish. A first write is acceptable only when admission is verified and R5, R6, and R7 are all absent.
MATERIAL_EVIDENCE_CONFLICT: packet Source SHA256 for `native-run.js` is `358cc311b26d688656dd2fed2a3569997d3cf0a36eae8e3f1f3e4d94be729a5b` and for `direct-rpc.js` is `e0618db69450eacfb5ebd7d47ad6898b34cf1553ed82f1d8eb93dc899ce1cae4`, while the recorded/readback receipt `sourcePins` are `native/src/native-run.js` `d7dbdaf18a2e0c2684a70871a20e217a9d7c6a1eac9eaaa530a94e14bbe8bc9d` and `native/src/direct-rpc.js` `b414816f7b17fe5d051e4a0fa9bb555786f8c2171e08761a11fb468f6e1e8c7b`. The packet does not define the pin algorithm, so the 6/6 readback cannot be attributed to these excerpts.claude-code-cli / claude-opus-5-5 / high / high effort answer
# Same-root frozen-result recording: acceptance and recovery plan (one MoA lane)
I did this work directly and invoked no tools. The lane forbids tool use, so I did not write a plan file or call ExitPlanMode. References use the packet line ("pkt Lnnn") and, where useful, the original source line.
## 1. Conclusions and prioritized plan
### P0. Resolve the source-pin mismatch before attributing acceptance (blocker; high confidence)
- The readback receipt pins `native/src/native-run.js` to `d7dbdaf1…` (pkt L573).
- The packet's `native-run.js` excerpts declare SHA256 `358cc311…` (pkt L6, L34).
- Likewise, the receipt pins `direct-rpc.js` to `b414816f…` (pkt L574), while the packet declares `e0618db6…` (pkt L357).
- So either the code changed after recording, or the two hashes are computed differently. Until this is settled, the receipt cannot be said to prove behavior of the code reviewed here.
- **Pass:** both pins match the reviewed sources under one hashing rule, or a source diff shows no change to recording logic.
- **Fail:** treat the receipt as evidence about different code.
### P1. Ownership map (source facts)
| Layer | Durable/in-memory state | Writer | Lines |
|---|---|---|---|
| Native request receipt | `direct-bridge/v1/request/<requestID>`, `root-run/<root>` | submit path (not shown) | pkt L339–340 |
| Native run | `runs/<runID>`: `frozenJudgment`, `finalResult.scoring` | not shown | pkt L344–349 |
| Admission proof | Derived only, not stored; requires a three-way digest match and ≥2 rows with unique `childSessionID` and `waveID===runID` | `readDirectScoringAdmission` | pkt L332–352 |
| Activity lease | `scoringRunReleases` and `runOperationLocks` (in-memory only) | `prepareScoreWrite` / `finishScoreWrite` | pkt L46–50, L166–170, L211 |
| Write-attempt fence | `score-finalization/<runID>`, `finalization-attempt/<runID>`, in-memory `finalizationAttempts`, and the score tool-call binding | `prepareScoreWrite` | pkt L125–143 |
| Transport result | `direct-score-result/<runID>` | `recordFrozenScore` | pkt L179–196 |
| Adapter transport | Rejects raw `runID` references (pkt L415–417); relies on `prepareScoreWrite` mutating `event.input` to the frozen outcomes (pkt L78), then the same `event.input` reaching `tool.execute` (pkt L191) | adapter | pkt L414–498 |
| Recorder journal | `<scorecard dir>/events.jsonl` (append-only, shared across runs) | scorer (not shown) | pkt L112, L556–564 |
| Recorder admission | `client.directAdmission.get({rootSessionID, runID})` | `resolveRootAdmission` | pkt L507–519 |
Key fence invariant (source fact): `tool.execute` runs only after the attempted receipt is durably written to `score-finalization/<runID>`, because that write is awaited before `prepareScoreWrite` returns (pkt L127–135).
- If either the receipt write or the binding write fails, the code writes the attempt key with an error and throws.
- That throw releases the lease (pkt L139–141, L145).
- Therefore: **no fence key ⇒ no scorer call happened**. This assumes `storage.set` is durable once it resolves, which is not shown.
### P2. Preconditions to verify, read-only, before any record call
1. The request receipt is completed, has a `runID`, is owned by this root, and has no preceding request (pkt L366).
2. `readDirectScoringAdmission` returns `verified` for `{root, runID, payloadDigest}` (pkt L367–369, L334–352).
- The payload digest in the admission receipt (pkt L532) equals the one in the readback receipt (pkt L554). This already passes in the supplied receipts.
3. Run ownership holds: same parent session, same directory, `authority()` is falsy, `finalResult` is complete, and the frozen digest recomputes (pkt L176–178).
4. `record_agent_outcomes` is registered with an `execute` function.
- This check comes before admission, so a missing adapter consumes no fence (pkt L182–183).
5. No recovery lock is active on the run (pkt L211).
6. Single-server ownership of the storage and journal.
- There is no compare-and-set in the get/set sequence (pkt L97–127). In-process races are closed only by `direct-rpc`'s `exclusively` wrapper (pkt L365) and by the synchronous region between the admission decision and adding the run to `finalizationAttempts` (pkt L117–125).
- That region is not synchronous when the reviewed-recovery branch is taken (pkt L115).
7. The journal path the native code reads equals the adapter's scorecard directory.
- Native reads `OPENCODE_SCORECARD_DIR` or a default (pkt L112). The adapter uses a separate scorecard-directory variable that is not shown (pkt L437, L859).
### P3. Authoritative reconciliation reads, by question
- **"Is the attempt consumed?"** Read the fence: `score-finalization/<runID>`, then `finalization-attempt/<runID>` (pkt L97–98, L106–107).
- **"What did transport return?"** Read `direct-score-result/<runID>` (pkt L179–181).
- "Returned" does not mean "recorded" (pkt L159–160, L583). The adapter folds scorer errors into returned content (pkt L868–869).
- **"What was written?"** Only the journal answers this. Look for rows with `waveID === runID` and the frozen `childSessionID`s.
- The expected shape is 2N rows: N task-completed plus N evaluated-outcome (pkt L558–560).
- Check that the prefix is preserved against the before-hash (pkt L561–562).
- The journal row schema is not in the packet.
- **"Is it still admissible?"** Re-run `readDirectScoringAdmission` (pkt L332).
### P4. Failure interleavings and current outcomes
| # | Interleaving | Durable state after | Retry via `record()` today | Disposition |
|---|---|---|---|---|
| a | Crash or reload before the fence write (pkt L127) | none | Fresh admit (lease and in-memory set are gone) | Safe retry; deterministic |
| b | Fence written, crash before `execute` | fence `attempted`; journal unchanged | Rejected as idempotent (pkt L508–509) | Needs reviewed recovery (pkt L494–501). The writer of `reviewed-recovery/<runID>/score-preparation` is **not in the packet**. |
| c | `execute` appends all 2N rows, then crash before `finishScoreWrite` or the result write | fence `attempted`; no result record | Rejected | Uncertain-but-complete. Reconcile from the journal; **no replay** (pkt L583) |
| d | Lost response after the result write (pkt L195) | result record present | Replay with `replayedReadback:true` and 0 new rows (pkt L181, L567) | Deterministic pass path |
| e | The result write throws (pkt L195) after rows are appended | fence `returned`, but result content is not persisted anywhere (`finishScoreWrite` stores no result, pkt L161–164) | Rejected | Content lost; journal-only reconciliation |
| f | `finishScoreWrite` write swallowed (pkt L164) | fence stays `attempted`; result record `returned` | Replay works | The fence/result mismatch is benign; treat the result record as authoritative for transport |
| g | Partial cohort (0 < rows < 2N), or content reports skipped/uncertain > 0 | consumed fence | Rejected or replayed | Terminal. Escalate for review; reconstructed subsets are forbidden (pkt L583) |
| h | Adapter validation failure returned as content, 0 rows | result record `returned` with failure content | **Replays the failure forever.** The early return at pkt L181 precedes `prepareScoreWrite`, so the reviewed-recovery branch (pkt L494–501) is unreachable on the direct path | Gap; see P6 |
| i | Duplicate caller, same process | Serialized by `exclusively` (implementation not shown) and the fence | Second call replays or is rejected | Pass. Lease keys differ per call because the call ID is random (pkt L187), so the lease itself does not dedupe. |
| j | Duplicate caller, native hook path, same run | Same fence key | Rejected | Pass |
| k | Duplicate caller across processes sharing storage | Possible double admit | Unsupported | Must be excluded by precondition 6 |
| l | `execute` hangs | Lease held; `acquireRunRecovery` refused (pkt L212). The signal is checked only before admission (pkt L184). | Blocked until restart | Operational risk |
### P5. Rollback limits (source facts plus inference)
- No shown code deletes or resets `score-finalization`, `finalization-attempt`, or `direct-score-result`. The result record is write-once.
- The journal is append-only and shared across runs (28.8 MB, pkt L564). Truncating it is not a supported interface and could destroy other runs' appends.
- Rollback is therefore limited to the no-write case (b), via reviewed recovery. After any append, the only option is forward reconciliation.
- Publication is separate (pkt L578, L583) and outside this plan.
### P6. Acceptance pass/fail checks for the existing recording
A run passes only if **all** of the following hold:
1. P0 is resolved.
2. The admission proof is `verified`, and its digest equals the digest in the frozen judgment, the returned scoring, the request receipt, and the readback receipt (pkt L349, L532, L554).
3. `direct-score-result/<runID>` has state `returned`, matching root, run and digest, and `toolCallID === call_directscore_8340…` (pkt L565).
4. The fence receipt has the same `toolCallID`, with state `returned` (pkt L547–548).
- A state of `attempted` together with check 3 passing is acceptable only as case f.
5. The stored result content reports `recorded = N`, `skipped = 0`, `uncertain = 0`, and no validation failure. N must be the count of quality rows.
- Availability rows are split out by `classifyOutcomes` (pkt L421), so N may be less than the frozen row count. This needs confirmation.
6. The journal holds exactly 2N rows for the run (one of each kind per `childSessionID`), has a preserved prefix, and its before/after hashes match pkt L561–562.
7. One replay `record()` returns `replayedReadback:true` and leaves the journal bytes and digest unchanged.
- Make this call **only after** check 3 is confirmed by a storage read. Without a result record, `record()` is not a read-only probe.
8. `active` is `{}` (no leftover lease), model reruns are 0, and publication is false (pkt L569, L577–578).
The supplied receipt asserts checks 2 and 5–8. Checks 3–4 and the journal row breakdown are not independently shown.
### P7. Supported versus deterministic surface
**Deterministic today:**
- Fresh admit when no fence exists (case a).
- Replay when a result record exists (case d).
- Idempotent rejection when the fence is consumed.
- The admission proof read.
- Reviewed recovery when a `ready` record already exists with an unchanged journal digest.
**Smallest missing interfaces (proposals, not source):**
1. **Read-only `scoreStatus` RPC.** It would return the proof state, the fence, attempt, binding and result records, and journal row counts for the run.
- Only `record` and `submit` handlers are shown (pkt L279–300).
- Today, the fence and journal can be checked only by out-of-band reads.
2. **Journal snapshot in the attempted fence receipt.** Record `bytesDigest`, identity and size at pkt L127–134.
- This lets case b prove "no write since attempt" rather than only "unchanged since the plan was reviewed".
- That weaker guarantee is all the snapshot check at pkt L114 can give today.
3. **Persist result content at least as early as the fence transition**, or write the result record before `finishScoreWrite`. This closes case e.
4. **Route recovery around the early return at pkt L181.** When a reviewed `ready` recovery exists for a zero-row failure, the direct path should be able to reach the recovery branch. This closes case h.
5. **Bind the recorder to the payload digest.** `resolveRootAdmission` checks only the format of `proof.payloadDigest` (pkt L515), and calls `get` without a digest (pkt L514), whereas the native reader requires one (pkt L334).
- The native fence already binds the digest, so this is lower priority.
## 2. Alternatives and discarded hypotheses
- **"The lease prevents duplicate callers."** Discarded. `acquireRunActivity` allows concurrent activities and blocks only recovery (pkt L211). Lease keys include a random call ID.
- **"An in-process race can double-admit."** Discarded for the non-recovery path, because the admission decision and adding the run to `finalizationAttempts` are synchronous (pkt L117–125). It remains possible on the reviewed-recovery path if `exclusively` is not global.
- **"The readback receipt was produced by `recordFrozenScore`."** Discarded. That function writes only `state:"returned"` (pkt L194). The receipt's `recorded-readback-verified` state and its journal hashes come from an external verifier that is not in the packet.
- **Rollback by journal truncation.** Rejected as unsupported and unsafe on a shared, append-only journal.
## 3. Missing evidence and its consequences
The following are not in the packet:
- `admitScoreWrite`, `admitReviewedScoreRecovery`, `verifyScoreAvailability`, `journalSnapshot`
- `exclusively`, `sessionEvidence`, `scorecardClient`, `runScoreWorker`
- the recorder append logic and journal row schema
- `storage` durability and atomicity semantics
- whoever writes `reviewed-recovery/…`
Consequences:
- The admission/rejection matrix, the atomicity of partial cohorts, the cross-process safety, and the journal row-count checks are inferred, not proven.
- Checks 3, 4 and 6 in P6 cannot be confirmed from this packet.
## 4. Next useful action
1. Settle P0 (the source-pin hash domain and any code diff).
2. Run the read-only reads in P3, then the P6 checks in order.
3. Call `record()` once, and only if the result record exists.
4. Raise missing interfaces 1 and 2 as the minimal change set before relying on recovery for cases b, c and e.
MATERIAL_EVIDENCE_CONFLICT: The readback receipt pins native-run.js to d7dbdaf1… and direct-rpc.js to b414816f… (pkt L573–574), but the packet's reviewed sources declare 358cc311… (pkt L6, L34) and e0618db6… (pkt L357).Primary judge's stated reason
B receives a slight forced preference for avoiding an unsupported general journal acceptance oracle, reducing the risk of rejecting valid recording based solely on sample-specific counts. A's stronger concurrency analysis and recovery-path detail substantially counterbalance that advantage. This is not an established material quality difference; 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: 39551589-cd0d-49dd-92e2-40e197bd1da5. Pair: brp1_b5da3d74240e8df7e4281397c1f7df319e1f1266643b6f7d257831047226efba. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.