← Model losses

Head-to-head comparison

openai / gpt-6-astra / medium / medium effort preferred over openai / gpt-6-luna / low / low 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

MVP source audit; taskCategory=ux; module category=ux, difficulty=high, expectedTests=none. Dashboard layout, widget/query state and API/schema contracts, including their focused tests. Source review only; no tests run. Use only exact supplied files and cite file plus original line. Do not run tests, use shell/globs/root traversal, live services, databases, customer data, or edit source. Report concrete source-proven issues with impact and confidence, otherwise state no findings. Identify every excluded boundary explicitly; do not infer production readiness. This source-only audit packet is bound to verified merged main commit 9dab4e99d3bfadf995dbaa031b9b6a365970e1e3; it does not verify runtime or production behavior.

openai / gpt-6-astra / medium / medium effort answer

## Conclusion

Direct, independent review of all 32 supplied files found **11 concrete issues**. Findings apply only to the supplied snapshot at `9dab4e99d3bfadf995dbaa031b9b6a365970e1e3`. No tools, tests, or external actions were used; runtime and production behavior remain unverified.

### Findings

1. **High — Dashboard switching can retain the previous dashboard’s widgets.**  
   `[REDACTED: private project name]/frontend/src/pages/DashboardPage.tsx:145–155` resolves widgets using `urlConfigId`, but its memo dependencies omit that value at line **191**. Meanwhile, the header’s active configuration does update on URL changes at lines **119–130**. When the mounted page switches IDs with unchanged query data, the title/share target can describe dashboard B while widgets still describe A.  
   **Recommendation:** Include `urlConfigId` in the resolution dependencies. **Confidence: 1.00.**

2. **High — Dashboard filter composition changes Boolean meaning.**  
   `[REDACTED: private project name]/frontend/src/store/useDashboardFilterStore.ts:99–103` supports an explicit global connector, but `getEffectiveFilters` discards it at lines **141–149**. `[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx:44–57` then flattens global, cross-, local, and existing conditions under the base query’s connector. Global `A OR B` becomes `A AND B` by default; conversely, an existing OR query makes an added cross-filter another alternative rather than a restriction.  
   **Impact:** Displayed metrics can answer a different question from the selected filters.  
   **Recommendation:** Preserve filter groups and explicitly define their composition. **Confidence: 1.00.**

3. **High — Relation query builder ignores OR between root conditions.**  
   `[REDACTED: private project name]/frontend/src/lib/semanticQueryBuilder.ts:351–355` accepts `connector`, but lines **372–385** place every root condition and the relation into one AND group. For two root alternatives and an inspection relation, `(A OR B) AND relation` becomes `A AND B AND relation`. The ordinary builder correctly handles OR at lines **218–225**.  
   **Recommendation:** Group root conditions with their requested connector before intersecting with the relation. **Confidence: 1.00.**

4. **High — Relation interpretation can reverse explicit negation.**  
   Two source-proven cases:
   - “work orders not completed”: absence detection only recognizes negation preceding the relation (`[REDACTED: private project name]/frontend/src/lib/relationIntent.ts:223–234`). The completed token becomes a **positive** closed-status predicate at lines **534–559**, and the remaining “not” is removed at line **572**. The function returns a successful positive relation at lines **604–614**.
   - “no PACP inspections”: the negation bridge excludes inspection-type tokens at line **45**, so the absence matcher at **225** fails. PACP is subsequently consumed at **515–528**, and “no” is removed at **572**, yielding positive PACP existence.

   **Impact:** Requests for absence/exclusion can become their opposite.  
   **Recommendation:** Preserve scoped negation; refuse unsupported negated qualifiers instead of stripping them. **Confidence: 0.99.**

5. **Medium — “Reset to default” cannot recover URL-addressed or persona-cloned corrupt layouts.**  
   `[REDACTED: private project name]/frontend/src/pages/DashboardPage.tsx:427–433` only clears `default_dashboard_id`. A URL-selected corrupt dashboard still wins at **145–150**; a corrupt persona clone remains selected at **170–179**.  
   **Impact:** The offered recovery action returns users to the same error.  
   **Recommendation:** Make recovery change the actual failing selection or replace its invalid layout. **Confidence: 1.00.**

