---
path: /studio/hathor/lore-validation-contradictions
surface: studio
domain: hathor
auth: signed-in + studio entitlement
source: apps/oshun/web/src/app/studio/hathor/lore-validation-contradictions/page.tsx
status: walked
last_walked:
  '2026-06-29 real-BFF route addendum — Playwright now covers the signed-in
  admin route, real catalog GET, seeded temporal-contradiction POST, edited
  clean-event POST, client-only validation errors, live BFF 400 detail,
  loading/error, pending submit disablement, non-admin fail-closed state,
  anonymous redirect, route map, quick actions, 44px automated touch checks, and
  the shared axe gate. Evidence:
  WALKTHROUGH/results/v1-real-infra-run-2026-06-22.md §227;
  apps/oshun/web/e2e/studio-hathor-lore-validation-contradictions.spec.ts.
  2026-05-29 automated runtime walk evidence:
  WALKTHROUGH/results/runtime-sweep-2026-05-29.md; body re-derived 2026-06-03
  from current source (lane-console architecture)'
---

# Studio Hathor · Lore Validation Contradictions

## Purpose

Admin lane console for the real `@hathor/validation` contradiction detector.
Supply a list of historical events and detect temporal lore contradictions — a
shared participant with conflicting death/alive outcomes at the same time and
place. Admin-scoped and fail-closed.

## Entry points

- **Direct URL / bookmark** — yes; `alternates.canonical` set
- **Validation dashboard / Studio overview links** — the unified validation
  dashboard and Studio overview navigation link directly to this lane.
- **Studio overview** — see
  [`../../studio-overview.md`](../../studio-overview.md)

## Layout regions

`page.tsx` renders inside `<ShellLayout active="studio">`:

- **Workspace**
  `<section data-hathor-lore-validation-contradictions-workspace>`:
  - `<h1>` (WorkspaceHeading) "Hathor Lore Validation Contradictions Workspace"
  - Summary `<p data-hathor-lore-validation-contradictions-summary>`
  - The contradiction catalog (`data-hathor-lvc-catalog`), detect form lane,
    pending submit state, validation errors, and result
- **Route Map panel** (`data-hathor-lore-validation-contradictions-route-map`):
  `<h2>` "Route Map" + 5 entries from
  `STUDIO_HATHOR_LORE_VALIDATION_CONTRADICTIONS_ROUTE_MAP`
- **Quick-action lane** (`data-hathor-lvc-quick-actions`,
  `data-hathor-lvc-quick-action-count="2"`): Lore Validation Taxonomy
  (`data-hathor-lvc-quick-action="lore-validation-taxonomy"`) and Back to Studio
  workspace index (`data-hathor-lvc-quick-action="studio-index"`)

## States

- [x] **Loading** — `<p data-hathor-lvc-loading>`
- [x] **Unauthorized** — `data-hathor-lvc-unauthorized` on 401/403 (admin Hathor
      scope required); fail-closed
- [x] **Error** — `data-hathor-lvc-error` on non-OK GET / malformed catalog
- [x] **Ready (form)** — `data-hathor-lvc-detect-form` with
      `data-hathor-lvc-form-state="idle"` once the catalog loads
- [x] **Pending submit** — `data-hathor-lvc-form-state="detecting"` and
      `data-hathor-lvc-submit-state="detecting"`; submit is disabled with
      `aria-disabled="true"` and `aria-busy="true"` until the BFF response
      returns
- [x] **Result** — `data-hathor-lvc-result` after a 200 detect, with
      `data-hathor-lvc-verdict`, a `data-hathor-lvc-list` of
      `data-hathor-lvc-item` contradictions, or `data-hathor-lvc-clean` when
      none; `data-hathor-lvc-detect-error` for invalid JSON / non-200

## Interactions

### Workspace body (detect form lane)

- [x] **Historical events (JSON)** — `<textarea data-hathor-lvc-field-events>`
      (aria-label "historical events json")
