openai / gpt-6.1-sol / low / low effort preferred over openai / gpt-6-luna / medium / medium 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 this proposed BattleRanks results-UI contract against the shared checkout evidence and return an implementation-ready correction list. Do not write code. Do not recommend deploy, merge, scoring writes, publisher changes, or runtime/settings changes.
Style files were left out of the evidence packet because src/page.js plus src/page-styles.js plus src/site-styles.js exceed the route input budget. Use these extracted CSS facts, not guesses: home h1 uses --hero-title-size (74px default, 58px at max-width 1240, 52px at 1000, 46px at 767) and line-height 1.01. Site-kit shell is width:min(1344px, calc(100% - 96px)). page-styles shell uses --gutter 28px, and 16px under 800px. At 320px the site-kit copy column is about 224px wide. A 46px nowrap line “earns its rank.” will overflow unless the home headline font is scaled down for that line only.
User-authorized behavior:
- Category buttons, search, filters, reset, pagination, and same-surface results navigation must update results in place on Rankings, Models, and Battles. Audit Compare, History, and Updates and include them only when the same reusable path is safe.
- Preserve scroll position, URL and back/forward, focus, and exact compare selections.
- Results must stay server-authoritative. Progressive enhancement must keep working with JavaScript disabled. In-flight responses must not overwrite a newer request. Failed updates need an inline error and retry without destroying the current results. Empty states stay the server-rendered ones.
- Homepage banner headline must be exactly two lines: “Where AI” then “earns its rank.” with a controlled break. It must remain two lines tall, not one or three, at viewport widths 320, 390, 834, and 1440. Homepage and methodology stay scriptless.
- No backend scoring or data writes. No wrangler/env/publisher/runtime settings changes. No paid battle. No record/merge/deploy.
Proposed contract to confirm or correct:
1. Add public/assets/battleranks/js/results-nav.js and load it only on rankings, models, battles, and any audited same-surface pages that already can run self scripts or that must gain the existing BATTLE_CSP path. Homepage, methodology, model profiles, and battle detail pages stay scriptless. index.js kitPage detection may recognize the new script tag so script-src 'self' applies; do not loosen CSP for other pages. Update tests that currently require /rankings HTML to contain no script.
2. Keep real href/action/method=get. Intercept only unmodified primary clicks and GET submits whose destination is the same results surface: /rankings and /rankings/:board, /models, /battles, and if safe /compare, /history, /updates. Do not intercept model profiles, battle details, methodology, RSS, theme changes, primary nav to a different surface, modified clicks, or non-GET.
3. Fetch the existing HTML URL with Accept: text/html and same-origin credentials. Parse it. Swap the view-specific children of main#content (banner plus results), not the header or footer. Update document.title from the response. Do not follow the hash or scroll the page. Restore window.scrollY. Set history.scrollRestoration = 'manual' while enhanced and store scroll in history.state. pushState on new navigations; popstate refetches that URL and restores its stored scroll.
4. Stale protection: one AbortController plus a monotonic generation. Ignore aborted and older responses. On network/non-HTML/unexpected-view failure, leave current results, show a polite live error with Retry and a normal full-page link. Do not location.assign on failure. Successful empty/invalid server pages may be swapped when they are the same surface.
5. Focus: after a successful swap, focus the same control in the new DOM (same id, otherwise same href path+search, otherwise the submitting control’s name). Restore text-input caret. Do not move focus to the top. aria-busy on the surface during fetch; aria-live status for updating, updated, and error. Do not clear results before success.
6. Compare selections: before a models/compare filter, search, reset, or pagination request, merge the live selection from checked compare inputs, hidden compare inputs, and the existing sessionStorage keys (battleranks.compare.configurations.v1 and battleranks.compare.v1) into the request URL unless the control explicitly clears compare. After swap, remount selected-directory.js and model-compare.js idempotently via one battleranks:results-mounted event. Document listeners must be registered once. Do not change selection limits or scoring. A navigation to /compare from the tray may remain a full navigation if in-place would drop the tray contract.
7. Banner: in both home heroes (src/page.js homeView and src/combined-approved-presentation.js combinedArenaHero), replace the single-line h1 with a controlled two-line headline whose accessible text remains “Where AI earns its rank.” Use CSS so each line cannot wrap internally and the block’s height is exactly two line boxes at 320, 390, 834, and 1440. Scale the home headline only, not other h1s. “earns its rank.” must fit the home copy column at those widths without a third line or overflow.
8. Tests: update the contiguous-headline assertion to require the controlled break and no homepage script. Add a node:test for the results-nav generation/abort/same-surface rules using vm, plus render assertions that rankings/models/battles include the enhancer and homepage/methodology do not. Do not add a browser harness.
Return: agreed contract, corrections, files to touch, files not to touch, and test expectations. Flag any part of this contract that would violate CSP, compare-selection, or scroll requirements.
openai / gpt-6.1-sol / low / low effort answer
## Agreed contract
Approve the server-rendered HTML enhancement approach **with the corrections below**. Work was independent and read-only, using only the supplied snapshot.
- Enhance Rankings, Models, and Battles; History and Updates safely fit the same isolated, same-surface path.
- Compare is safe only with explicit selection-edit versus selection-preserving request handling.
- Preserve real links and GET forms, server ordering, server empty states, current results during requests, and inline retry on failure.
- Use abort plus generation checks, external same-origin JavaScript, and a controlled scriptless homepage headline.
## Implementation-ready corrections
### 1. Add an explicit surface marker, including invalid states
Give `main#content` a server-rendered surface identity derived from `route.view`, rather than recognizing a view by its banner or results ID.
- Legacy unavailable views lack the ordinary results IDs (`src/page.js:1371–1372,2029–2034`).
- Combined pages use `#selected-results` for multiple surfaces (`src/combined-configuration-page.js:57`).
Validate response content type, final response origin/path, and matching surface marker **before changing anything**. Reject unexpected redirects and 5xx responses; allow recognized same-surface 400/404 invalid selections. Do not reject every `!response.ok`, or valid server-rendered invalid selections will never appear.
### 2. Swap the complete view payload, not just two selected elements
Replace the view-specific contents of `main#content`, retaining the main element and its status/error infrastructure.
The payload includes more than banner and table:
- Models tray, comparison status, and JSON data (`src/page.js:1150`).
- Combined inline styles, stylesheet link, selection toolbar, and JSON data (`src/combined-configuration-page.js:44–57`).
- Publication-fallback notice (`src/page.js:2259`).
Parsed executable scripts must not be evaluated or repeatedly inserted as a mounting mechanism. Preserve necessary JSON data nodes; bootstrap existing controllers once and remount through the event.
### 3. Correct “merge compare selections”
**Do not union checked controls, hidden controls, and both storage keys.** That resurrects removed selections, mixes configuration and model identities, and can change ordering or truncate the intended selection.
Use the controller for the active presentation:
- Combined configurations: `battleranks.compare.configurations.v1`, existing limit 10 (`selected-directory.js:29,41–47`).
- Legacy models: `battleranks.compare.v1`, existing limit 3 (`model-compare.js:11–23`).
The active controller’s ordered live selection is authoritative; storage is a fallback only when no explicit/live selection exists. Preserve off-filter selections through that controller, not visible checked inputs alone. Explicit `compare=` means empty and must outrank saved storage.
Distinguish:
- **Filter/search/reset/pagination:** preserve current selection.
- **Compare picker submission:** use its submitted checked/select values exactly.
- **Remove/clear links:** use the destination’s explicit selection exactly.
- **Back/forward:** use the target URL’s selection, never merge the current page’s selection into it.
Legacy Compare uses `select[name="compare"]`, not checked inputs (`src/page.js:1077–1085`). Combined Compare uses checkboxes (`src/combined-configuration-page.js:59`). Blind preservation would undo picker edits and removals.
Leave Models → Compare tray navigation as a full navigation.
### 4. Refactor mounting and lifecycle explicitly
Dispatching `battleranks:results-mounted` alone is insufficient: both scripts currently execute one-time closures retaining old DOM nodes.
- `model-compare.js:4–17,173–212`
- `selected-directory.js:4–32,152–215`
Require:
- One document/window listener registration per controller.
- Fresh DOM/data acquisition on each mount.
- Cleanup of old element handlers, resize observers, timers, and resize closures.
- Reset/recalculate `--selected-directory-tray-space`.
- Coordinated popstate behavior: selection controllers must not mutate old content or overwrite target selection while results navigation is fetching.
The enhancer must respect `event.defaultPrevented` and exclude compare toggle/remove/clear interactions owned by the selection controller.
### 5. Preserve shell identity, but synchronize URL-dependent controls
Leaving the header entirely untouched leaves stale search action, hidden fields, values/defaults, and theme URLs:
- Finder carries board, query, provider, route, period, and compare fields (`src/page.js:180–187,2238–2253`).
- Theme links depend on the current destination (`src/page.js:135–149`).
Synchronize those attributes and fields from the response without replacing the header or disturbing its focused input. Preserve newer unsent typing. Update URL-dependent theme destinations without intercepting theme changes.
Coordinate `filter-state.js` restoration with enhanced pageshow/popstate behavior; existing reset logic uses server defaults (`filter-state.js:9–14`).
### 6. Tighten interception rules
Match exact surfaces, not broad prefixes: `/rankings` and one board segment; exact `/models`, `/battles`, `/compare`, `/history`, `/updates`.
Also exclude:
- Hash-only links, including “Explore results.”
- Download links and non-self targets.
- Already-prevented events.
- Theme parameters.
- Submitter overrides that change method, action, or target.
GET serialization must reproduce native successful controls, repeated fields, external form-associated controls, and the submitter. Combined directory checkboxes are associated with their compare form through `form="selected-directory-compare"` (`src/combined-approved-presentation.js:33`).
### 7. Make history, scroll, and focus transactional
- Namespace history state and retain existing state fields. Selection scripts already preserve `history.state` on replacement.
- Seed the initial entry and save scroll continuously or before leaving; popstate has already changed entries, so it is too late to save the departed entry using ordinary `replaceState`.
- Push once on successful new navigation; retries must not create duplicate entries.
- Popstate must never push.
- For normal updates, preserve scroll at commit time so scrolling during the request is not undone.
- Use `focus({preventScroll:true})`; restore caret only for supported inputs.
- Scope fallback focus matching by form/control identity, name, value, and occurrence. Name alone is ambiguous for repeated compare controls.
- Do not steal focus if the user moved it during the request.
- Guard deferred focus/scroll/layout callbacks with the generation too.
**Exact scroll preservation is impossible when replacement content becomes shorter than the old scroll offset.** Specify browser-clamped restoration, or retain temporary minimum surface height if literal pixel preservation is required. Account for image layout and tray spacing; a single immediate `scrollTo` is insufficient.
On failed popstate, retain current results and clearly indicate that loading the requested URL failed; Retry targets that entry without pushing.
### 8. CSP: retain existing policies, recognize the exact new tag
Add an exact `RESULTS_SCRIPT` match to `kitPage` detection (`src/index.js:32–35,451`), not a pathname substring. Existing asset routing already accepts `results-nav.js` (`src/index.js:37–39`).
No inline executable code, `eval`, or policy-string expansion is needed.
The selected combined handler already unconditionally returns `BATTLE_CSP` (`src/index.js:358–360`). Keep that existing behavior; do not claim the proposed tag detection controls that branch.
**Scriptless detail-page conflict:** legacy battle detail pages already load the battle kit (`src/page.js:1782–1794,1866,2026`). Correct clause 1 to “do not add results-nav to battle detail pages; retain existing battle-detail scripts.” Making all details literally scriptless would be a separate behavioral change, not merely enhancer scoping.
### 9. Two-line headline: CSS must solve actual width
Change both home renderers (`src/page.js:978`; `src/combined-approved-presentation.js:12`) to two explicit line spans with one controlled break and accessible text exactly:
**Where AI earns its rank.**
Each line must be internally nowrap. Use a dedicated home-headline class and a responsive size that fits the supplied approximately 224px copy width at 320px. Retaining 46px and merely adding nowrap is demonstrably insufficient.
Use two equal line boxes with line-height 1.01 and no extra span margins/gaps. Prefer a consistent headline font size for both lines at each breakpoint; if sizing only the second span differently, explicitly equalize its line box. Do not hide overflow to disguise a bad fit.
## Audited optional surfaces
| Surface | Decision |
|---|---|
| History | Include: ordinary GET selectors and server-rendered SVG/table; support invalid-state markers. |
| Updates | Include: same-path week navigation; explicitly exclude RSS and battle/profile links. Gains existing CSP path through the new tag. |
| Compare | Include only after selection-intent rules above; shared filters/pagination preserve selection, picker/remove/clear requests replace it. |
## Files to touch
Required:
- `public/assets/battleranks/js/results-nav.js` — new.
- `public/assets/battleranks/js/model-compare.js`
- `public/assets/battleranks/js/selected-directory.js`
- `src/page.js`
- `src/combined-approved-presentation.js`
- `test/results-nav.test.mjs` — new.
- `test/present.test.mjs`
- `test/site-visual.test.mjs`
- `test/worker.test.mjs`
Conditional:
- `public/assets/battleranks/js/filter-state.js` and `test/filter-state.test.mjs` for coordinated restoration.
- A shared existing home styling owner, such as `src/page-styles.js` or `src/site-styles.js`, after inspecting its actual precedence. Those implementations are outside this packet; use the supplied CSS facts, not assumed selectors.
No changes to History, Updates, battle-search, or shared-battle view modules are inherently necessary if markers and enhancer loading live in the shared layout.
## Files not to touch
Backend scoring, rating calculation, data readers/writers, ingest, publisher, migrations, wrangler/env/runtime settings, and battle-detail enhancement assets. Within `src/index.js`, limit changes to emitted-tag CSP detection; leave read/write routes and policy strings unchanged.
## Test expectations
- Render assertions for both legacy and combined presentations: enhancer on admitted surfaces, never home/methodology/profiles/details.
- Update Rankings period no-script assertions too (`test/present.test.mjs:404`; `test/worker.test.mjs:149–153`).
- Keep existing battle-kit detail assertions.
- VM tests: abort ignored by transport, out-of-order HTML parsing, stale catch/finally/deferred callbacks, same-surface exclusions, native GET semantics, retry without duplicate history, popstate scroll, focus/caret, and no automatic full navigation.
- Selection tests: off-filter picks, stable ordering, deselection, explicit empty selection, storage failure, no cross-key union, picker edits, and repeated mounts without listener/observer duplication.
- CSP tests: exact tag enables self scripts; reflected script paths do not; unrelated pages retain their existing policy.
- Headline tests: controlled break, exact accessible text, scriptlessness, home-only nowrap/responsive sizing.
Node render/VM tests cannot prove actual two-line pixel layout at 320, 390, 834, and 1440. Keep those widths as explicit visual acceptance checks without adding a browser harness.
**Next useful action:** implement the corrected selection ownership, surface marker, and transactional navigation contract before adding interception.
MATERIAL_EVIDENCE_CONFLICT: The proposed contract says battle details “stay scriptless,” but legacy battle details emit the battle kit scripts at src/page.js:1782–1794,1866,2026, and test/present.test.mjs:305–308 requires them.openai / gpt-6-luna / medium / medium effort answer
## Agreed contract, with corrections
Use progressive enhancement over the existing server-rendered GET pages. Keep ordinary links and forms functional without JavaScript; never compute results client-side, clear current results before a response succeeds, or let an older response replace a newer one. On update failure, retain the current view and offer an inline error, Retry, and a normal full-page link. Accept same-surface server responses even when they render an empty or invalid state.
1. **Script loading and CSP:** Add `public/assets/battleranks/js/results-nav.js` only to eligible results surfaces. `src/index.js` may recognize its exact emitted script tag when choosing `BATTLE_CSP`; do not broaden CSP. The worker already selects that policy from emitted script tags (lines 29–35, 451–460). Keep home and methodology scriptless as authorized. Rankings, models, and battles are authorized; audit Compare, History, and Updates separately. The shared path is plausible for History and Updates, but Compare’s tray and selection behavior make in-place navigation unsafe without preserving its contract. Keep tray navigation to `/compare` as a full navigation.
2. **Interception:** Retain real `href`, `action`, and `method=get`; intercept only unmodified primary same-origin GET navigation/submission on the same results surface. Do not capture anchor-only links, theme links, RSS, model profiles, battle details, methodology, or primary navigation to another surface. Preserve native modified clicks and non-GET behavior. The route allowlist must distinguish `/rankings` and board routes from unrelated paths; use the actual route family, not a loose prefix.
3. **Swap and scroll:** Replacing the children of `main#content` is a reasonable boundary: the banner and results are inside it, while header/footer are outside (`src/page.js:108–112`). Require a valid parsed response and the expected same surface before swapping. Update the title, but do not navigate to the response hash or scroll to an anchor. Preserve the current scroll position. Set manual restoration while enhanced; save outgoing scroll into the current history entry before `pushState`, associate the target URL with its own scroll, and refetch on `popstate` without pushing another entry. Merge, rather than overwrite, existing `history.state`.
4. **Focus and status:** Preserve focus by a stable identity, but do not treat same `id` alone as sufficient if it identifies a different control; verify control type/name where relevant. Fall back to destination path+search, then the submitting control’s name. Restore caret only for compatible text inputs. Keep focus from jumping to the top. Expose updating/updated/error status and `aria-busy` on a stable results surface; ensure the error controls are reachable without replacing results.
5. **Compare selection:** Correct the proposed “merge … live selection … and existing sessionStorage keys” rule. Blindly unioning both storage keys can resurrect removed selections or mix two distinct selection systems. The packet shows a three-model comparison flow (`model-compare.js:11–15, 159–170`) and a separate ten-configuration directory flow (`selected-directory.js:29–47, 50–67`); they have different keys, limits, and restore rules. For each eligible request, identify the active surface/system, treat an explicit URL selection—including an explicit clear—as authoritative, and preserve the exact ordered selections and repeated query parameters. Reconcile live checked/hidden inputs with only the matching system’s state; do not apply one system’s limit or storage to the other. The current scripts initialize once and install document listeners (`model-compare.js:173–213`, `selected-directory.js:148–215`); a mount event alone will not remount them. Refactor initialization to be explicitly idempotent, with listeners registered once and page-specific state refreshed after a successful swap.
6. **Banner:** Use a controlled break in both home renderers (`src/page.js:978`; `src/combined-approved-presentation.js:11–12`) and preserve the accessible text exactly as “Where AI earns its rank.” The supplied CSS facts rule out keeping the home headline at 46px on a 320px viewport: the ~224px copy column cannot fit “earns its rank.” on one nowrap line at that size. Scale only the home headline’s second line as needed, while keeping both lines non-wrapping and the heading exactly two line boxes at 320, 390, 834, and 1440. Do not scale other h1s. Verify layout behavior at all four widths; source-only render assertions cannot establish it.
7. **Tests:** Update the contiguous headline assertion to verify the controlled break and exact accessible text, and assert home remains scriptless. Replace the blanket `/rankings`-is-scriptless expectation with explicit assertions: rankings/models/battles include the enhancer; home/methodology do not. Add the proposed `node:test`/`vm` coverage for generation, abort, and same-surface filtering. Also test request selection preservation/explicit clear, success and failure retaining the view, popstate scroll restoration, and idempotent remount behavior. No browser harness is authorized.
## Files to touch
- `public/assets/battleranks/js/results-nav.js` (new)
- `src/index.js` for exact-tag CSP detection
- `src/page.js` for conditional script emission and the legacy home headline
- `src/combined-approved-presentation.js` for the combined home headline
- Relevant render/test files, notably `test/present.test.mjs`, `test/site-visual.test.mjs`, `test/worker.test.mjs`, plus a new enhancer test
- `public/assets/battleranks/js/model-compare.js` and `selected-directory.js` only as needed to provide safe idempotent remounts and correct per-system selection handling
## Do not touch
Scoring/data-write paths, publisher behavior, runtime/environment/Wrangler settings, backend result computation, battle-detail/profile/methodology behavior, or deploy/merge configuration. Do not add a browser harness.
**CSP:** Exact-tag recognition is compatible with the existing policy; broadening it or emitting the enhancer on scriptless pages is not.
**Scroll:** Ignoring hashes while keeping their URL is compatible with the request, provided scroll is explicitly preserved for push and pop navigation.
**Compare:** The proposed union of both session-storage keys is not safe; it can alter exact selections. Use the active comparison system and explicit URL state as described above.
**Uncertainty:** The packet omits `src/page-styles.js` and `src/site-styles.js`; rely on the supplied CSS facts for the banner, and validate the final layout at the specified widths. The packet also identifies direct dependencies outside its scope, so details of those dependencies are not established here.
Primary judge's stated reason
B provides the more implementation-ready whole-contract review: it reduces a specific risk of subsequent searches and theme navigation using stale destinations, and preserves existing detail-page functionality rather than silently accepting a conflicting premise. This is a clear supported coverage advantage, not merely a forced slight preference, although no implementation failure or executed verification is established.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: 339f1ec8-d5e7-4c36-9326-ba2e557e062b. Pair: brp1_ccf2935eb83df403116bf221297c4f2c46801cc434aed40897898420bd3399af. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.