openai / gpt-6-astra / high / high effort preferred over xai / grok-4.7-efficient / high / high effort · close win.
Primary judge: Sol 6.1, requested Low. Effective provider effort and internal attempts were not verified. A close win is still a scored preference; it does not establish a material defect.
Reviewed public evidence
Task goal
Review the 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-astra / high / high effort answer
## Conclusion
Independent, read-only analysis found **three synthesis-provenance gaps and one conditional combined-sink initialization risk**. The supplied code does not expose publication, finalization, journal durability, or terminal-state recovery, so it cannot establish an actual duplicate-publication defect or end-to-end crash safety.
No files were edited, models launched, or tests run.
## Findings
### 1. Continued synthesis sessions do not receive a new prompt binding
**Severity:** Medium; high if publication treats session metadata as authoritative provenance.
**Precondition:** A synthesis lane follows the `lane.continuedFrom` path with a new assignment prompt.
**Evidence**
- The native admission excerpt resumes an existing session at `source/native-run.capture-excerpt.txt:23–25`.
- Both synthesis hashes are written only inside the alternative `session.create` branch, at lines `55–97`, specifically line `76`.
- `synthesisPromptSHA256()` hashes exact assignment bytes: `source/recipe-capture.js:6–9`.
**Minimal sequence**
1. Synthesis session receives prompt A and metadata containing hash(A).
2. A subsequent synthesis assignment resumes that session with prompt B.
3. The continuation branch bypasses metadata creation.
4. Session metadata still describes A, while any later execution of B needs a separate binding.
**Guard assessment:** `assertContinuationSession()` and the parent-policy comparison protect continuation identity and authority, according to their call sites. The visible code does not bind the new synthesis prompt. Their implementations and subsequent prompt admission are outside the packet.
**Smallest recovery/check:** Persist `{runID, childSessionID, assignmentMessageID, promptSHA256, instructionsSHA256}` for every synthesis assignment before dispatch, including continuations. A regression check should resume a synthesis session with a different prompt and require distinct, correctly linked assignment provenance.
**Confidence:** High for the branch omission; downstream publication consequences remain conditional.
### 2. Reusing a created-but-unprompted session does not validate its synthesis hashes
**Severity:** Medium; high if recovered publication relies on stale metadata.
**Precondition:** Recovery takes `reuseCreated`, and the reconstructed prompt or installed prompt implementation differs.
**Evidence**
- Initial creation records synthesis hashes at `source/native-run.capture-excerpt.txt:76`.
- The `reuseCreated` checks at lines `26–39` validate session, project, agent, lane, role, run, parent, execution model, and absence of user/assistant messages.
- They do **not** compare either synthesis hash.
- The excerpt does not provide the enclosing function’s name; these citations identify its exact admission branches.
**Minimal sequence**
1. Create a synthesis session with metadata for prompt A.
2. Crash or pause before sending its first prompt.
3. Recover with prompt B, or a different installed prompt-source version.
4. `reuseCreated` accepts the empty session because all checked identities match.
5. The visible admission path leaves the old synthesis hashes intact.
**Guard assessment:** The empty-context check successfully prevents reuse after a visible conversation turn. It does not establish that the next prompt matches the provenance already attached to the session. The later prompt-dispatch implementation is not supplied, so a subsequent safeguard cannot be ruled out.
**Smallest recovery/check:** Before accepting a reused synthesis session, compare both stored hashes against the frozen assignment. Recover the original bytes or fail closed on mismatch. Inject a restart between session creation and first prompt; change only the prompt bytes and require rejection.
**Confidence:** High for the missing comparison in this branch.
### 3. The instruction hash can describe disk contents rather than the executing implementation
**Severity:** Medium provenance-integrity risk.
**Precondition:** `prompts.js` changes while the process retains an already-loaded prompt implementation.
**Evidence**
- `synthesisInstructionsSHA256()` reads `./prompts.js` from disk on every call: `source/recipe-capture.js:12–14`.
- It is called during session creation: `source/native-run.capture-excerpt.txt:76`.
**Minimal sequence**
1. The process loads prompt implementation V1.
2. An installation update replaces the file with V2 without restarting that process.
3. The process constructs an assignment using retained V1 code.
4. `synthesisInstructionsSHA256()` reads V2 and labels the session with V2’s source hash.
**Guard assessment:** `synthesisPromptSHA256()` still accurately binds the supplied prompt string. It does not prove that the separately recorded source digest identifies the implementation that generated that string. The comment requesting retention of source bytes is not an archival implementation.
**Smallest recovery/check:** Bind the source digest and retained source bytes to the loaded prompt implementation’s lifecycle, rather than rereading a replaceable file at dispatch. A regression check should replace the source after loading and verify that execution provenance remains tied to the loaded version.
**Confidence:** High under the stated update condition; the actual prompt-loading and archive mechanisms are outside the packet.
### 4. Combined-sink binding cannot enforce its required import order
**Severity:** High if an already-initialized recorder subsequently writes to the wrong season directory.
**Precondition:** The recorder captures its journal directory before the first successful binding.
**Evidence**
- `bindCombinedScorecardDirectory()` explicitly requires binding before recorder import: `source/combined-sink.js:3–5`.
- The function only validates configuration, checks its own global binding, and sets the environment variable: lines `6–18`.
- No recorder-initialization acknowledgment is checked.
**Minimal sequence**
1. Recorder initializes against directory A.
2. First call to `bindCombinedScorecardDirectory({combinedSeasonEnabled:true, scorecardDirectory:B})` occurs.
3. No prior global binding exists, so the function accepts B.
4. A recorder that captured A on import continues writing there while the binding reports B.
**Guard assessment:** The conflicting-directory and environment-drift checks at lines `14–15` succeed for repeated bindings. They cannot detect an earlier recorder import. The recorder’s import-time capture is documented here but its implementation and actual initialization order are not supplied.
**Smallest recovery/check:** Require recorder initialization to acknowledge the bound directory, and reject a mismatch before accepting publications. Check both import orders and require the late-binding case to fail rather than silently split destinations.
**Confidence:** High that this function does not enforce ordering; occurrence in installed wiring is unproven.
## Lifecycle and unique-binding assessment
| Stage | What the evidence establishes |
|---|---|
| Dispatch identity | `moaDispatchDigest()` hashes stable spec content (`moa-job-spec.js:20–23`); `assertFrozenDispatch()` detects content drift (`562–567`). This is not, by itself, a unique execution/publication ID. |
| Resolved roster | `bindResolvedRoster()` incorporates receipt-derived seats (`357–381`). `seatFromReceipt()` permits null `receiptID` and `assignmentID` (`304–307`). |
| Retry identity | `retainFrozenRoster()` compares an unordered roster of role, route, model, variant, effort, and seat (`384–405`). It deliberately does not compare receipt IDs, assignment IDs, run IDs, or prompt hashes. This guards roster identity, not unique capture provenance. |
| Live authorization | `assertRecoveryDispatch()` and `assertFrozenIdentity()` revalidate frozen identity and current authorization (`408–447`, `569–579`). These guards should remain unchanged. |
| Native admission | Run/lane/parent metadata and synthesis hashes are attached at session creation (`native-run.capture-excerpt.txt:61–94`). Observer setup also receives run, child, and assignment-message identities (`123–125`). |
| Persistence | `saveRun()` is awaited before creation, after creation, and after reconciliation (`49–52`, `99–113`). Atomic replacement, flush/fsync, and persistence semantics are not shown. |
| Finalization/publication | No publication commit, acknowledgment, deduplication key, terminal-state transition, or recovery scanner appears in the packet. |
**Important distinction:** Missing run IDs in a roster comparator are not themselves proof of a defect: retries may legitimately have new receipt IDs. The unresolved question is whether publication separately binds an immutable run/assignment identity and enforces idempotency.
## Crash windows requiring verification
These are **unresolved checks, not demonstrated publication defects**:
- **Session creation succeeds; `saveRun()` fails:** the catch invokes `reconcileSession()` (`native-run.capture-excerpt.txt:99–113`). Whether reconciliation verifies exact metadata and safely recovers after process death is unknown.
- **Sink append succeeds; publication acknowledgment is lost:** inspect whether replay uses a durable unique publication key. No append or acknowledgment implementation is supplied.
- **Terminal state persists before publication, or vice versa:** inspect whether recovery independently repairs the missing side effect without reopening completed inference. Terminal-state handling is not supplied.
- **Host/power failure after a successful write:** awaited calls alone cannot demonstrate durable journal and run-state storage.
The imported quality-policy dependency, prompt implementation/archive, native persistence/reconciliation methods, recorder, and lifecycle finalizer are outside this packet. Consequently, claims about their safeguards would be speculation.
**Next useful action:** Review the finalizer and recorder against these precise failure boundaries, then add narrowly scoped crash-injection checks for assignment-hash recovery and idempotent publication. Preserve provider authorization, admission gates, live controls, judge/synthesis selection, and rating formulas.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
Prefer B weakly because its findings and proposed checks are less likely to turn absent implementation evidence into asserted publication defects. A's concrete preset-recovery finding is substantial counterevidence, so this is a forced, slight preference rather than an established material quality difference; an independent review could reasonably favor A's broader concrete coverage.
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_2db419253b5edc3948fb945e572c9a522d42054e371f682c1b03039abedda90e. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.