openai / gpt-6.1-sol / xhigh / xhigh 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 / xhigh / xhigh effort answer
## Conclusion
**The contract is implementable, but needs corrections before implementation—especially selection handling, scroll restoration, module remounting, and the “scriptless battle details” premise.** This was a direct, read-only review of the supplied snapshot; no code changed or tests ran.
### Agreed contract
- Enhance Rankings, Models, and Battles using their existing server-rendered HTML.
- Retain real links and GET forms, server filtering, server empty states, and JavaScript-disabled behavior.
- Replace result-specific content, not the header/footer nodes.
- Use abort plus generation protection, preserve existing results on failure, and offer inline Retry and an explicitly native full-page link.
- Keep homepage and methodology scriptless.
- Add no scoring, data-writing, publisher, or configuration behavior.
**Audit outcome:** History and Updates can use the same mechanism. Compare can too, **after correcting selection ownership and explicit selection-changing actions**. Models-to-Compare tray navigation should remain native.
## Implementation-ready corrections
### 1. Correct script scope and CSP assumptions
- Emit the enhancer from explicit route/surface information, including eligible surfaces’ empty, invalid, and unavailable initial renders. Do not infer eligibility from a results element that disappears in an error state.
- Add an exact `RESULTS_SCRIPT` tag match to `src/index.js`’s `kitPage` detection. Matching only the asset path would repeat the reflection problem already documented at `src/index.js:32–35`.
- Use the existing `BATTLE_CSP`; no inline executable scripts, `eval`, new origins, or new connect permissions are necessary.
- **Battle detail pages are not currently universally scriptless.** Legacy details emit the battle kit’s scripts through `kitMount` (`src/page.js:1782–1794, 1866, 2026`). Correct clause 1 to **“exclude results-nav from details; preserve their existing enhancement.”** Removing that kit is not needed for this task.
- Selected-season HTML already receives `BATTLE_CSP` unconditionally (`src/index.js:358–361`). Do not describe exact-tag detection as its current policy. Also, simply replacing that policy with `HTML_CSP` would block the selected presentation’s external stylesheet (`src/combined-configuration-page.js:57`).
### 2. Make interception rules explicit
Use separate surface identities:
| Surface | Eligible destinations |
|---|---|
| Rankings | `/rankings` and its board routes |
| Models | `/models` only |
| Battles | `/battles` only |
| Compare | `/compare` only |
| History | `/history` only |
| Updates | `/updates` only |
Additional exclusions:
- Already-prevented events, non-primary/modified clicks, downloads, and non-current browsing targets.
- Compare toggle/remove/clear controls owned by the comparison module.
- Theme requests, RSS/API URLs, profiles, details, and cross-surface navigation.
- Pure fragment navigation such as “Explore results” and “Skip to content.” Keep those native; suppress fragment scrolling only for intercepted result navigations.
GET serialization must preserve normal form behavior: successful controls, repeated fields, default GET when `method` is absent, the submitter, and applicable submitter overrides. Do not inadvertently preserve stale action-query fields instead of following GET submission semantics.
### 3. Validate the response without rejecting intentional invalid states
Add a stable, server-emitted surface marker on `main#content`, including same-surface invalid/error presentations. Existing results IDs alone are insufficient: several unavailable views omit them (`src/page.js:1370–1372, 2029–2034`).
Before committing, validate:
- HTML content type.
- Final response URL remains same-origin and on the expected surface.
- Parsed document contains the expected surface marker and main content.
Distinguish failures from intentional server responses:
- Network, malformed/unexpected HTML, and 5xx responses retain existing results and show the retry error.
- Valid same-surface 400/404 selection pages may be installed. History and Updates intentionally use 400 for invalid selections; missing boards/battle pages can use 404 (`src/index.js:405, 427, 431, 436`).
- Do not reject every response solely because `response.ok` is false.
The error’s full-page link needs an explicit interception bypass; otherwise it merely retries enhancement.
### 4. Replace “merge selections” with authoritative selection carry-forward
**Unioning checked inputs, hidden inputs, and both storage keys violates exact-selection preservation.** It can resurrect unchecked/removed IDs, mix configuration IDs with model IDs, or exceed the active limit.
Required rules:
- Use only the active comparison mode and its storage namespace:
- Configuration directory: `battleranks.compare.configurations.v1`, existing limit 10 (`selected-directory.js:29, 41–46, 153–159`).
- Legacy models: `battleranks.compare.v1`, existing maximum up to 3 (`model-compare.js:11–23`).
- Treat sessionStorage as fallback when an explicit selection is absent—not an additional union source.
- Preserve selection order and exact IDs; do not prune merely because filtering hides a selected row.
- Honor explicit empty `compare=`. Both existing scripts use that sentinel to prevent storage restoration.
- Selection-changing destinations are authoritative. This includes Compare’s clear/remove links, not just elements bearing `data-compare-clear` (`src/page.js:1090, 1098`).
- Capture **select controls** as well as checkboxes/hidden inputs: legacy Compare uses three repeated `select[name="compare"]` controls (`src/page.js:1077–1085`).
- Compare-editor submissions must replace the selection with their submitted selection. Pagination/filtering must not append old storage selections to it.
Also handle **selection changes during an outstanding request**. Existing selection actions call `replaceState` without initiating a results request (`model-compare.js:151–156`; `selected-directory.js:138–145`). Abort/generation protection alone would therefore allow an older selection-bearing response to overwrite newer picks. Invalidate or supersede that pending candidate when selection changes.
### 5. Refactor comparison lifecycle; do not replay fetched scripts
Both comparison scripts currently initialize once and close over their initial DOM. Re-dispatching an event without restructuring them will not remount anything.
Required lifecycle:
- Register document/window handlers once.
- Mount initially and on one `battleranks:results-mounted` event after each successful commit.
- Read the newly installed JSON and DOM on each mount.
- Detach obsolete element handlers and disconnect the directory’s old ResizeObserver/resize callbacks (`selected-directory.js:193–215`).
- Clear stale references and tray spacing when the new view has no tray.
- Coordinate popstate handling so old DOM/controller state cannot overwrite the incoming URL’s selection.
- Register mount support even when initial data nodes are absent; both scripts currently return early.
Keep fetched JSON data nodes, but **do not execute or reinsert fetched executable script tags**. Ensure the applicable comparison bootstrap is available once even when the initial Models/Compare render is unavailable.
### 6. Preserve chrome nodes, but synchronize their URL-dependent state
Replacing only main leaves important header state stale:
- Rankings’ finder action contains the current board.
- Finder hidden fields carry provider, route, period, and extra parameters.
- Theme links contain the current stay URL.
Evidence: `src/page.js:135–150, 180–187, 2238–2253`.
Synchronize those attributes/fields from the accepted response **without replacing header nodes or overwriting later user edits**. Update control defaults where restoration/reset relies on them. Otherwise, searching after changing ranking category can silently return to the old board.
### 7. Strengthen scroll and history handling
Clause 3’s single `scrollTo(savedY)` is insufficient.
- Initialize a namespaced history entry using `replaceState`, preserving unrelated state.
- Save outgoing scroll continuously and immediately before successful navigation.
- Push only on successful, distinct new navigations; never push on Retry or popstate.
- Capture a popstate entry’s target scroll before fetching. Do not save the still-visible old view’s scroll into that destination entry.
- For ordinary updates, preserve the user’s **latest** scroll position at commit—not their position when the request began.
- Restore with immediate, non-smooth behavior after mounting and focus restoration. Prevent focus, anchoring, and tray/layout changes from undoing it.
- Restore the previous `scrollRestoration` policy on leaving enhancement; handle BFCache re-entry deliberately.
- **Shorter results can make the old scrollY unreachable.** Maintain sufficient temporary content height/scroll range if exact preservation is required; browser clamping is not preservation.
- After failed popstate, disclose that previous results remain visible. Do not silently alter history or force navigation.
All delayed restoration work must also check the request generation.
### 8. Make focus matching sufficiently precise
The proposed name-only fallback is ambiguous for repeated Compare controls and does not cover unnamed submit buttons.
- Add stable focus keys where needed.
- Otherwise match within the originating form/control group using name, type, value, and occurrence—not a document-wide name match.
- Preserve the active control at commit if the user moved focus while loading.
- Leave focus outside the replaced region untouched.
- Restore supported text-input caret ranges and use `focus({preventScroll:true})`.
- Define a local surviving-control fallback for disappearing Reset/pagination controls; never focus the banner or main’s top.
Use a persistent polite status host outside the busy subtree. Do not make the entire result set live. Older requests must not clear a newer request’s busy/status/error state.
### 9. Make the two-line headline a real layout guarantee
Both headline owners require changes:
- `src/page.js:978`
- `src/combined-approved-presentation.js:12`
Use one controlled break with independently nonwrapping lines and accessible text exactly **“Where AI earns its rank.”**
CSS requirements:
- Home-headline-only sizing; do not alter general h1 sizing or shell gutters.
- Exactly two line boxes, without an extra block-plus-break line, gaps, or clipping.
- Size against the **actual copy column**, not merely viewport width.
- At 320px, the second line must fit approximately 224px. Keeping the supplied 46px size fails this requirement.
- If only the second line is reduced, explicitly control both row heights so font-size differences do not undermine the two-line-box guarantee.
The supplied metrics do not establish a safe numeric font-size cap for every font. Do not claim viewport fit from markup assertions alone.
## Files to touch
**Core implementation**
- New `public/assets/battleranks/js/results-nav.js`
- `public/assets/battleranks/js/model-compare.js`
- `public/assets/battleranks/js/selected-directory.js`
- `public/assets/battleranks/js/filter-state.js` — enhancement/BFCache coordination as needed
- `src/page.js` — surface/bootstrap metadata, chrome synchronization support, headline, focus keys
- `src/combined-approved-presentation.js` — headline and stable control identifiers
- `src/combined-configuration-page.js` — Compare intent/form identifiers
- `src/index.js` — exact enhancer-tag CSP detection only
**Presentation identifiers, where required**
- `src/combined-battle-search.js`
- `src/history-view.js`
- `src/shared-battles-view.js`
- `src/updates-view.js`
**Styles**
- Existing home-style owner in `src/page-styles.js` / `src/site-styles.js`. Their contents are outside the packet; use the supplied CSS facts.
**Tests**
- New `test/results-nav.test.mjs`
- `test/filter-state.test.mjs`
- `test/present.test.mjs`
- `test/site-visual.test.mjs`
- `test/worker.test.mjs`
## Files not to touch
- Scoring, Elo, ingestion, persistence, publication, and server data-reading implementations.
- Wrangler/environment/runtime configuration, settings, migrations, or published data.
- Existing battle-kit JavaScript.
- General shell/gutter and non-home heading rules.
- Methodology content beyond retaining its scriptless assertions.
## Test expectations
1. **Render/CSP:** enhancer appears exactly once on eligible surfaces, including invalid/empty variants; never on homepage, methodology, profiles, or details. Preserve existing detail-kit tests. Check exact-tag CSP detection and reflected-path safety.
2. **Update obsolete assertions:** `/rankings` scriptlessness appears in `test/site-visual.test.mjs:42–44`, period assertions in `test/present.test.mjs:404`, and CSP/script assertions in `test/worker.test.mjs:149–153`.
3. **VM navigation tests:** same-surface boundaries, native exclusions, GET serialization, submitters, full-page bypass, title/main-only replacement, and intentional 400/404 states.
4. **Race/failure tests:** reverse-order responses, abort during body reading, stale errors/finalizers, rapid popstate, preserved current results, Retry, and selection changes during fetch.
5. **Selection/lifecycle tests:** isolated storage namespaces, explicit empty/clear/remove, repeated selects, hidden selections, unchanged limits, repeated mounts, and obsolete observer cleanup.
6. **History/focus tests:** preserved unrelated history state, no push on Retry/popstate, latest-scroll preservation, shortening protection, no hash jump, scoped focus matching, and caret restoration.
7. **Headline:** assert the controlled two-line structure and scriptlessness in both home renderers. Verify two-line height and no overflow at **320, 390, 834, and 1440px** manually or through existing visual facilities—without adding a browser harness.
**Remaining uncertainty:** `pageStyles(body)` is body-dependent (`src/page.js:103`), but its implementation is outside the packet. Keeping the original head styles must not omit styles required by an accepted same-surface variant. Likewise, preserve the server validators in the omitted comparison readers rather than inventing new normalization rules.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 a clear task-grounded advantage in implementation readiness: it addresses stale chrome state and selection changes during fetching, alongside more precise lifecycle and restoration safeguards. This is a supported coverage advantage rather than a slight forced preference, but it does not prove any implementation or runtime outcome.
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_b6f97917f43fc7e7659f9317c9e7ce9c25e0c03fa89b2ed9a2ee5b0387168587. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.