← Model losses

Head-to-head comparison

openai / gpt-6-luna / max / max effort preferred over xai / grok-4.7-efficient / high / high effort · clear 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 installed native BattleRanks recipe capture and publication lifecycle in this frozen source. Trace capture admission through finalization, write durability, unique run bindings, retry/recovery, and combined-sink handoff. Find concrete crash windows, duplicate publication risks, missing source bindings, or terminal-state handling errors. For each finding cite exact functions, give a minimal event sequence, state severity and preconditions, explain which existing guard fails or succeeds, and propose the smallest recovery or regression check. Keep provider authorization, admission gates, live controls, Terra judge, Sol synthesis and rating formulas unchanged. Do not edit files, launch models, or claim tests ran.

openai / gpt-6-luna / max / max effort answer

## Conclusion

The packet shows solid **pre-prompt admission checks** and **frozen dispatch/retry identity checks**, but it does not include finalization, durable artifact writes, scorecard publication, or startup recovery. I can identify two concrete conditional recovery/binding windows; I cannot establish a duplicate-publication bug or a terminal-state error from the supplied code.

## Findings

1. **Precreated sessions receive weaker identity checks — Medium, conditional.**  
   In the unnamed collection path in `native-run.capture-excerpt.txt`, lines 40–47, the `lane.precreated` branch checks only the child ID, worktree directory, and project ID before marking the lane `session-created`. By contrast, the `reuseCreated` branch at lines 27–39 checks run/lane/role/parent metadata, agent, model, parent project, and whether the child already has user or assistant messages.  
   **Sequence:** a precreated child belongs to the same worktree but has another run/lane/role/model binding or existing conversation → the limited checks pass → the path proceeds toward assignment admission at lines 123–130. The excerpt ends before showing whether inference is sent.  
   **Smallest check:** reject a precreated child with mismatched expected identity or disallowed prior messages; add a regression case for a same-worktree child with wrong metadata and one with existing context.

2. **Abrupt process exit can leave session creation between its side effect and recorded state — Medium, recovery unverified.**  
   The same collection path saves `create-attempting` before `session.create` (lines 49–55), then saves `session-created` only after it returns (lines 98–100). Its `reconcileSession` logic (lines 101–114) handles a caught error, not an abrupt process exit.  
   **Sequence:** the native session is created → the process exits before the second `saveRun` → persisted run state may remain `create-attempting`. Whether restart recovery reconciles the child, retries creation, or leaves the lane stuck is not shown. `saveRun` durability is also unspecified.  
   **Smallest check:** inject a restart after successful `session.create` but before the second save; verify recovery finds the same child and does not create or prompt a duplicate. This is an exposed window, not proof that recovery is absent.

3. **Combined-sink import order is documented but not enforced — Medium, conditional.**  
   `bindCombinedScorecardDirectory` in `combined-sink.js:5–18` validates and binds a process-wide directory. Its comment says the binding must precede importing the recorder because the journal path is captured on import, but the function cannot detect that the recorder was already imported.  
   **Sequence:** import recorder → bind directory → recorder may retain its earlier path despite the environment update. The recorder implementation and actual call order are not in this packet, so a wrong-path publication is conditional, not established.  
   **Smallest check:** exercise the real entrypoint and verify the recorder’s effective journal path after binding; ensure binding occurs before recorder import.

4. **Dispatch-to-receipt seat binding depends on a separate guard — Medium, conditional on call order.**  
   `bindResolvedRoster` in `moa-job-spec.js:357–382` checks explicit-job reviewer logical keys and synthesizer logical key, but does not itself compare receipt seats to the frozen job seats. `seatFromReceipt` (lines 265–313) also does not compare `receipt.seat` with `specSeat.seat`. The separate `assertDispatchMatches` function (lines 523–543) does enforce ordered logical keys and seats.  
   **Sequence:** a receipt has the expected logical key but a different qualified seat → `bindResolvedRoster` alone can freeze it → `assertDispatchMatches` would reject it if called. Call sites are absent, so whether this occurs in the installed flow is unknown.  
   **Smallest check:** regression-test the actual binding call sequence with a swapped seat and require rejection before any phase launches.

