← Model losses

Head-to-head comparison

openai / gpt-6.1-sol / max / max effort preferred over cursor / composer-2.5 / Composer 2.5 default / unknown 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

Independently inspect the repository and advise implementation plan for the user's requested additive display-only frozen reference cost attachment. Trace pinned readActiveCombinedSeason(s), private combined_season_cohorts exact lookup, cohortSHA/body and verified original profile, outcomesFromRecords/prospectiveCombinedCohort auth, sourceOutcomeKeys/public_events exact bounded reads, recovery/accountingRecovery behavior, exported designInput validation/costFraction and public serializer/UI. Scope only new src/combined-reference-cost.js, src/combined-public-read.js, optional src/combined-season.js and meaningful tests. Preserve immutable stored/public history, estimates, scores/ranks/Elo; never write; never query latest annotations or leak private metadata; auth failure yields unavailable attachment, snapshot integrity failures keep 503. Return file/function findings, test plan, uncertainty; do not edit or dump private evidence.

openai / gpt-6.1-sol / max / max effort answer

## Recommendation

Add a **fail-closed, read-only attachment** after existing snapshot validation, without changing historical data or ranking calculations.

This is a direct, source-independent assessment. No repository contents were supplied, so the locations below are requested inspection points—not verified implementation findings.

### Proposed file/function plan

| Location | Required behavior |
|---|---|
| `src/combined-public-read.js`: `readActiveCombinedSeason(s)` | Capture each active snapshot once. Carry its pinned identifiers through attachment resolution; never reread “active” or select a newer cohort/profile. Preserve existing integrity checks and their **503** behavior. |
| New `src/combined-reference-cost.js`: cohort resolution | Read `combined_season_cohorts` using the snapshot’s exact identity. Verify `cohortSHA` against the authoritative body using existing canonicalization/hash rules. Obtain and verify the **original profile**, not a current replacement. |
| New helper: event resolution | Derive `sourceOutcomeKeys` only from authenticated frozen evidence. Validate their shape and limits, then perform exact, bounded `public_events` reads. Preserve any order or multiplicity required by existing authentication. No scans, latest annotations, or fallback searches. |
| `outcomesFromRecords` / `prospectiveCombinedCohort` | Reuse existing authorization rules to establish that the retrieved records and original profile belong to the pinned cohort. Authentication failure yields an unavailable attachment—not partially trusted costs. |
| Optional `src/combined-season.js` exports | If needed, export and reuse the existing `designInput` validator and `costFraction` calculation. Do not duplicate validation, relax accepted inputs, change arithmetic, or alter existing callers. |
| Public serialization | Explicitly allowlist the minimal display attachment. Exclude cohort bodies, original profiles, source keys, hashes, private metadata, and internal failure details. Preserve every preexisting public field. |
| Public UI contract | Available and unavailable states must be distinguishable; unavailable must not appear as zero cost. Verify existing UI compatibility. UI implementation outside the permitted files requires separate authorization. |

**Critical authentication question:** Do the existing hash/profile/reconstruction rules bind the **cost-relevant `designInput`**, or only outcome identities and scores? An exact event lookup and a matching reconstructed cohort do not authenticate fields omitted from that reconstruction. If cost inputs remain mutable or unauthenticated, return unavailable rather than claim a frozen reference.

### Error and recovery boundaries

- Preserve **503** for authoritative snapshot/body/hash integrity failures. Do not wrap the entire reader in a catch that converts these into unavailable attachments.
- Convert attachment-specific authorization or provenance failures into unavailable, using narrow error handling.
- Preserve existing `recovery` and `accountingRecovery` output and behavior. A recovery marker alone neither authorizes nor necessarily disqualifies the attachment.
- For recovered reads, require the same frozen provenance. If recovery lacks that evidence, return unavailable; do not reconstruct history from latest data.
- Do not invoke write, repair, publication, annotation-update, or snapshot-materialization paths.
- Validate `designInput` before calculation. Preserve existing `costFraction` semantics, including legitimate zero values; do not invent defaults, clamps, or replacement estimates.

## Meaningful test plan

