← Model losses

Head-to-head comparison

openai / gpt-6.1-sol / low / low effort preferred over xai / grok-4.7-efficient / 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

MVP source audit; taskCategory=ux; module category=ux, difficulty=high, expectedTests=none. Workspace navigation, role-aware shell and layout state across the shell and its focused navigation 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.1-sol / low / low effort answer

## Conclusion

**Three source-proven issues found.** Independently reviewed all 20 supplied files directly; no tools, tests, edits, or external actions. Findings apply only to snapshot `9dab4e99d3bfadf995dbaa031b9b6a365970e1e3`.

### 1. Legacy workspace hamburger does not control its sidebar below 1280px
**Severity: Medium · Confidence: 0.99**

- `[REDACTED: private project name]/frontend/src/components/layout/TopBar.tsx:23–30` makes the hamburger toggle `sidebarDrawerOpen`, rather than `sidebarCollapsed`, below 1280px.
- The legacy branch in `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:368–689` renders no drawer; its sidebar width depends exclusively on `sidebarCollapsed` at lines 384–390.

**Impact:** With the explicitly supported V3 rollback active, mobile/tablet users can click “Open menu” without changing navigation visibility. The expanded 240px sidebar remains beside the content.

**Recommendation:** Connect the legacy workspace branch to a drawer, or retain a sidebar-collapse handler appropriate to that branch.

### 2. V3 Standard navigation advertises server-excluded modules
**Severity: Medium · Confidence: 0.99**

- `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:333–343` constructs navigation from the entire fixed registry without consulting `workspace.modules`.
- `[REDACTED: private project name]/frontend/src/lib/navRegistry.ts:184–189` includes `municipal.explorer` and `municipal.reports-amp`.
- `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:200–214` rejects an absent server-backed module and redirects to `default_landing`.
- Neither of those two keys is client-only: `[REDACTED: private project name]/frontend/src/lib/workspaceModules.ts:215–230`.

**Impact:** A workspace that omits either module still displays its navigation destination. Clicking it silently sends users elsewhere, rather than opening the advertised destination. Fixed municipal navigation also fails to reflect the active workspace’s actual module configuration.

**Recommendation:** Derive Standard items from available server modules plus explicitly allowed client-only destinations.

### 3. Focused navigation tests do not enforce the current implementation contract
**Severity: Medium · Confidence: 0.99**

Two concrete discrepancies:

- `[REDACTED: private project name]/frontend/src/__tests__/WorkspaceShell.multinav.test.tsx:189–211` tests an inline replacement handler that invalidates immediately and uses `['userWorkspace']`. Actual code waits for PATCH success and uses the centralized key: `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:245–276`; `[REDACTED: private project name]/frontend/src/api/queryKeys.ts:662–664`. The test neither imports nor invokes that implementation.
- `[REDACTED: private project name]/frontend/tests/app-layout/v3-shell-smoke.spec.ts:209–243` requires `/inspections` and `/repairs` to remain unredirected. Those keys are intentionally excluded from the routing allowlist in `[REDACTED: private project name]/frontend/src/lib/workspaceModules.ts:225–229`, so the shell redirects them through lines 200–214.

**Impact:** The unit test cannot catch regressions in real switch sequencing, while two active smoke cases assert obsolete routing behavior.

**Recommendation:** Test shared production logic or the mounted shell; update smoke expectations to the current dormant-route contract.

## Calibration

- No backend authorization bypass is established. Client-only uploads are explicitly intentional; their underlying authorization is outside this packet.
- Role/backend parity is not verified: `PlatformWorkspacesPage.test.tsx:27–35` compares against a hardcoded frontend expectation, not supplied backend source.
- Pro smoke coverage is explicitly skipped at `v3-shell-smoke.spec.ts:138`. Its nonblank assertion at line 178 also accepts empty content; neither is evidence of runtime correctness.
- No production-readiness conclusion follows.

## Excluded boundaries

All source outside the exact 20-file packet is excluded, including these declared dependencies:

