openai / gpt-6.1-sol / max / max effort preferred over openai / gpt-6-luna / max / max 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 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.1-sol / max / max effort answer
## Conclusion
**Modern parsing can silently accept duplicate, conflicting, or partially truncated envelopes.** Add a modern-only strict parser, retain historical parsing explicitly, and make validation failures non-executable without losing evidence.
Independent static review of the supplied frozen packet; no tests executed or files changed.
### Source-grounded findings
- **First envelope wins:** `handoff.js:32–39` selects the first opening marker and subsequent closing marker. The modern check at `138–141` verifies only that both marker strings occur somewhere. Additional envelopes or markers can therefore be ignored.
- **Modern roster completeness already exists:** `judge-contract.js:264–292` rejects missing, duplicate, and unknown aliases, missing bindings, malformed rows, and missing/object-invalid `evaluationSummary`. Preserve this enforcement; accepting a partial roster is not a solution.
- **Modern schema enforcement is conditional:** `handoff.js:142–144,186–242` permits the old route/numeric-quality branch whenever `schemaVersion !== JUDGE_SCHEMA_VERSION`, even without `historical:true`. Strict modern judgment should not silently enter that branch.
- **The compact failure receipt is only partly sufficient:** `handoff.js:391–398` provides `ready:false`, `calls:0`, and no scoring reference/input. However, it drops `scoring.reason`, unlike the successful branch. It also trusts any existing truthy `scoring.input` (`299,378`).
- **Evidence persistence is not established by compaction:** the compact result retains judge and worker references and packet digests (`264–294,358–367`), but not their full text or source bodies. Those must remain unchanged in durable run/diagnostic evidence.
- **Non-synthesized failures need separate coverage:** `handoff.js:298` returns them unchanged. A failed completion must not be relabeled “synthesized” merely to obtain the scoring failure receipt.
## Minimal patch plan
### 1. Add a strict modern envelope parser
Leave `markedScoreRows`, `scoreRecommendations`, and explicit historical parsing compatible. For `!historical`, use a new helper that:
1. Counts **all exact literal opening and closing markers** in the response.
2. Requires exactly one of each.
3. Requires the trimmed response to start with the opening marker and end with the closing marker.
4. Parses only that body with ordinary `JSON.parse`.
5. Requires an array, then applies existing binding and schema checks.
Whitespace and ordinary JSON formatting remain valid. Prose, code fences, extra markers, and literal marker strings inside JSON strings are rejected under this textual framing contract. Do not require sorted JSON keys or reconstruct JSON.
Use distinct diagnostic categories:
| Failure | Reason/code |
|---|---|
| Marker counts other than `1/1` | `JUDGE_ENVELOPE_CARDINALITY`, with actual counts |
| Reversed markers or content outside the envelope | `JUDGE_ENVELOPE_FRAMING` |
| Unique envelope, malformed JSON body | `JUDGE_JSON_SYNTAX`, retaining the actual parse error |
| Valid JSON, non-array body | `JUDGE_JSON_SHAPE` |
| Alias coverage or row-schema failure | Roster/schema failure, retaining the precise existing message |
A missing closing marker is a framing/cardinality failure—not proof that JSON parsing failed. Duplicate valid envelopes are cardinality failures—not JSON syntax failures.
### 2. Require explicit modern schema and bindings
For non-historical judgment, require `schemaVersion === JUDGE_SCHEMA_VERSION` and valid bindings. Do not fall through to lane spelling normalization or the legacy 1–5 quality branch.
Retain:
- Complete alias coverage.
- Identity/authority-field rejection.
- Required evaluation summary.
- Integer findings counts and provenance validation.
- Trusted metric-to-quality derivation.
The modern metric contract is exactly four integers, each `1–10`: `correctness`, `taskCoverage`, `evidentialSupport`, and `actionability`. `parseMetrics` is outside this packet; tests must establish its exact-key/type/range enforcement before assuming it satisfies that contract.
### 3. Make failure propagation atomic and evidence-preserving
At validation failure:
- Preserve actual judge execution state, text, result reference, and any original execution error.
- Preserve admitted source packets and all worker answers, references, and observed completion identities.
- Publish no scoring input, payload digest, or executable scoring reference.
- Publish `ready:false`, `calls:0`, the precise reason, and structured error details.
- Carry `scoring.reason` through `compactRootResult`’s failure branch.
- Reject reference-based scoring before any outcome/recorder-journal mutation.
Keep raw evidence in durable diagnostics; it need not all be duplicated in the compact receipt. Never substitute empty judge text, synthesis text, or a fabricated reference.
`admitScoreWrite` is **not** a validation gate: it admits a first write when no receipt exists (`judge-contract.js:245–255`). Malformed judgment must be rejected before reaching recording, not stored as `ScoreToolUnavailable`.
Do not retry failed FAST, substitute another judge, or rerun workers. A failed execution and a completed execution with invalid syntax are separate failure categories.
### 4. Clarify the prompt’s omission instruction
`judge-contract.js:108,219` tells an unverifiable judge to omit a contestant, while `226` requires every contestant. Clarify that inability to score safely makes scoring unavailable; omission never authorizes a partial scoring payload. Do not resolve this tension by fabricating metrics.
## Proposed regression tests — not executed
Let `S`/`E` denote the exact markers, `J` an otherwise valid complete modern roster, and `J′` another valid roster with different metrics.
| Response | Current parser prediction | Strict modern expectation |
|---|---|---|
| `S J E S J E` | Accepts first `J` | Cardinality: `2/2` |
| `S J E S J′ E` | Accepts first; ignores conflict | Cardinality: `2/2` |
| `S S J E E` | JSON syntax exception | Cardinality: `2/2` |
| `S J E S unfinished-body` | Accepts first `J` | Cardinality: `2/1` |
| `S J E E` | Accepts `J` | Cardinality: `1/2` |
| `E S J` | Modern binder receives `null`; array error | Framing/order failure |
| `S J` | Generic missing-markers error | Cardinality: `1/0` |
| `S malformed-json E` | JSON syntax exception | JSON syntax failure |
| `S {} E` | Array-required error | JSON shape failure |
| `prose S J E` | Accepts `J` | Framing failure |
| Whitespace + `S J E` + whitespace | Accepts | Accepts |
Also test:
- Missing, duplicate, and unknown aliases; absent/duplicate bindings.
- Null, primitive, and array-valued rows.
- Missing/null/array-valued `evaluationSummary`.
- Every missing metric; extra metric keys; strings, fractions, null, `0`, and `11`.
- Forbidden identity/authority fields.
- Modern missing/unsupported schema cannot enter legacy scoring.
- Explicit historical mode retains first-envelope selection and Markdown-table behavior.
- A modern own `judge` field—including `judge:null`—prevents synthesis-score fallback (`handoff.js:304–310`).
### Failed-completion handoff tests
Extend the fake-completion pattern in `writer-handoff.test.mjs:12–22`, without assuming undocumented helper options:
1. Inject each malformed response as the **actual judge completion**.
2. Save worker/source/judge evidence before collection.
3. Assert durable evidence remains byte-for-byte/reference-identical afterward.
4. Assert the compact failure receipt contains:
```js
assert.equal(handoff.scoring.ready, false)
assert.equal(handoff.scoring.calls, 0)
assert.equal(handoff.scoring.reason, expectedReason)
for (const key of ["reference", "input", "payloadDigest"]) {
assert.equal(Object.hasOwn(handoff.scoring, key), false)
}
```
5. Put valid legacy score markers in synthesis text and confirm they cannot rescue failed modern judgment.
6. Assert zero scoring invocations and unchanged outcome-journal contents.
7. Recollect/status-check the same terminal run and assert prompt counts remain unchanged—the existing tests use this technique at `95–99,117–120`.
8. Separately inject a failed FAST completion with its original error and any actual partial text. Preserve the true phase/state; do not retry, fabricate text, or misreport an execution failure as JSON syntax.
**Limits:** `native-run.js`, recording behavior, fake-helper completion controls, metric validation, and evaluation-summary processing are outside the packet. Their persistence, journal, and FAST guarantees remain unverified. No commit SHA or actual failed-completion transcript was supplied.
MATERIAL_EVIDENCE_CONFLICT: `judge-contract.js:108,219` instruct contestant omission when scoring cannot be verified; `judge-contract.js:226` requires every contestant, enforced by missing-alias rejection at `290–291`.openai / gpt-6-luna / max / max effort answer
Reviewed the supplied frozen source snapshot (`sha256:1f6dfd09c82afe8048c1b64b81266e0bc1fe0bb1cb0009a0d2743b96cd56c9f4`) directly; no tests or source changes. The packet gives a digest, not a Git commit SHA, so I can identify the reviewed snapshot only by that digest.
### Finding and minimal parser change
`markedScoreRows` takes the first start marker and the first end marker after it, parses that slice, and ignores any later markers (`handoff.js:32–40`). Thus a valid envelope followed by a conflicting one is accepted as the first; nested markers are not explicitly diagnosed. Missing markers return `null`, while malformed JSON throws. `exactScoreInput` checks only that both marker strings occur somewhere before calling this parser (`handoff.js:136–143`). A reversed pair can therefore reach a later, misleading array error.
Add a strict parser for the **modern** path only:
1. Require exactly one start and one end marker. Report missing, duplicate, or nested markers as a cardinality failure; a truncated response missing its end marker belongs here.
2. Require start before end and, consistent with the prompt’s “return only” instruction, no non-whitespace text outside the pair. Treat violations as envelope syntax/canonicality failures.
3. Parse the enclosed text with `JSON.parse` and require an array. Do not repair or reinterpret it. If markers are complete but the JSON is truncated or invalid, report syntax.
4. Only after parsing, apply the existing alias binding and row validation. Keep schema/roster errors distinct from envelope syntax/cardinality errors.
A minimal structured error could use separate codes such as `JUDGE_ENVELOPE_CARDINALITY` and `JUDGE_ENVELOPE_SYNTAX`, with a specific reason for the marker/count or parse failure. The existing `bindAnonymousJudgeRows` checks duplicate/unknown/missing aliases and `exactScoreInput` performs further row and metrics checks (`judge-contract.js:264–293`; `handoff.js:184–227`). Keep those checks; do not accept a partial roster. Use the strict parser only when the modern schema is explicitly selected. Preserve the explicitly requested historical path, including `compactRootResult`’s legacy fallback only for runs without a `judge` field (`handoff.js:304–309`).
### Failed-completion handoff
When no scoring input exists, `compactRootResult` already emits `ready:false`, `calls:0`, no `reference`, and an instruction not to score (`handoff.js:391–398`). But it trusts `result.scoring.input` if present, even if an error is also present (`handoff.js:298–300`, `378–398`); make rejection atomic so malformed judgment cannot produce an executable scoring input or reference.
The compact result preserves `judge.resultRef` and `scoring.error`, but not the actual judge text (`handoff.js:358–367`, `394–398`). Its contributor projection keeps evidence status, packet digest, and result reference, but not worker result text; the compact object also has no source packet body or reference (`handoff.js:264–295`, `377–411`). Preserve the exact judge text and ref plus immutable source-packet and worker-evidence references (and retain the underlying evidence in the run/diagnostics record). Do not substitute the synthesis brief for the judge response. A malformed judgment should yield calls `0`, no scoring reference or write, and a truthful validation reason; no retry or worker/judge rerun.
### Tests to add
- Demonstrate current first-pair behavior with two complete, conflicting envelopes; demonstrate that current nested and truncated cases lack reliable cardinality-versus-syntax classification.
- Verify the strict modern path rejects duplicate/missing/nested markers, reversed markers, invalid/truncated JSON, extra text, and non-array JSON; verify one valid envelope succeeds without changing its scores.
- Verify exact bound alias coverage and existing schema/metrics checks reject duplicate, unknown, and missing aliases and invalid metrics. Keep these failures distinct from envelope syntax/cardinality.
- Verify explicitly historical table behavior remains unchanged and a run with a `judge` field cannot fall back to synthesis text.
- Extend the completion-handoff coverage to assert malformed judge output retains its exact text/ref and source/worker evidence, emits calls `0` with no reference, produces no scoring-journal write, and does not trigger another judge or worker invocation.
`writer-handoff.test.mjs:34–137` currently covers writer commands and frozen targets, not malformed judge parsing or this failed-completion handoff.
**Dependency uncertainty:** `metrics.js`, `evaluation-rationale.js`, and `runtime-identity.js` are outside the supplied snapshot, so the exact metric and summary validation rules and schema-version value cannot be independently confirmed here. The scoring producer and journal-write path are also not in the admitted files, so their current retry/write behavior is unverified.
Primary judge's stated reason
B offers the more complete actionable boundary: modern validation cannot silently downgrade to legacy scoring, and execution failure is tested separately from malformed completed output. These are substantive assurance advantages against the requested contract, supporting a clear preference rather than a slight forced preference. Neither answer establishes actual runtime persistence or journal behavior.
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_9953432d4824224152bcdffd8a6c799514d219f65eb9a3fdcbff84dfc38112e3. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.