- [x] **Detect contradictions** —
      `<button data-hathor-lvc-detect-submit type="submit">` → POST
      `/v1/admin/hathor/lore-validation-contradictions/detect`
- [x] **Result** — `data-hathor-lvc-verdict` summary plus the contradiction list
      (`data-hathor-lvc-list` → `data-hathor-lvc-item`) or
      `data-hathor-lvc-clean`

### Route Map panel

- [x] **5 route entries** — verify match with
      `STUDIO_HATHOR_LORE_VALIDATION_CONTRADICTIONS_ROUTE_MAP`

### Quick-action lane

- [x] **"Open Hathor Lore Validation Taxonomy workspace"** (→
      `/studio/hathor/lore-validation-taxonomy`)
- [x] **"Back to Studio workspace index"** (→ `/studio`)

## Data & contracts

- **Reads**: GET `/v1/admin/hathor/lore-validation-contradictions` on mount
  (catalog: `categories`, `activeCheck`), rendered as `data-hathor-lvc-catalog`.
- **Writes**: POST `/v1/admin/hathor/lore-validation-contradictions/detect`. The
  happy path returns `{ ok: true, result }`; malformed event payloads return BFF
  400 `reason` strings such as `invalid_event`, which the lane surfaces in
  `data-hathor-lvc-detect-error`.
- **Realtime**: none
- **Caching**: client `fetch` on mount, `cache: 'no-store'`;
  `buildBffAuthHeaders`
- **Auth/role check**: admin-scoped fail-closed (401/403); behind the signed-in
  - studio proxy gate

## Cross-references

- Parent: [`../../studio-overview.md`](../../studio-overview.md)
- Shell:
  [`../../../shell/04-auth-session.md`](../../../shell/04-auth-session.md)
- Sibling routes:
  [`./studio-hathor-lore-validation-taxonomy.md`](./studio-hathor-lore-validation-taxonomy.md),
  [`./studio-hathor-validation.md`](./studio-hathor-validation.md)
- Component sources:
  - `apps/oshun/web/src/components/studio/StudioHathorLoreValidationContradictionsWorkspace.tsx`
  - `apps/oshun/web/src/components/studio/StudioHathorLoreValidationContradictionsRouteMap.ts`

## E2E coverage

- [`apps/oshun/web/e2e/studio-hathor-lore-validation-contradictions.spec.ts`](../../../../apps/oshun/web/e2e/studio-hathor-lore-validation-contradictions.spec.ts)
  — signed-in admin route; real Hathor contradiction BFF catalog and detect
  calls; seeded `CONTRADICTION_TEMPORAL`; edited clean-event payload; malformed
  JSON and empty-array zero-POST branches; live BFF `invalid_event` 400 detail;
  catalog loading/error; pending submit lockout; non-admin fail-closed state;
  anonymous redirect; route-map and quick-action anchors; automated 44px checks
  for the main editable controls and quick actions; shared axe gate.
- Supporting route contract coverage:
  `apps/oshun/bff/src/__tests__/admin-hathor-lore-validation-contradictions-route.test.ts`
  covers auth/scope, category catalog, temporal contradiction detection, clean
  consistent outcomes, single-event clean results, and BFF 400 payload
  validation.

## Open questions / known gaps

- [x] Hathor is confirmed in V1 per `WALKTHROUGH/matrix/routes.csv` and
      `WALKTHROUGH/matrix/coverage.md` (product-owner confirmation recorded
      2026-05-29 for Bellona / Hathor / Neith).
- [ ] The detector currently keys on death/alive participant conflicts at a
      shared time+place; confirm whether broader contradiction classes
      (location, attribute, relationship) are planned.
- [ ] Route Map advertises `events/`, `conflicts/`, `threads/`, and
      `governance/` sub-routes with no `page.tsx` yet.
- [ ] Manual screen-reader pass remains for the live browser surface; automated
      axe and touch-target coverage now pass for the route-level controls.
