openai / gpt-6.1-sol / low / low 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 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.1-sol / low / low effort answer
## Conclusion
Direct, independent analysis of the supplied snapshot: **capture provenance and dispatch guards are visible, but durable capture finalization, publication, and terminal-state recovery are not.** Exactly-once publication cannot be established from this packet. No tests were run.
### 1. Combined-sink binding cannot detect an already-imported recorder
**Severity: Medium; conditional handoff risk. Confidence: High.**
**Evidence:** `bindCombinedScorecardDirectory`, `source/combined-sink.js:3–18`, says the recorder captures its journal path on import. The function validates the directory and checks previous global/environment bindings, but does not check the recorder’s actual destination or initialization state.
**Minimal sequence:**
1. Recorder imports and captures directory A.
2. Trusted configuration first calls `bindCombinedScorecardDirectory` with directory B.
3. The function sets the environment/global binding to B and returns successfully.
4. The already-initialized recorder can still write to A.
**Precondition:** Recorder import precedes the first binding; whether installed initialization permits that ordering is outside this packet.
**Guard:** Canonical-path checks and conflicting-binding checks succeed at their stated purposes, but neither detects an import-time destination captured earlier.
**Smallest recovery/check:** Have the initialized recorder expose its captured destination and require equality before accepting a binding. Regression: import recorder under A, bind B, and require an explicit failure rather than a successful handoff.
### 2. Template hashing records current file bytes, not necessarily executing template bytes
**Severity: Medium; conditional provenance corruption. Confidence: High.**
**Evidence:** `synthesisInstructionsSHA256`, `source/recipe-capture.js:12–14`, rereads `./prompts.js` on each call. Native session creation records this digest in `source/native-run.capture-excerpt.txt:55–76`.
**Minimal sequence:**
1. A running host loads a prompt implementation.
2. An installation update replaces `prompts.js` without restarting that host.
3. The host constructs a synthesis assignment using its previously loaded implementation.
4. `synthesisInstructionsSHA256()` hashes the replacement file.
5. Session metadata associates the assignment with source bytes that did not produce it.
**Precondition:** In-place source replacement while the old implementation remains loaded. Prompt construction and package-update behavior are not supplied.
**Guard:** `synthesisPromptSHA256`, `recipe-capture.js:6–8`, correctly hashes the supplied exact prompt string. It does not establish that the separately recorded template digest identifies the implementation that generated that string.
**Smallest recovery/check:** Capture and retain the template source bytes/digest when loading the implementation, then reuse that binding. Regression: replace the source file after loading and verify that subsequent assignments retain the loaded implementation’s digest.
Also, the comment requiring retention of exact source bytes (`recipe-capture.js:10–11`) is not itself an archive write; none is shown here.
### 3. Native session creation has a reconciliation boundary requiring provenance verification
**Severity: Medium; conditional crash-recovery risk, not a demonstrated duplicate publication. Confidence: High on the boundary; unresolved on recovery correctness.**
**Evidence:** The shown lane-admission routine persists `"create-attempting"` before `session.create` (`native-run.capture-excerpt.txt:49–55`) and persists `"session-created"` afterward (`98–100`). On error it calls `reconcileSession(childSessionID)` and accepts a truthy result (`101–113`).
**Minimal sequence:**
1. Persist `"create-attempting"`.
2. Native session creation succeeds, including synthesis hashes.
3. Process exits before the following `saveRun`.
4. Recovery must reconcile the persisted attempt with the existing session.
**Preconditions:** Crash in this interval, followed by recovery. The enclosing function name and restart implementation are not supplied.
**Guard:** A predetermined `childSessionID` and persisted create intent support reconciliation. However, the shown catch branch does not itself verify reconciled session metadata, including `runID`, lane identity, or synthesis hashes. The separate `reuseCreated` path checks substantial identity (`26–38`), but does not check those synthesis hashes either.
**Smallest recovery/check:** Fault-inject after successful creation but before `saveRun`; require recovery to verify the existing session’s run/lane and capture digests against durable expected values before prompting it. Whether `reconcileSession` already supplies these checks is unresolved.
## Guards that succeed—and their limits
- `assertFrozenDispatch` verifies dispatch content integrity (`moa-job-spec.js:562–566`).
- `retainFrozenRoster` verifies reviewer/synthesizer route identities across retries (`396–405`).
- `assertRecoveryDispatch` checks frozen authorization or re-resolution consistency (`569–578`).
These are **dispatch guards, not publication idempotency guards**. In particular, `rosterIdentity` excludes `receiptID`, `assignmentID`, and run/session identifiers (`384–393`). Thus a passing roster comparison cannot establish a unique capture-to-run binding. That exclusion may intentionally permit new retry assignments; it is not independently a defect.
## Unresolved lifecycle requirements
The packet shows no capture record writer, durable source archive, finalizer, publication journal, publication acknowledgment, deduplication key, or terminal-state transition handler. Therefore:
- No concrete duplicate-publication sequence can be proven.
- Write/fsync/rename durability cannot be assessed.
- Retry behavior after publication but before acknowledgment cannot be assessed.
- Completed, failed, cancelled, or rejected capture handling cannot be assessed.
Other dependencies outside the packet include `prompts.js`, `qualityPolicyReason`, `saveRun`, `reconcileSession`, and the recorder implementation.
**Next useful action:** Review the finalizer and recorder against three fault boundaries: session-created-before-save, publication-written-before-acknowledgment, and terminal-state-persisted-before-finalization. Require restart to converge on one publication with durable source/run bindings, without changing authorization, admission, judge, synthesis, or rating behavior.
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
Forced, weak preference for A: its evidence boundaries make the review safer to act on without mistaking absent implementation evidence for demonstrated publication defects. B offers more actionable local recovery coverage, especially the preset fallback incompatibility, so this is not an established material quality difference. An independent review could reasonably prefer B's concrete additional finding.
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_66e43405c38d946c2d668d1eb1f077a537bde01bedddfa42cbd3601ef129ef62. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.