← Model losses

Head-to-head comparison

openai / gpt-6-astra / high / high effort preferred over cursor / composer-2.5 / Composer 2.5 default / unknown 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

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-astra / high / high effort answer

## Conclusion

**Direct, read-only assessment; no source inspection occurred.** No source contents or tool results were supplied, so the file/function mappings below are implementation targets, not verified findings.

Implement the reference cost as an optional, authenticated **read-time attachment**, derived exclusively from the frozen provenance of the pinned combined-season snapshot. Preserve existing snapshot-integrity failures as **503**; insufficient attachment authorization yields **unavailable**.

## Proposed implementation

### `src/combined-public-read.js`

Trace `readActiveCombinedSeason` and `readActiveCombinedSeasons` through their existing snapshot validation and public serialization.

Recommended integration:

1. Resolve and validate the existing pinned snapshot.
2. Retain its exact frozen references throughout attachment construction; never resolve “active” again.
3. Look up the private `combined_season_cohorts` record by its exact pinned identity.
4. Authenticate attachment evidence through the new helper.
5. Add only an allowlisted public attachment to a newly constructed response object.

Keep the existing integrity-validation boundary outside any attachment fallback. A broad catch around the entire read would risk converting required 503 responses into apparently valid snapshots.

For plural reads, independently preserve each snapshot’s provenance. Any deduplication must use complete frozen identities, not merely season IDs.

### New `src/combined-reference-cost.js`

Prefer a narrowly scoped read-only loader plus a pure verification/calculation function:

- **Cohort provenance:** verify that the exact retrieved cohort body matches the pinned `cohortSHA`, using the repository’s existing canonicalization and hashing rules.
- **Original profile:** require the verified original profile associated with that frozen cohort. Do not substitute a current profile or trust an embedded profile without verification.
- **Outcome authorization:** establish how `outcomesFromRecords` and `prospectiveCombinedCohort` authenticate the relationship among the cohort, profile, and contributing outcomes. Reuse established verification semantics; a matching hash alone does not establish authorization.
- **Exact event evidence:** obtain `sourceOutcomeKeys` only from authenticated frozen evidence. Validate their format and cardinality before issuing bounded, exact `public_events` reads. Verify returned records against the requested identities and required authorization fields.
- **No substitutions:** missing records or failed authorization must not trigger collection scans, latest-annotation reads, current-price lookups, or reconstruction from unrelated records.
- **Cost calculation:** consume the exported `designInput` validator and `costFraction` semantics where available. Confirm required fields, units, rounding, zero handling, and valid numeric bounds before implementing arithmetic. Do not infer these contracts from their names.
- **Output:** return a small public result or an unavailable result. Keep cohort bodies, profiles, source keys, private identifiers, and detailed verification diagnostics out of public responses.

The helper must neither mutate its inputs nor invoke persistence-capable recovery paths.

### Optional `src/combined-season.js`

Change this file only if needed to export existing pure validation/calculation logic or expose authenticated frozen provenance already available during reads.

Inspect `recovery` and `accountingRecovery` specifically for:

- whether they preserve verified original inputs;
- whether they synthesize incomplete or differently authorized evidence;
- whether invoking them can write;
- whether existing snapshot-integrity errors already map to 503.

Recovered data should qualify only when it satisfies the same attachment authorization contract. Recovery status alone should neither authorize nor disqualify it.

## Public serializer and UI

Expose the attachment through an explicit allowlist. Keep stored/public historical records, estimates, scores, ranks, and Elo unchanged.

Display it as a separately labeled frozen reference cost, with an unavailable state that cannot be confused with zero. Whether a serializer addition is sufficient for the UI is unverified: if actual UI changes require files outside the permitted scope, identify that dependency before implementation.

## Meaningful tests

- **Authenticated success:** a frozen cohort, verified original profile, and exact source events produce the expected reference cost.
- **Pinning:** changing the active-season pointer during a read cannot change attachment provenance; plural reads cannot mix cohorts.
- **Authorization failures:** mismatched profile, unauthorized outcome linkage, missing events, or invalid source keys produce unavailable.
- **Integrity preservation:** existing snapshot corruption still produces 503, including when attachment lookup also fails.
- **Bounded reads:** enforce exact cohort/event lookup arguments and read limits; unexpected scans or latest-annotation queries fail the test.
- **Recovery:** representative `recovery` and `accountingRecovery` fixtures qualify only with complete authenticated evidence; no repair writes occur.
- **Calculation contract:** test independently established expected values and relevant invalid/zero boundaries of `designInput` and `costFraction`.
- **Noninterference and privacy:** freeze inputs; compare historical fields before and after; assert no writes and no private metadata in serialized output.

## Alternatives and uncertainty

- Reusing a cost already stored in an annotation is acceptable only if that exact annotation and its authority are frozen and verified. “Latest” is incompatible with the requirement.
- Reconstructing a prospective cohort is useful only if it is pure and reproduces the relevant authorization contract.
- It remains unknown whether a cohort hash mismatch belongs to existing **snapshot integrity** or attachment-only verification. Preserve the existing classification; do not silently downgrade an integrity failure.
- Actual signatures, schema relationships, read limits, recovery behavior, and cost semantics require source evidence.

**Next action:** inspect the named functions and their callers, then document the exact frozen identity chain and failure classification before implementing the helper.

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

Prefer B because its plan can be used without first separating invented repository context from supported constraints, and it explicitly addresses per-snapshot provenance in plural reads. This is a weak comparative preference, not proof of a material implementation-quality gap: both are conditional plans, and neither establishes repository behavior.

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_d31ae717f61b4f037d8d163ca9ec7caded08a9f58ac2e076db3ce16eba1f7f56. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.