## Source-binding and recovery observations

- Synthesis provenance is partially captured: `synthesisPromptSHA256` hashes the exact prompt (`recipe-capture.js:6–9`), and `synthesisInstructionsSHA256` hashes `prompts.js` bytes (`:12–14`). The native session metadata stores both for synthesis (`native-run.capture-excerpt.txt:74–76`). The helper hashes bytes but does not archive them; the comment asks that exact source bytes be retained. Without a separate archive, the hash cannot recover the prompt implementation.
- The assignment `messageID` is passed to `nativeEventObserver.begin` (`native-run.capture-excerpt.txt:123–125`) but is not among the shown session metadata fields. The observer may durably retain it; that implementation is absent, so this is a metadata-level gap rather than a proven loss of binding.
- Retry identity has meaningful guards: `continuationJobSpec` requires the exact frozen job spec (`moa-job-spec.js:546–560`); `assertRecoveryDispatch` checks a bound roster’s current authorization or recomputes an unbound dispatch digest (`:569–579`); and `retainFrozenRoster` compares role, route, variant, effort, and seat (`:396–406`). These protect dispatch continuity, but do not establish capture-write durability or publication idempotency.
- The supplied code does **not** show result finalization, terminal-state transitions, journal writes, atomicity/fsync, combined-sink handoff, or publication deduplication. Therefore duplicate scorecard rows and terminal-state handling cannot be assessed from this evidence. `bindCombinedScorecardDirectory` binds a directory, not a visible per-run publication key.
- `moa-job-spec.js` imports `./moa-quality-routing.js`, which is outside the packet. Its policy behavior cannot be independently assessed here.

No tests or external checks were run.

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

The visible lifecycle never finalizes a run-unique recipe into the combined sink. It can persist authority and `session-created` before a single prompt, and several branches can prompt again or strand retry. Direct review of the frozen packet only. No tests were run.

## Findings

1. Reconciled create skips identity and prompt guards, then falls through to prompt. High.  
   Functions: create `catch` in the native excerpt (`reconcileSession`, admission `session-created-reconciled`) versus `reuseCreated` checks.  
   Sequence: `session.create` throws after a session with that id exists → `reconcileSession` returns truthy → admission saved as `session-created-reconciled` → no `runID` / lane / empty-context check → `nativeEventObserver.begin` → `admitPrompt`.  
   Preconditions: create throws; reconciled session is a leftover, another run, or already has a user/assistant message.  
   Guard that fails: identity and empty-context checks at the `reuseCreated` branch are not applied on the reconciled path. The only visible prompt guard is `role === "analysis"`, and it is not reached before this fall-through. `create-uncertain` does return before prompt; that guard succeeds only when reconcile is falsy.  
   Check: reconcile a session whose `metadata.agentTeamsV2.runID` differs or which already has a user message; expect throw before prompt, one inference max.

2. `precreated` can double-prompt. High for synthesis recipe capture.  
   Functions: `precreated` branch versus `reuseCreated`; synthesis hashes only inside `session.create` metadata (`synthesisInstructionsSHA256`, `synthesisPromptSHA256`).  
   Sequence: precreated session prompted → crash before any prompt-sent record → retry with `lane.precreated` → checks id/directory/projectID only → `session-created` saved → prompt again. Hashes are not rewritten on this path.  
   Preconditions: `lane.precreated`; session already contains a prompt; role is not protected by a later guard. Synthesis/judge/writer guards are not in the excerpt.  
   Guard that fails: `reuseCreated` rejects any user/assistant message; `precreated` does not.  
   Check: inject a user message into a precreated session and re-enter; expect the same fail-closed error as `reuseCreated`, and exactly one scorecard row per `runID`.

3. No terminal published state; `create-attempting` is durable before the session exists. High.  
   Functions: native create branch (`admission = "create-attempting"` then `saveRun`, then `session.create`).  
   Sequence: `saveRun(create-attempting)` → process crash after native create commits and before `saveRun(session-created)`. The `catch` does not run on process death.  
   Preconditions: crash or kill in that window. Restart logic for `create-attempting` is not in the packet.  
   Guard that fails: intent is persisted before the effect; visible states stop at `create-uncertain` / `session-created` / `session-created-reconciled` / `session-resumed`. None means prompt-admitted or sink-finalized.  
   Check: kill after `create-attempting` is durable and the native session exists; resume must reconcile that same `childSessionID` and send one prompt, not allocate a second id.