1. **Pinned happy path:** exact cohort and event records, verified original profile, authorized inputs, expected attachment.
2. **Pinning race:** active season/profile changes after the initial read; attachment still uses the captured snapshot. Cover plural reads independently.
3. **Authentication failures:** missing events, incorrect source associations, invalid original profile, and reconstruction mismatch produce unavailable where they are attachment-only failures.
4. **Integrity failures:** tampered cohort body/SHA and existing snapshot invariant violations retain 503.
5. **Cost-input binding:** alter only cost-relevant `designInput`. Authentication must reject it, or the attachment must be unavailable if those fields are not authenticated.
6. **Validation:** exercise existing boundary rules, malformed inputs, and valid zero cost. Invalid inputs must not reach calculation.
7. **Recovery:** cover `recovery` and `accountingRecovery`, both with adequate provenance and without it; assert no repair writes.
8. **Bounded access:** instrument storage calls to reject scans, latest-annotation queries, unexpected IDs, excessive reads, and all write methods.
9. **Regression/privacy:** compare public output before and after, excluding only the attachment. Estimates, scores, ranks, Elo, history, and recovery fields remain unchanged; serialized output contains no private evidence.
10. **Display contract:** unavailable does not render as zero, `NaN`, or an authoritative historical estimate.

## Alternatives and discarded approaches

- **Latest annotations:** incompatible with a frozen attachment.
- **Persisting or backfilling costs:** incompatible with read-only scope and immutable history.
- **Recomputing rankings with reference costs:** exceeds display-only scope.
- **Blanket exception suppression:** incorrectly hides snapshot-integrity failures.
- **Treating exact IDs as sufficient authentication:** unsafe unless cost inputs are demonstrably bound to frozen evidence.

## Missing evidence and next action

Unverified dependencies are the snapshot/cohort schema, canonical hashing rules, original-profile verification, reconstruction coverage, recovery implementation, validator exports, and serializer/UI contract.

Next, inspect those definitions and their tests read-only. **First establish whether frozen evidence authenticates cost inputs**; that determines whether an available attachment is implementable within the permitted scope. Confidence is high in these boundaries, but repository-specific conclusions remain conditional.

cursor / composer-2.5 / Composer 2.5 default / unknown effort answer

Inspecting the repository for combined-season read paths, cohort lookup, and public serialization to draft an implementation plan.


## Evidence packet

### 1. Conclusion and implementation plan (conditional on repo matching the traced names)

**Goal:** Add a **display-only, frozen reference cost** object on combined-season public responses. It must be **additive** (new field(s) only), **read-only**, tied to the **pinned cohort snapshot** (SHA/body + verified profile), and **must not** change stored/public history, estimates, scores, ranks, or Elo.

**Observed context (non-source):** Branch `fix/judge-rubric-breakdown-20261008` has local edits to `src/combined-battle-comparison.js` and `test/combined-battle-comparison.test.mjs`. Scoped work should stay in the three new/optional modules plus tests unless integration is explicitly requested elsewhere.

**Recommended module split**

| Module | Responsibility |
|--------|----------------|
| `src/combined-reference-cost.js` | Pure function(s): inputs = verified cohort body/profile slice, bounded public outcome records, validated `designInput` (incl. `costFraction`); output = frozen reference cost breakdown. No I/O, no side effects. |
| `src/combined-public-read.js` | Read orchestration: `readActiveCombinedSeason(s)` → **exact** private `combined_season_cohorts` lookup by cohort id/key (not “latest”) → verify `cohortSHA` vs body and “original profile” → reuse same auth gates as `outcomesFromRecords` / `prospectiveCombinedCohort` → **exact, bounded** reads for `sourceOutcomeKeys` / `public_events` → call reference-cost pure fn → attach to DTO. |
| `src/combined-season.js` (optional) | Extract shared `readActiveCombinedSeason(s)` + cohort resolution if today duplicated between battle comparison and public read paths. |

**Tracing checklist (what to wire, in order)**

1. **`readActiveCombinedSeason(s)`** — Single entry for “which season/cohort context.” Reference attachment should be computed **only after** active season resolves to a concrete cohort key; never infer cohort from “current” annotations or leaderboard state.

2. **`combined_season_cohorts` exact lookup** — Use the same key the rest of combined season uses (season id + cohort id or stored cohort row id). Reject or 503 if row missing when season claims a cohort (integrity), not silent fallback to another cohort.

3. **`cohortSHA` / body + verified original profile** — Before any cost math, run the **existing** verify path (same as outcomes/prospective). Mismatch → **503** (align with `recovery` / `accountingRecovery` snapshot integrity), not a partial attachment with wrong costs.

4. **`outcomesFromRecords` / `prospectiveCombinedCohort` auth** — If the caller is not authorized for prospective/private cohort material, **do not** compute reference cost from private rows; set attachment to **unavailable** (`null`, `available: false`, or omit per existing public contract). Must not echo private metadata or differentiate “no auth” vs “no data” in a leaking way.

5. **`sourceOutcomeKeys` + `public_events` bounded reads** — Keys must come **only** from the frozen cohort definition; fetch public events by those keys with existing pagination/limits. No “latest annotation” queries, no unbounded scans.

