openai / gpt-6.1-sol / low / low effort preferred over openai / gpt-6-luna / max / max 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.1-sol / low / low effort answer
## Conclusion
**Modern scoring must reject ambiguous envelopes before parsing JSON.** The current parser accepts the first marker pair and can silently discard conflicting or truncated trailing output. Preserve first-pair/table behavior only through explicitly historical parsing.
This was an independent, read-only assessment of the supplied snapshot, digest `sha256:1f6dfd09c82afe8048c1b64b81266e0bc1fe0bb1cb0009a0d2743b96cd56c9f4`. No tests or tools were run. No commit SHA was supplied, so commit identity cannot be independently established.
## Source-grounded findings
1. **First-pair selection hides additional judgment.**
`harness/opencode2/agent-teams/src/handoff.js:32–39` uses `indexOf` for the first opening marker and first subsequent closing marker. Consequently, with `S`/`E` denoting the exact markers and `A`/`B` valid complete score arrays:
- `S A E S A E`: accepted despite duplicate envelopes.
- `S A E S B E`: accepts `A`, ignoring conflicting `B`.
- `S A E S B`: accepts `A`, ignoring a truncated second envelope.
- `E S A E`: accepts `A`, ignoring the stray preceding close.
- `S S A E E`: generally produces a JSON syntax error because the inner opening marker enters the selected payload; nesting is not identified explicitly.
Modern marker-presence checks at lines 138–141 do not establish uniqueness or ordering.
2. **Roster coverage is already enforced, but after permissive extraction.**
`judge-contract.js:264–292` rejects malformed rows, unknown/duplicate aliases, identity echoes, and missing bound aliases. `handoff.js:145–153,184–210` additionally checks lane coverage, successful evidence, required summaries, prohibited authority fields, and metrics. Do not replace these checks with partial-roster acceptance.
Remaining strictness gaps include alias coercion/trimming (`judge-contract.js:280`) and accepting null-valued prohibited score fields (`278`). Evaluation-summary content and exact metric validation depend on code outside this packet.
3. **The compact failure handoff is mostly safe but insufficiently precise.**
`handoff.js:304–309` correctly refuses synthesis fallback whenever a judge field exists. Lines 391–397 emit `ready:false`, `calls:0`, and no scoring reference/input when input is absent. However:
- The failure branch omits `result.scoring.reason`.
- The compact judge block retains `resultRef`, but not actual judge text (`358–367`).
- Contributor references retain worker result refs and packet digests (`264–294`), not their complete bodies.
Durable preservation of judge text, source packets, worker bodies, and prevention of journal writes cannot be verified without the omitted native engine/recorder implementation.
## Minimal patch plan
### 1. Add a modern-only envelope validator
Keep historical extraction unchanged; route `exactScoreInput(..., {historical:false})` through a new strict extractor.
Require:
- Exactly one literal opening marker and one literal closing marker across the entire response.
- Opening marker precedes closing marker.
- Only whitespace outside the envelope, matching “Return only” in `judge-contract.js:226`.
- The entire inner payload parses once with `JSON.parse` and is an array.
- No marker selection, JSON repair, fallback table, or inferred scores.
Use stable structured errors rather than deriving categories from message wording:
| Condition | Category / reason |
|---|---|
| Neither marker present | cardinality / `missing-envelope` |
| Repeated opening or closing markers, including nesting | cardinality / `multiple-envelope-markers` |
| Only one marker present | syntax / `unbalanced-envelope` |
| One of each, reversed | syntax / `reversed-envelope-markers` |
| Non-whitespace outside envelope | syntax / `unexpected-envelope-content` |
| Invalid inner JSON | syntax / `invalid-score-json` |
| Parsed value is not an array | schema / `score-json-not-array` |
Check multiplicity first: duplicate/nested structures should not be mislabeled as JSON syntax failures. Cardinality errors do not establish whether the scores actually conflict; receipt language should say “ambiguous/multiple envelopes,” not invent a conflict.
### 2. Preserve strict roster and schema validation
Continue binding only against the frozen alias roster and requiring complete quality-lane coverage.
For modern rows, minimally tighten:
- Require an exact string alias; do not normalize it.
- Reject prohibited fields by presence, including null values.
- Validate all four required integer metrics within 1–10 using the existing metric validator.
- Preserve required evaluation-summary validation and integer finding counts.
Confirm the external validators’ exact behavior before proposing changes to them. Do not silently strengthen explicitly historical row semantics.
### 3. Make malformed completion a preserved, non-executable result
At the native completion boundary, catch validation failure without rerunning workers or judges, including failed FAST:
- Preserve actual observed judge text and its existing ref.
- Preserve original source packet and worker evidence unchanged.
- Store structured validation category/reason and truthful message.
- Produce no scoring input, payload digest, or executable scoring reference.
- Ensure malformed judgment never reaches the recorder or scoring journal.
In `compactRootResult`, propagate the failure reason/category in the `calls:0` branch. Retain the judge ref; expose preserved text through the durable diagnostic/run artifact rather than manufacturing replacement text.
**Important:** compacting alone cannot prevent a journal write or retry; those guarantees require completion-boundary integration outside the supplied packet.
## Proposed tests—not executed
### Current-parser regressions and replacement acceptance
Use two complete valid modern arrays differing in one metric:
1. Single canonical envelope succeeds with exact expected outcomes.
2. Identical duplicate envelopes: current parser selects first; modern validator rejects cardinality.
3. Conflicting duplicate envelopes: current parser selects first; modern validator rejects cardinality.
4. Valid envelope followed by truncated second envelope: current parser selects first; reject cardinality.
5. Nested markers: reject cardinality, not incidental JSON syntax.
6. Stray closing marker before valid envelope: reject cardinality.
7. Missing close, missing open, and reversed singleton markers: reject syntax.
8. No markers: reject missing-envelope cardinality.
9. One envelope containing truncated JSON: reject JSON syntax.
10. Surrounding commentary/fences: reject syntax; surrounding whitespace succeeds.
11. Object instead of array: reject schema.
12. Missing, duplicate, unknown, or whitespace-altered alias: reject roster; never return partial outcomes.
13. Missing metric, out-of-range/fractional metric, forbidden score field including null, or missing summary: reject schema.
14. Explicit historical mode retains first-pair extraction and legacy Markdown-table behavior.
### Failed-completion handoff
Extend the fake-context integration pattern in `writer-handoff.test.mjs`, whose existing tests demonstrate saved evidence and no-replay assertions (`84–120`):
- Inject each malformed judge completion into a frozen writer review.
- Assert persisted judge text/ref, source packet, worker evidence, and frozen target are unchanged.
- Assert compact scoring has `ready:false`, `calls:0`, precise category/reason, and no `input`, `reference`, or `payloadDigest`.
- Assert zero recorder invocations and no scoring-journal mutation.
- Assert collection/status produces no additional worker or judge prompts.
- Include a failed FAST case with no retry.
- Include valid score markers in synthesis text alongside malformed judge text: synthesis must not rescue scoring.
## Evidence limitation and next action
The supplied tests contain no malformed-judge completion coverage. Native completion, retry, recorder, metric, and summary behavior remain unverified dependencies. Implement the small modern extractor first, then wire and test the preserved failure receipt at the native completion boundary.
MATERIAL_EVIDENCE_CONFLICT: `judge-contract.js:108,219` instructs omission when scoring cannot responsibly be determined, while `226` requires every contestant and `290–291` rejects missing aliases; reconcile this as an explicitly unscoreable whole judgment, never guessed scores or an accepted partial roster.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
A earns a slight forced preference because its concrete adversarial cases and explicit failed-FAST assertion make the requested regression plan somewhat easier to implement faithfully. B's atomic-rejection observation substantially counterbalances this. This is not an established material quality difference; 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_569811e0cfed5469e2c51edb7f5d24c50f9d20d1bf262fff520c9f0c98cbf52b. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.