openai / gpt-6-luna / medium / medium 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.
openai / gpt-6-luna / medium / medium effort answer
## Prioritized acceptance and recovery plan
**Recommendation:** Treat same-root frozen-result recording as a one-shot, fenced side effect—not as an automatically retryable request. Accept a result only when the exact native run and frozen payload are verified, the recorder append is reconciled against authoritative journal reads, and the durable native readback agrees. A successful tool response alone is insufficient.
### 1. Preconditions and ownership
1. **Verify the native owner and exact run.** The scoring batch must resolve to one analysis run owned by the root; mixed wave IDs are rejected (`platform-recording.packet.md:9–21`). The frozen-result reference must identify that run and match its complete judged result, frozen input, and payload digest (`:37–83`). The native direct-admission proof further binds root, request, run, purpose, completed judge-only result, and digest (`:321–354`).
2. **Transport only the frozen input.** Pass the unchanged `scoring.input` from the admitted run; do not rebuild or modify outcome rows. The native hook checks canonical equality against the frozen input (`:87–96`). Recorder root-admission evidence is supplied by authenticated native exact-point reads, not caller-supplied tool arguments (`:503–520`).
3. **Acquire the native write fence before invoking the scorer.** The native preparation hook records the attempt and tool-call binding before execution (`:97–145`). The direct path also checks exact admission, then calls the registered scorer and persists a returned readback (`:174–197`). Treat the fence as consumed even if the scorer response is lost.
4. **Keep the native receipt and recorder journal distinct.** Native `attempted`/`returned`/`failed` state records the write attempt and tool outcome; the scorecard JSONL journal records actual appended rows. Neither alone proves the other. The supplied receipt documents six recorded outcomes, zero skipped/uncertain, 12 appended rows, and a successful repeated readback adding no rows (`:548–579`).
### 2. Smallest acceptance checks
For a clean execution, require all of these:
- Exact direct request receipt and admission proof verify for the same root, run, and digest (`:321–354`, `:362–371`).
- Native preparation succeeds and the scorer is invoked only after the attempt fence is durable (`:123–145`, `:174–197`).
- Scorer result reports the expected recorded/skipped/uncertain counts; do **not** infer successful recording from transport success (`:148–164`; packet caveat `:583`).
- Reconcile journal before/after using an authoritative snapshot: verify the original prefix is preserved and the appended rows correspond to the frozen cohort, with no duplicate rows. The example receipt records before/after hashes and prefix preservation (`:548–564`), but the packet does not include the journal snapshot implementation or row-matching algorithm.
- Persist and read back the native result receipt; a repeat is accepted only as a readback and adds zero rows (`:174–197`, `:565–568`).
### 3. Recovery by interleaving
| Interleaving | Required handling |
|---|---|
| **Reload before admission/fence** | Re-read the exact native request/run/admission and current native attempt receipt. Proceed only if the exact frozen payload still verifies and no attempt was consumed. |
| **Reload after fence, before/during scorer** | Treat as uncertain unless authoritative native state proves no scorer call/side effect occurred. Do not replay merely because the caller has no response; the attempt fence intentionally blocks a second write (`:97–123`, `:583`). |
| **Response lost after journal append** | Read the native attempt/result receipt and the authoritative recorder journal. Match exact cohort rows and counts against the frozen payload, verify prefix preservation, then record/read back reconciliation. Do not call the scorer again. The packet explicitly says a crash after scorer side effect but before durable returned readback is uncertain and the consumed attempt cannot be replayed (`:583`). |
| **Partial cohort or skipped/uncertain rows** | Fail acceptance as complete recording. Preserve the uncertain/partial outcome for investigation; do not replay the full batch because that can duplicate already-appended rows. The adapter can return skipped/uncertain outcomes despite successful transport (`:148–164`, `:583`). |
| **Duplicate caller / concurrent call** | Serialize through the native RPC’s exclusive operation and run-activity/fence checks; reject a second attempt. For the direct path, an existing durable result is returned as replayed readback only when root and digest match (`:174–183`). Do not interpret that readback as a new write. |
**Authoritative reconciliation reads:** native direct request receipt and root→run pointer plus durable run/frozen judgment; native score-finalization/attempt and tool-call binding; exact recorder journal snapshot and rows; and durable direct result receipt. The admission proof’s exact-point reads bind request, run and digest (`:321–354`); the recorder adapter’s admission resolver validates that proof against root metadata (`:503–520`). Caller memory, tool transport status, and a digest supplied without authenticated reads are not authoritative.
**Rollback limits:** No rollback or compensation interface is shown. Once rows append, the packet supports neither deleting them nor safely replaying the batch. Preserve the journal prefix; stop on discrepancy and require a separately authorized/manual repair process. Public publication is separate and must remain out of scope (`:578–583`).
### 4. Deterministic supported surface and gap
The packet demonstrates a deterministic **clean path**: authenticated direct admission, exact frozen payload, native pre-call fence, scorer execution, durable readback, and idempotent repeated readback with zero additional rows (`:548–579`). The compatibility adapter’s ordinary batch path transports outcome evidence into the scorer, but rejects frozen references unless the native `execute.before` resolver handles them (`:397–418`); root-admission proof is transported through the adapter client (`:503–520`).
**Minimal missing interface for deterministic crash recovery:** a durable recorder-side reconciliation/readback operation keyed by `(rootSessionID, runID, payloadDigest)` that returns the exact committed cohort and append identity, and can distinguish “no append” from “fully/partially appended.” The packet gives a recorded/readback receipt and journal hashes but does not establish that this interface exists for recovery after a lost response. Without it, that interleaving remains uncertain and must not be retried.
### Unsupported claims and confidence
The packet does **not** establish atomicity across native storage and the recorder journal, a journal transaction ID, exactly-once append across crashes, rollback capability, or deterministic recovery from partial appends. It also does not provide the journal reconciliation implementation, so exact row-level reconciliation criteria are a proposal, not a source fact. Confidence is high for the one-shot fence and demonstrated clean-path readback; limited for crash recovery because the needed cross-system reconciliation contract is not evidenced.
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 slightly better prevents an operator from treating a visible recovery hook as an established deterministic recovery contract. This is a forced, weak preference, not a proven material quality gap; A's more detailed operational analysis could reasonably support an independent preference in the other direction.
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_10d8d503339efe5ea3e6ddd668f3d7ff024bc0da5b5b039094dd9888e6e2d53d. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.