6. **`recovery` / `accountingRecovery`** — On accounting/snapshot recovery paths, preserve **503** behavior; reference-cost path must not catch-and-swallow integrity errors into 200 with empty attachment unless that is already the global contract for that failure class (prefer 503 for integrity).

7. **Exported `designInput` validation / `costFraction` + public serializer / UI** — Reuse or import the same validators the export API uses for `costFraction` bounds and shape. Public serializer must strip anything not in the public schema (cohort internals, private keys, raw bodies). UI: render attachment **beside** existing judge/rubric/score UI without recomputing ranks.

**Suggested attachment shape (illustrative)**  
`referenceCost: { available: true, frozenAt, cohortSha, breakdown: {...}, costFraction }` or `referenceCost: null` when auth denies; omit sensitive fields entirely.

**Confidence:** **Low** for line-level APIs and file locations — repository inspection did not complete in this session (tools unavailable). **Medium** for the architectural constraints because they are explicit in the task and match typical “frozen cohort public read” patterns.

---

### 2. Alternatives and discarded hypotheses

- **Compute reference cost inside `combined-battle-comparison.js`:** Discarded — scope limits new modules; battle comparison should not own cohort DB reads.
- **Attach reference cost without cohort SHA verify:** Discarded — violates frozen snapshot and risks display drift vs stored outcomes.
- **Return 403 on auth failure for attachment:** Discarded — task requires **unavailable attachment**, not auth error surfaces on the main public payload.
- **Use latest annotations for cost inputs:** Discarded — explicit ban on latest-annotation queries.
- **Hypothesis that judge-rubric branch edits are the integration point:** Unverified — git status points at battle comparison, not necessarily `combined-public-read.js`; integration may be a follow-up PR.

---

### 3. Missing evidence and consequences

| Missing | Consequence |
|---------|-------------|
| Actual definitions/signatures of `readActiveCombinedSeason`, cohort lookup, SHA verify, auth helpers | Cannot name exact imports, error types, or response field names. |
| Existing public response schema and serializer | Risk of duplicate validation or schema drift for `costFraction`. |
| How `accountingRecovery` maps errors to HTTP status | Attachment path might accidentally return 200 with `null` on 503 cases. |
| UI consumer location | Cannot specify component props; only “additive field” guidance. |
| Whether `combined-reference-cost.js` already exists as stub | Cannot confirm delta vs greenfield. |

---

### 4. Test plan (meaningful tests in repo test style)

1. **Frozen snapshot:** Fixed cohort body + fixed `public_events` fixtures → deterministic `referenceCost` breakdown; repeat call → identical output (no time-dependent fields unless frozen in fixture).
2. **SHA / profile mismatch:** Verify step fails → entire endpoint (or combined read) returns **503**, same as sibling outcome tests.
3. **Auth failure:** User/context failing `prospectiveCombinedCohort` / `outcomesFromRecords` auth → response includes core public data unchanged; `referenceCost` unavailable; no private cohort fields in JSON.
4. **Exact cohort lookup:** Wrong/missing `combined_season_cohorts` row for pinned id → 503 or unavailable per existing season contract (assert matches golden test for sibling reads).
5. **Bounded reads:** Cohort with N `sourceOutcomeKeys` → mock/store records only those keys; assert no query beyond N (spy on read layer if present).
6. **`designInput` / `costFraction`:** Invalid fraction rejected at validation boundary; valid fraction flows to breakdown; aligns with export validator tests if shared.
7. **Non-mutation:** No write APIs called in test harness (mocks assert zero writes).
8. **Immutability of scores:** Response `scores` / `ranks` / `Elo` / stored snapshot hashes unchanged when attachment present vs absent.
9. **Serializer:** Golden JSON test — public payload contains only allowlisted `referenceCost` keys.

---

### 5. Next useful action

Re-run repository trace with read access: locate `readActiveCombinedSeason`, `combined_season_cohorts`, `outcomesFromRecords`, `prospectiveCombinedCohort`, `accountingRecovery`, and export `designInput`/`costFraction` validation; then draft `combined-public-read.js` as a thin clone of the **authorized, verified, bounded-read** path used for public outcomes, appending only the pure `combined-reference-cost.js` result.

Primary judge's stated reason

A is preferable because its recommendations remain grounded in the available evidence and explicitly test whether the proposed attachment can genuinely represent frozen costs. B's unsupported repository context could misdirect integration planning. This is a clear advantage in evidentiary reliability and assurance coverage, not proof of an observed implementation defect.

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

Battle wave: 7ed5e30c-95ca-4a57-b019-598cba78d0b9. Pair: brp1_d3230f2c261c2b21c952db117fbeae0ab75ffee9233100ed5acf032723f0657a. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.