- **API:** `src/api/client.js`, `superAdmin.js`, `auth.js`, `dashboard.js`.
- **Auth/config:** `src/auth/AuthContext.js`, `src/config/features.js`.
- **Hooks:** `src/hooks/useMediaQuery.js`, `usePermissions.js`, `useCommandCenter.js`.
- **Libraries:** `src/lib/roleLabels.js`, `clientToServerMigration.js`, `useUserPreferencesQueue.js`.
- **Stores:** `src/store/useAIStore.js`, `useExplorerStore.js`, `useLayerStore.js`, `useMapRailUIStore.js`, `useMonitorUIStore.js`, `useProfileBankFilterStore.js`, `useViewUIStore.js`, `useWorkspaceProModeStore.js`; `src/stores/useV3SessionStore.js`.
- **Components:** `src/components/alerts/AlertDropdown.js`; `layout/OrgSwitcher.js`, `SurfaceSwitcher.js`, `OffboardingBanner.js`, `SidebarDrawer.js`, `TrustStrip.js`, `V3Sidebar.js`, `V3TopBar.js`; `assistant/AssistantBubble.js`, `assistantBubbleVisibility.js`; `chat/ChatPanel.js`; `common/ErrorBoundary.js`, `Toast.js`; `consultant/CommandCenter.js`; `media/ProcessingIndicator.js`; `v3-review/V3ProDevToggle.js`; `review-tabs/playbackSpeeds.js`.
- **Module bodies:** `src/components/workspace/modules/MunicipalExplorerModule.js`, `MunicipalReportsModule.js`, `MunicipalUploadsModule.js`, `V3InspectionsModule.js`, `V3RepairsModule.js`, `V3TodayModule.js`; `src/pages/v3/V3InspectionReview.js`.

Paths above are relative to `[REDACTED: private project name]/frontend/`. Backend resolver/schema/RBAC behavior, router integration, CSS, test configuration, runtime rendering, live services, databases, customer data, and deployment/production behavior remain unverified.

**Next useful action:** Correct the three source contracts, then separately authorize narrowly scoped verification.

MATERIAL_EVIDENCE_CONFLICT: `[REDACTED: private project name]/frontend/tests/app-layout/v3-shell-smoke.spec.ts:241–243` requires inspections/repairs deep links not to redirect, while `[REDACTED: private project name]/frontend/src/lib/workspaceModules.ts:225–229` explicitly disables those routes and `[REDACTED: private project name]/frontend/src/components/workspace/WorkspaceShell.tsx:200–214` redirects them.

xai / grok-4.7-efficient / medium / medium effort answer

Source review only. The default shell’s navigation is not workspace- or role-aware, and the focused tests pin copies of behavior the shell no longer implements. This does not establish runtime or production readiness.

## Findings

1. **Default V3 nav is a fixed municipal list; server module and role gates are ignored.** Confidence: 0.93.  
   `useV3Shell()` is on unless `?v3shell=0` or `pp.v3_shell=0` (`useV3Shell.ts:57-61`). On that path `WorkspaceShell` always passes `V3_STANDARD_NAV` (`today`, `municipal.explorer`, `municipal.reports-amp`, `municipal.uploads`) and never passes `sidebarModules` (`WorkspaceShell.tsx:294-300`, `332-353`; `navRegistry.ts:180-190`). `WorkspaceShell` does not read the user role (auth hook removed at `WorkspaceShell.tsx:28`).  
   Impact: after a switch to a non-municipal workspace (the multinav tests use `consultant` / `consultant.client-list`), the task nav stays municipal. Server-omitted keys silently bounce to `default_landing` with no toast (`WorkspaceShell.tsx:200-214`). `today` and `municipal.uploads` are client-only, so they render inside any workspace, including one whose `workspace.modules` omitted them (`workspaceModules.ts:117-127`, `215-230`, `239-240`). Uploads is a write surface with no role filter in this packet. Legacy `?v3shell=0` still injects icon-bearing client-only modules into every workspace (`WorkspaceShell.tsx:294-300`; `getClientSidebarModules` at `workspaceModules.ts:253-261`).