4. Authority is saved before create, and `create-uncertain` does not roll it back. Medium.  
   Functions: `saveAuthority` before the create branch; `create-uncertain` return.  
   Sequence: `saveAuthority` → create throws → reconcile falsy → `create-uncertain` + `saveRun` → return. Authority remains for a session that may not exist.  
   Preconditions: new-session path; create throws; reconcile falsy; a collector treats authority as admitted.  
   Guard that succeeds: this function returns before `admitPrompt`.  
   Guard that fails: no authority rollback and no publication fence on `create-uncertain`.  
   Check: force that sequence; authority must be absent or marked non-publishable; a second entry must not prompt a different `childSessionID`.

5. `reuseCreated` sets `session-created` and does not `saveRun` before prompt. Medium.  
   Functions: `reuseCreated` branch versus `precreated` / successful create, which do `saveRun`.  
   Sequence: empty-context check passes → admission set only in memory → crash during prompt.  
   Preconditions: `reuseCreated` and a crash before some later save.  
   Guard that succeeds on retry: the empty-context check should then fail closed if the prompt landed.  
   Guard that fails: admission durability before side effect.  
   Check: `saveRun` of `session-created` must happen before prompt; a landed prompt must not pass admission again.

6. Continuation stamps `session-resumed` then falls through to prompt, without refreshing write-once recipe metadata. Medium.  
   Functions: `continuedFrom` path; create metadata (`turn`, synthesis hashes, `combinedProfile`, `combinedTaskDeclaration`, `judgeSerializationRecovery`). Comment says template identity and assignment provenance cannot be backfilled.  
   Sequence: resume → `saveRun(session-resumed)` → prompt on the old session. `run.turn` may have moved; metadata `turn` and recipe hashes stay at create time.  
   Preconditions: `lane.continuedFrom`; publication reads session metadata rather than the live run.  
   Guard that succeeds: continuation parent policy compare fails closed if project-read binding changed.  
   Guard that fails: resume does not update recipe/turn bindings, and still enters `admitPrompt`.  
   Check: synthesis continuation on turn 2 must not publish turn-1 metadata as the turn-2 recipe, and must not send a second prompt if a user message is already present.

7. Judge recovery attempt is fixed at 2. Medium.  
   Function: create metadata `judgeSerializationRecovery` (`attempt: 2` literal).  
   Sequence: first judge retry stamps attempt 2 → another retry creates again with attempt 2 and a longer `judgeRejectedAttempts` list.  
   Preconditions: `role === "judge"` and `run.judgeRetry` set for more than one recovery; dedupe key includes attempt.  
   Guard that fails: no monotonic attempt counter. The stamp exists only on the create path, not on resume/precreated/reuse.  
   Check: two serialization recoveries yield distinct attempt numbers and distinct sink keys; neither overwrites the other.

8. Synthesis recipe hash is not a durable source binding. High for unreproducible publication.  
   Functions: `synthesisPromptSHA256`, `synthesisInstructionsSHA256`; called only from synthesis `session.create` metadata.  
   Sequence: hash `./prompts.js` bytes and prompt string → store hex in session metadata → no archive write, no `runID` in the hash, no handoff into `bindCombinedScorecardDirectory`.  
   Preconditions: synthesis create. `prompts.js` is outside this packet.  
   Guard that fails: comment requires retaining exact source bytes; no function writes them. Hash and later `admitPrompt` send are not shown to be the same bytes.  
   Check: after create, archived prompt and `prompts.js` bytes match the two metadata digests and `runID`; crash between hash and archive must not publish.

