← Model losses

Head-to-head comparison

openai / gpt-6-luna / high / high effort preferred over openai / gpt-6-luna / low / low 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 and design a minimal strict modern judge-response envelope validator and precise failure receipt. Current parser selects the first score marker pair; demonstrate and resolve duplicated/conflicting/nested/truncated envelopes without guessing or repairing scores. Require exactly one canonical envelope for modern judgment and complete bound alias roster/schema metrics; preserve explicitly requested legacy historical behavior. On malformed output preserve actual judge text/ref, source packet and worker evidence, executable scoring calls0/no ref, no journal write, and truthful syntax-vs-cardinality failure reason. Do not retry failed FAST or rerun workers/judges; do not propose heuristic JSON repair or accepting a partial roster. Return minimal patch/test plan and tests against current parser plus failed completion handoff.

Source evidence: harness/opencode2/agent-teams/src/handoff.js, harness/opencode2/agent-teams/src/judge-contract.js, harness/opencode2/agent-teams/tests/writer-handoff.test.mjs. Review the exact frozen commit and return source-grounded reasoning. Do not execute tests or make source changes.

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

## Finding

**The modern parser accepts ambiguous output.** In `handoff.js`, `markedScoreRows` selects the first start marker and the first end marker after it, then parses only that slice (lines 32–40). It does not check for additional markers. Consequently, two valid envelopes—including conflicting scores—can silently yield the first envelope’s scores. Nested or truncated markers may instead cause JSON parsing to fail, but the parser does not classify envelope cardinality separately.

`exactScoreInput` checks only that the text includes both marker strings before calling that parser (lines 136–143). Thus, marker presence is not proof of exactly one complete envelope. `scoreRecommendations` also falls back to legacy table parsing when no marked envelope is found (lines 67–69); that behavior should remain available only on the explicitly historical path.

The downstream schema checks are substantially present: `bindAnonymousJudgeRows` rejects unknown and duplicate aliases, requires every bound alias, and requires an evaluation summary (lines 264–293). `exactScoreInput` requires a recommendation for every quality lane and parses modern metrics (lines 151–153, 184–209). Those checks do not repair the envelope-selection flaw.

## Minimal patch and test plan

- Make modern parsing validate the whole envelope before parsing: require **exactly one** start marker and **exactly one** end marker, in the proper order, with one JSON array between them. Do not select a “best” or first candidate, recover JSON, or accept a partial roster.
- Return a stable, truthful failure classification: marker count/duplication is a **cardinality** failure; an incorrectly ordered pair or invalid/truncated JSON is a **syntax** failure. Carry that classification in the scoring error rather than inferring it from message text.
- Keep legacy table parsing available only when `historical: true`; malformed modern output must not fall back to legacy parsing.
- Test current-parser regressions with: two valid envelopes with conflicting scores; duplicate start/end markers; nested markers; missing, reversed, and truncated markers; invalid JSON; and a single valid envelope with complete versus missing, duplicate, or unknown aliases and invalid metrics. Assert no score is selected from ambiguous output and legacy historical behavior remains unchanged.
- Test the failed-completion handoff using `compactRootResult`: on malformed modern judgment, preserve the actual judge text and result reference, source packet and worker evidence; report `ready: false`, `calls: 0`, no scoring reference, and the syntax-versus-cardinality reason. Verify the failure path does not invoke scoring or write a journal entry. Do not retry FAST or rerun workers or judges.

## Handoff limitation in the supplied evidence

`compactRootResult` emits `calls: 0` and an error when no scoring input exists (lines 391–398), and includes a judge `resultRef` and error in the judge summary (lines 358–367). It does **not** include actual judge text in that summary; its decision brief comes from `result.result`, the synthesis result (lines 347–349). The shown contributor references retain worker `resultRef`s and metadata (lines 264–295), but this snapshot does not establish source-packet retention or whether the failure path avoids a journal write. The handoff test file covers writer completion and frozen review targets, not judge failure. Add the failed-completion test at the integration point that owns those behaviors; the dependencies needed to verify that point are outside this evidence packet.

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

**Conclusion:** `handoff.js` selects the first start marker and the first end marker after it (`markedScoreRows`, lines 32–40). It never checks for a second envelope, nested markers, or stray closing markers. Thus duplicated or conflicting judgments can be silently ignored, while nesting can make the selected slice fail JSON parsing. Modern scoring does require an array and, via `bindAnonymousJudgeRows`, rejects unknown/duplicate aliases and missing aliases, but it does not enforce a unique canonical envelope.

**Minimal patch plan:**
- Replace `markedScoreRows`’ first-pair extraction with a strict modern-envelope parser that counts marker occurrences and validates their order before parsing. Require exactly one start and one end, with no nesting or unmatched markers. Parse only the enclosed JSON; do not extract or repair JSON heuristically.
- Return distinct, stable failure reasons for malformed syntax/envelope structure versus marker cardinality (missing, duplicate, or unmatched markers). Keep legacy parsing behind the explicit `historical` path in `exactScoreInput` (lines 136–144); do not tighten historical behavior.
- Keep alias binding, but make the modern schema contract explicit: require exactly one row per bound alias and all required row fields, including all four metrics. `bindAnonymousJudgeRows` currently checks alias uniqueness/completeness and `evaluationSummary` presence (lines 264–292); `parseMetrics` is called later in `handoff.js` (lines 207–210), but its implementation is outside this packet, so metric-key completeness cannot be confirmed here.

**Failure receipt and handoff:** `compactRootResult` already emits `ready: false`, `calls: 0`, the scoring error, and an instruction not to call scoring when no input is produced (lines 297–310, 391–398). Preserve the actual judge text and its result reference, source packet, and worker evidence in the run’s failure record; do not synthesize a scoring input, reference, or journal write. The compact receipt currently exposes only judge result metadata, not judge text (lines 358–367), so the precise location and persistence path for retaining full text and packet evidence cannot be established from this snapshot. Avoid retries or rerunning work.

**Tests to add (without executing):**
- Modern envelope cases: valid single envelope; duplicate identical and conflicting envelopes; nested starts/ends; unmatched start/end; malformed JSON; valid JSON with a non-array value. Assert syntax versus cardinality failure reason and that no second envelope is selected.
- Schema cases: missing, duplicate, unknown, and extra aliases; missing each required metric and evaluation summary; valid complete roster. Assert no partial roster is accepted.
- Failed completion handoff: malformed judge output preserves actual text/reference, source packet, and worker evidence; reports the correct failure reason; exposes `calls: 0` with no scoring reference/input; and creates no journal write. Also verify explicit historical mode retains legacy score-table behavior.

The writer-handoff tests supplied exercise frozen writer completion, command evidence, and review-target stability (lines 34–137), not judge parsing or failed judge completion. Their fixture and the omitted runtime dependencies are not available in the packet, so integration-test setup and exact persistence assertions remain uncertain.

Primary judge's stated reason

B receives a slight forced preference because its failure taxonomy gives implementers a more directly usable distinction for the requested precise receipt. A's stronger schema-test enumeration substantially counterbalances that benefit. This is not an established material quality difference, and an independent review could reasonably reject the preference.

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

Battle wave: c61dd416-917b-43ea-8a5f-09fc44aa567f. Pair: brp1_8221f7b6effb845729b08c52832d70249c6e35b5f96a4ab6de81d6803d216924. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.