2. **A URL for an accessible but non-active workspace is rewritten with no explanation.** Confidence: 0.9.  
   Any `workspace.key !== workspaceKey` becomes `<Navigate replace>` to the server-active key (`WorkspaceShell.tsx:213-214`). The info toast runs only when the URL key is absent from `accessible_workspaces` (`WorkspaceShell.tsx:177-189`). The multinav mirror documents the same split (`WorkspaceShell.multinav.test.tsx:140-147`).  
   Impact: bookmarks and shared `/w/{other-accessible-workspace}/…` links snap back to the persisted workspace. Multi-workspace URLs are not selectable entry points.

3. **Gated or dormant module clicks fail silently.** Confidence: 0.92.  
   Same redirect (`WorkspaceShell.tsx:200-214`) covers `municipal.reports-amp` / `municipal.explorer` when missing from `workspace.modules`, and `/w/:ws/inspections` and `/repairs` after those keys were removed from `CLIENT_ONLY_MODULE_KEYS` (`workspaceModules.ts:225-229`) while remaining in `MODULE_REGISTRY` (`workspaceModules.ts:139-148`) and in the smoke route list (`v3-shell-smoke.spec.ts:209-214`, `242-243`). No module-level toast exists.  
   Impact: nav clicks and those two URLs look like no-ops or unexplained jumps to `default_landing`.

4. **Focused nav tests do not lock the shell.** Confidence: 0.95.  
   Both vitest files state they do not mount React (`PlatformWorkspacesPage.test.tsx:5-8`; `WorkspaceShell.multinav.test.tsx:5-10`) and assert in-file copies. The switch copy expects `setQueryData` → `patch` → `invalidate` → `navigate` and uses `['userWorkspace']` (`WorkspaceShell.multinav.test.tsx:163-211`). Production calls `mutate`, navigates immediately, and invalidates only in `onSuccess` under `queryKeys.userWorkspace.all` = `['user-workspace']` (`WorkspaceShell.tsx:245-276`; `queryKeys.ts:662-663`). `onError` cache restore (`WorkspaceShell.tsx:259-270`) is untested. Role tests reimplement `toggle` / `orderedSelection` locally (`PlatformWorkspacesPage.test.tsx:53-100`) and do not import a page. The smoke spec’s “Standard routes below DO run green” comment (`v3-shell-smoke.spec.ts:137-137`) disagrees with finding 3; its Pro `<main>` length check is `>= 0` inside a skipped suite (`v3-shell-smoke.spec.ts:138`, `178`).  
   Impact: CI can stay green while switch order, query key, rollback, role payload, and inspections/repairs routing drift.

5. **Layout chrome does not match loading or lazy module states.** Confidence: 0.88.  
   `isLoading` returns `WorkspaceShellSkeleton` before the V3 branch (`WorkspaceShell.tsx:192` vs `332`), so the default shell is replaced by a fake 48px header plus 192px sidebar (`WorkspaceShell.tsx:39-59`). The same skeleton is the Suspense fallback inside the real main (`WorkspaceShell.tsx:356-361`, `678-685`). `key={resolvedModuleKey}` remounts the lazy module on every switch (`WorkspaceShell.tsx:358`, `681`).  
   Impact: full-page skeleton, then V3 chrome, then a nested fake header/sidebar inside `<main>` on chunk load.

6. **Role-removed empty state is not on the default shell.** Confidence: 0.84.  
   “No workspaces assigned” renders only in the legacy return (`WorkspaceShell.tsx:425-445`). The V3 return (`WorkspaceShell.tsx:345-364`) happens first and only passes `sidebarWorkspaces`, which still prepends a synthetic active row (`WorkspaceShell.tsx:306-319`). Whether `V3Sidebar` repeats that notice is outside this packet.  
   Impact: on the default shell, a mid-session role strip can leave modules visible via the synthetic row with no administrator notice.

7. **View-as banner can ignore an explicit server “not view-as”.** Confidence: 0.74.  
   `isServerViewAs` is true only when both ids are non-null and differ (`ContextBanner.tsx:44-45`). Otherwise `activeOrgName` falls through to `getActiveOrgName()` (`ContextBanner.tsx:46-47`), and `isViewAs = !!activeOrgName` (`ContextBanner.tsx:53`). A server home-org result does not clear a leftover legacy name. `getActiveOrgName()` itself is outside the packet, so whether that helper is null at home is unverified.  
   Impact: possible false “ACTING AS … any changes affect this client” ribbon (`ContextBanner.tsx:177-178`) on a compliance banner.