9. Combined-sink handoff is a process-global env bind, not a run publication. High.  
   Function: `bindCombinedScorecardDirectory`.  
   Sequence: first call ignores a pre-set `OPENCODE_SCORECARD_DIR`, assigns env, then `globalThis[Symbol.for(...)]`. Recorder path is captured on import (comment only). No run id, generation, rename, or fsync.  
   Preconditions: recorder evaluated before bind, or env already pointed at another directory; two runs share the process.  
   Guard that succeeds: a second bind of a different directory throws until host restart; non-absolute, non-canonical, `/`, and NUL paths throw. `combinedSeasonEnabled` is required.  
   Guard that fails: first bind does not compare the recorder’s already-captured path; symlink vs `resolve` is not `realpath`, so “canonical” is only string-canonical.  
   Check: import recorder, then bind a different directory, must throw; journal path must equal the bound directory; two `runID`s must not overwrite one journal row.

10. Bound preset with a judge backup cannot recover. High for relaunch duplicates.  
   Functions: `presetSpec` fallback `{ role, logicalKey, bound: false }`; `bindResolvedRoster` copies preset fallbacks unchanged; `assertFrozenIdentity` / `assertMoaSeatAuthorization`.  
   Sequence: preset backup set → `bindResolvedRoster` sets `bound: true` → retry `assertRecoveryDispatch` → thin fallback lacks provider/model/mode/tools → throw `identity drifted`.  
   Preconditions: `source === "preset"`, `bound === true`, `judge.control.backup` set.  
   Guard that fails: authorization is applied to unqualified preset fallbacks, not only to `judgePolicy.allowed` seats already built by `seatFromReceipt`. Job fallbacks are qualified; this path is not.  
   Check: bind that preset and call `assertRecoveryDispatch`; it must not throw on the thin fallback and must not start a second run. Do not change the authorization predicate.

11. Job bind is set-equality, so review/challenge can swap before freeze. High for mis-bound recipe.  
   Functions: `bindResolvedRoster` job match; `jobSpecFrom` `qualitySeats.phases`; `assertDispatchMatches`; `overlayJobSnapshot` contestant index.  
   Sequence: spec reviewers `[A, B]` → receipts `[B, A]` → bind succeeds → `reviewers` becomes `[B, A]` while `qualitySeats.phases.review` stays A → digest freezes the swap. `assertDispatchMatches` would reject index mismatch but is not called by bind.  
   Preconditions: `source === "job"`; receipt order differs; publication uses `reviewers[0]` or `frozen-${index}` when `assignmentID` is absent.  
   Guard that fails: bind’s `includes` check. Guard that would succeed: `assertDispatchMatches`, if invoked before freeze.  
   Check: reversed receipts are rejected or reordered to spec order before `freeze`; published review/challenge keys stay on the spec seats.

12. Receipt bind can mark a seat eligible, then recovery revokes it. Medium.  
   Functions: `seatFromReceipt` `admittedBy: "resolved-receipt"`; `assertMoaSeatAuthorization` pool check.  
   Sequence: route exists, candidate pool miss → bind sets `eligible: true` → later `assertFrozenIdentity` throws `role eligibility was revoked` because `matches.length` is 0.  
   Also: if two pool rows share `logicalKey` and one has `eligible !== true`, `matches.some(...)` revokes even when another row is eligible.  
   Preconditions: bind via receipt; retry uses `assertFrozenIdentity`.  
   Guard that fails: bind does not apply the recovery eligibility rule, so the run starts and retry cannot continue.  
   Check: unknown or mixed-eligibility logicalKey fails at bind, before launch. On revocation, do not relaunch; leave the capture unpublished. Do not weaken the existing gate.

13. Frozen retain and dispatch digest are not run-unique. Medium.  
   Functions: `rosterIdentity` / `retainFrozenRoster`; `moaDispatchDigest`.  
   Sequence: same provider/model/variant/effort/seat, different `assignmentID` or `runID` → retain returns the old frozen object. Digest covers spec body only, not `runID` or prompt hash.  
   Preconditions: retry gate is retain or digest; sink dedupes on digest.  
   Guard that succeeds: digest mismatch and unbound `bound !== true` fail closed.  
   Guard that fails: identity omits `assignmentID`, `receiptID`, and `runID`.  
   Check: same seats, different `runID`, must yield two sink rows and must not satisfy retain as one execution.