6. **Medium — Medium-width layout scaling creates overlapping widgets.**  
   `[REDACTED: private project name]/frontend/src/pages/DashboardPage.tsx:559–569` independently rounds width upward and floors position, retaining explicit row placement. Two valid adjacent widgets at `x=0,w=3` and `x=3,w=3`, sharing a row, become `x=0,w=2` and `x=1,w=2`: they overlap. Width 3 is explicitly supported by `[REDACTED: private project name]/frontend/src/components/dashboard/BuilderCanvas.tsx:20,48`.  
   **Recommendation:** Repack the six-column layout or use collision-aware breakpoint layouts. **Confidence: 1.00.**

7. **Medium — Layout validation accepts malformed values that fail during rendering.**  
   `[REDACTED: private project name]/frontend/src/lib/parseLayout.ts:21–27` validates only ID/type strings and finite position numbers before asserting `WidgetConfig[]`. It accepts an object-valued `title`, which is rendered directly at `[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx:179`. It also accepts zero/negative/fractional spans and duplicate IDs, although positions and IDs are consumed directly at `[REDACTED: private project name]/frontend/src/pages/DashboardPage.tsx:565–569`.  
   **Impact:** Malformed layouts bypass the dedicated invalid-layout recovery surface and can instead produce widget render errors or invalid/ambiguous placement.  
   **Recommendation:** Validate the consumed widget fields, unique IDs, and supported grid bounds. **Confidence: 0.99.**

8. **Medium — Forecast and risk widgets do not receive their required data shape.**  
   `[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx:248–365` has no transform cases for `forecast_summary` or `risk_heatmap`; both receive the default `{ rows }` at **363–364**. Their renderers instead read top-level `at_risk_5y`/`critical_5y` and `distribution` at `[REDACTED: private project name]/frontend/src/components/dashboard/WidgetRenderer.tsx:233–235,250–259`.  
   **Impact:** Even populated query results render forecast placeholders and zero-valued risk bands.  
   **Recommendation:** Add explicit transformations matching these renderer contracts. **Confidence: 1.00.**

9. **Medium — Config-only narrative text never reaches the renderer through WidgetCard.**  
   Without `widget.query`, `[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx:40–42` produces a null query, disabling fetching through `[REDACTED: private project name]/frontend/src/api/dashboardData.ts:62`. The config-to-text transformation is called only when a result exists (`WidgetCard.tsx:64`), making its config-only handling at **225–240** unreachable in this case. `[REDACTED: private project name]/frontend/src/components/dashboard/WidgetRenderer.tsx:96–97` forwards only `data`, not the text configuration.  
   **Impact:** A configured narrative with no query receives undefined data rather than its saved text. The excluded narrative component’s fallback appearance is unknown.  
   **Recommendation:** Construct config-only data independently of query results. **Confidence: 1.00.**

10. **Medium — Chart transformation removes the IDs required for asset-detail clicks.**  
    `[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx:257–260,271–274` reduces bar/line rows to `{ name, value }`. Their click handlers forward those transformed rows (`[REDACTED: private project name]/frontend/src/components/dashboard/WidgetRenderer.tsx:149–150,185–186`), while asset navigation requires `payload.asset_id` or `payload.id` (`WidgetCard.tsx:140–144`). Neither survives the transform. Additionally, the shared handler returns before reaching asset navigation if no dimension exists at **117–118**.  
    **Impact:** Configured asset-detail clicks cannot navigate for these charts, even when original rows contain asset IDs.  
    **Recommendation:** Preserve navigation identity separately from display values and dispatch asset actions before dimension-dependent checks. **Confidence: 1.00.**

11. **Medium — Dashboard dialogs lack modal semantics and focus management.**  
    `[REDACTED: private project name]/frontend/src/components/dashboard/PersonaSelector.tsx:19–65` and `[REDACTED: private project name]/frontend/src/components/dashboard/ShareDialog.tsx:42–61` implement overlays with ordinary divs, without dialog roles, modal declarations, accessible title associations, or focus handling. Neither component contains Escape handling or a focus trap; their icon-only close buttons also lack accessible labels.  
    **Impact:** Keyboard focus can remain behind the overlay, and assistive technology lacks dialog identification and named close controls.  
    **Recommendation:** Use an accessible dialog primitive with focus placement/restoration, containment, Escape dismissal, and labelled controls. **Confidence: 0.99.**

## Focused tests reviewed

- `[REDACTED: private project name]/frontend/src/__tests__/DashboardLayout.test.tsx:19–45` checks malformed JSON, non-array JSON, and one valid layout through the helper. The rendering, save/default, and recovery interactions at **50–62** are all `it.todo`.
- `[REDACTED: private project name]/frontend/src/lib/semanticQueryBuilder.test.ts:61–262` covers scalar conversion, operator handling, rejection, and deterministic output. Its relation test at **264–328** covers nesting with **zero root conditions**, so it does not cover finding 3.
- These are observations about supplied test source, **not test execution results**.