8. **Stacked context ribbon can clip its unwind controls.** Confidence: 0.8.  
   Impersonation plus view-as uses `flex-wrap` inside `height: 32` (`ContextBanner.tsx:86-92`) with two buttons (`ContextBanner.tsx:105-127`). View-as-only is `height: 40` and does not wrap (`ContextBanner.tsx:167-173`).  
   Impact: on a narrow viewport the End Impersonation / Return Home controls can clip or overflow. Neither impersonation ribbon has `aria-live`; only the view-as ribbon does (`ContextBanner.tsx:174`).

## Discarded or not treated as defects

- Immediate `invalidateQueries` before PATCH is not the current handler bug. Production intentionally invalidates inside `onSuccess` (`WorkspaceShell.tsx:245-257`). The defect is the stale test contract (finding 4).
- Optimistic `setQueryData` leaves `can_use_pro_surface` / `effective_capabilities` from the previous payload (`WorkspaceShell.tsx:234-243`). Comments describe Pro access as org-level (`workspace.ts:42-54`). No in-packet shell control reads those fields during the switch window.
- Shared `sidebarCollapsed` across Pro and workspace is documented (`WorkspaceShell.tsx:380-383`), not an accidental mismatch.
- `aria-current="page"` on both the active workspace and the active module (`WorkspaceShell.tsx:464`, `521`, `557`, `613`) is a legacy-only a11y defect; the default path does not render that `<nav>`.
- Tooltip `aria-describedby` is set while the tooltip node exists only when visible (`Tooltip.tsx:103-107`, `129`). Real, but secondary to navigation.

## Excluded boundaries

Not in this packet, so not reviewed and not assumed: `client.js` (`getActiveOrgName`, `switchActiveOrg`), `AuthContext`, `superAdmin`, `features`, `usePermissions`, `useMediaQuery`, `roleLabels`, `useAIStore`, `V3Sidebar`, `V3TopBar`, `SidebarDrawer`, `TrustStrip`, `OffboardingBanner`, `SurfaceSwitcher`, `OrgSwitcher`, dashboard/command-center/assistant modules, preference stores and `clientToServerMigration`, all `workspaceModules` lazy targets, backend `Role` enum and `workspace_resolver.py`, and `PlatformWorkspacesPage` (tests name it; source is absent). No tests were run. No production or runtime behavior was verified. Commit binding `9dab4e99d3bfadf995dbaa031b9b6a365970e1e3` is the packet identity only.

## Next useful action

Filter `standardItems` through `workspace.modules` plus an explicit client-only allowlist before passing them to `V3AppShell`, and toast when a URL module is dropped to `default_landing`. Point the multinav and smoke specs at those real branches instead of local mirrors.

MATERIAL_EVIDENCE_CONFLICT: v3-shell-smoke.spec.ts:242-243 expects `/inspections` and `/repairs` to stay on those URLs, but workspaceModules.ts:225-229 removed them from `CLIENT_ONLY_MODULE_KEYS` and WorkspaceShell.tsx:200-214 redirects unknown module keys to `default_landing`; WorkspaceShell.multinav.test.tsx:163-211 requires synchronous invalidate before navigate on key `['userWorkspace']`, but WorkspaceShell.tsx:251-276 invalidates only in patch `onSuccess` and navigates immediately via `queryKeys.userWorkspace.all` (`['user-workspace']`, queryKeys.ts:662-663).

Primary judge's stated reason

B is preferable for this source-only audit because it exposes a directly traceable navigation-control mismatch and more consistently keeps findings within supplied evidence. This is a clear evidentiary advantage, not merely a forced slight preference, although A contains useful additional observations and neither answer establishes runtime behavior.

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

Battle wave: 87604684-5410-4204-96bf-6143dab2c1dc. Pair: brp1_fdbdea1eff20c846b1eee2df1cd5345e2f82a33603540aaaca66b0257e3f098e. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.