14. Unbound preset recovery is digest-only. Medium.  
   Function: `assertRecoveryDispatch` (`bound === true` calls `assertFrozenIdentity`; otherwise re-resolve and compare digest, return original frozen).  
   Sequence: unbound preset, logicalKey stable, provider/model changed underneath → digest matches → provider drift not checked.  
   Preconditions: `bound !== true`, `source === "preset"`.  
   Guard that fails: existing `assertMoaSeatAuthorization` is not reached.  
   Check: document this as digest-only; if product intent is fail-closed, call the existing gate. Do not add a new authorization formula.

15. `qualitySeats` drops reviewers after the second. Medium.  
   Function: `jobSpecFrom` phases `review`/`challenge` use only `reviewers[0]` and `reviewers[1]`.  
   Sequence: job with three qualified reviewers → `reviewers` and `budgets` include all three → `qualitySeats` does not.  
   Preconditions: explicit job, `reviewers.length > 2`; publisher keys off `qualitySeats`.  
   Guard that succeeds: `assertIndependent` covers the full list.  
   Guard that fails: phase map does not.  
   Check: a 3-reviewer job’s published roster lists all three logicalKeys. Do not change Sol/rating formulas.

16. Second `bindResolvedRoster` can leave `comparison: true`. Low.  
   Function: `bindResolvedRoster` conditional spread.  
   Sequence: first bind with duplicate logicalKeys sets `comparison: true` → second bind with unique reviewers spreads `body` and does not clear `comparison` → overlay keeps contestant ids.  
   Preconditions: double bind.  
   Check: unique rebind omits or sets `comparison` false before digest.

## Alternatives and discarded hypotheses

- Env assign then `globalThis` assign is not a durable crash window: no await, and process death drops both. The real handoff bug is import order and a missing run write.
- `create-uncertain` returning before prompt is a successful in-process guard, not a duplicate-prompt bug, unless the caller ignores admission or changes `childSessionID`.
- Continuation policy compare (parent project-read binding) fails closed; that gate should stay.
- `chooseJobJudge` skipping participants with `qualityEligible === false` may be intentional. Same model can become judge if the reviewer row is not `completed`. Treat as a binding risk only if publication claims independence from that filter. Do not change the Terra judge selection rule in this pass.
- Preset synthesizer substitution (`specSeat` null when logicalKey differs) is real only if `assertDispatchMatches` is not on that path. Job source already rejects set mismatch. Lower confidence than the order swap.
- `path.resolve` without `realpath` is a canonicalization gap, not by itself a double publish, because a second different string already throws.

## Missing evidence

- `./moa-quality-routing.js` (`policyReason`) is outside the packet. Policy veto text is unverified.
- `./prompts.js`, the recorder that captures `OPENCODE_SCORECARD_DIR` on import, `saveRun` / `saveAuthority` / `reconcileSession`, childSessionID allocation, and `admitPrompt` after the analysis check are outside the packet. Duplicate-prompt claims for synthesis/judge/writer are proven only up to the visible fall-through.
- No scorecard write, fsync, or idempotency key appears in these files. Cross-process journal behavior is unknown.
- Terra judge, Sol synthesis, and rating formulas are not in the packet and were not inferred.

## Next useful action

Add fail-closed regression checks for findings 1, 2, 10, and 11 before any sink write: reconciled and precreated sessions with an existing prompt or foreign `runID` must not prompt; a bound preset with judge backup must recover without a second launch; reversed job receipts must not swap `qualitySeats`. Keep provider authorization, admission gates, live controls, and those formulas unchanged. Do not publish from `session-created` or authority alone until a run-keyed archive of the hashed prompt and `prompts.js` bytes is durable.

Primary judge's stated reason

A is the more dependable actionable review because it avoids presenting unobserved publication and recovery behavior as established defects. B supplies a valuable additional recovery finding, but mixes it with unsupported failure interpretations that could misdirect regression work. This supports a clear comparative preference, not a claim that A completes the unavailable end-to-end trace.

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

Battle wave: 705ae38b-ca93-4775-b806-02cf89120b55. Pair: brp1_c62ef12d1c018186b28ccd36e15ce5420cf68a52cf1a63f3baec92bdc6c1c292. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.