## Excluded boundaries and uncertainty

The following direct dependencies were explicitly outside the packet. Paths below are relative to `[REDACTED: private project name]/frontend/src/`, retaining the supplied `.js` spelling:

- **API/cache/auth:** `api/queryKeys.js`, `api/csrf.js`, `api/mediaTokens.js`, `api/uploadConfig.js`, `api/auth.js`.
- **Session/reset/upload/toast:** `hooks/useUppy.js`, `hooks/useLogout.js`, `lib/crossTabReset.js`, `lib/resetRegistry.js`, `store/orgScopedResets.js`, `store/useToastStore.js`, `types/auth.js`.
- **Onboarding APIs:** `api/consultant.js`, `api/inspections.js`, `api/media.js`.
- **Widget navigation/coaching:** `hooks/useDrillThrough.js`, `components/dashboard/UnknownDataCoachingBanner.js`.
- **Widget implementations:** `components/dashboard/widgets/ActionQueueWidget.js`, `AgingBucketsWidget.js`, `DataHealthWidget.js`, `ExceptionFeedWidget.js`, `MapWidget.js`, `NarrativeTextWidget.js`, `StackedAreaWidget.js`, `StackedBarWidget.js`, `TimelineWidget.js`—all under that same widget directory.
- **Legacy parsing:** `lib/nlParser.js`.

Consequently, this review does not establish centralized cache-key hierarchy, reset coverage, backend authorization, server filtering semantics, excluded widget behavior, or downstream parser handling.

Also excluded: all other repository source; backend routes/schemas/models and database enforcement; route mounting/guards and application initialization; builder-page save orchestration; dependency versions and library internals; global styling, rendered accessibility, browser/print behavior; builds, tests, live services, databases, customer data, and deployment state.

### Discarded hypotheses

- No cache invalidation defect is asserted merely because dashboard mutations invalidate `.all`: the actual key hierarchy is excluded.
- No authorization bypass is inferred from visible Share controls: backend enforcement is excluded.
- No backend schema mismatch or tenant-data leak is inferred from handwritten frontend types or comments alone.

**Next useful action:** Prioritize dashboard identity and Boolean/negation fixes, then add narrowly targeted regressions for those concrete cases in a separately authorized implementation task. This packet makes no production-readiness determination.

openai / gpt-6-luna / low / low effort answer

Finding: **Persisted global filters are presented as AND, but their connector is discarded when constructing widget queries.** `useDashboardFilterStore` stores the connector and `setConnector` updates it (`[REDACTED: private project name]/frontend/src/store/useDashboardFilterStore.ts:18-20, 99-104`); the filter bar also displays individual conditions (`[REDACTED: private project name]/frontend/src/components/dashboard/DashboardFilterBar.tsx:41-58`). But `WidgetCard` takes only the effective conditions and combines them with existing query conditions using a hard-coded `AND` (`[REDACTED: private project name]/frontend/src/components/dashboard/WidgetCard.tsx:44-59`). Thus a user-set `OR` filter group is silently evaluated as AND, potentially narrowing results and showing misleading widget data. **Confidence: high.**

No other concrete source-proven issue identified in the supplied snapshot. The dashboard-layout test file explicitly leaves DashboardPage error rendering and default-checkbox interactions as TODOs (`[REDACTED: private project name]/frontend/src/__tests__/DashboardLayout.test.tsx:48-63`); this is a focused coverage gap, not proof of a runtime defect.

**Boundaries and limitations:** Review is limited to the supplied files and their original line references. Dependencies outside the packet—including dashboard API/backend handlers and several imported frontend modules—were not assessed; no claims are made about their behavior. No tests were run. Runtime, database, customer-data, live-service, and production behavior were not verified; this audit does not infer production readiness.

Primary judge's stated reason

A offers materially more actionable, source-supported coverage of the requested dashboard, query-state, and contract audit, while also explaining the shared Boolean-composition issue more accurately. This is a clear preference grounded in correctness and coverage, not a slight forced preference or a finding-count advantage alone. Runtime occurrence and production impact remain unverified.

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

Battle wave: a74ee767-4b32-4c9f-aba3-8297b9f8fec4. Pair: brp1_5de936cfbedc2742eff9bf9d2b40e2ec633e90ade30525e051703b6adce61253. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.