Context. surface studio · domain hathor · route /studio/hathor/simulation-state-persistence · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/hathor/simulation-state-persistence/page.tsx
Last walked. 2026-05-29 automated runtime walk (Playwright headless) — render, /v1 data (2xx), console/page-errors, expected content, screenshot verified; live screen-reader, touch, offline, and telemetry-delivery checks pending a manual AT pass. Evidence: WALKTHROUGH/results/runtime-sweep-2026-05-29.md; body re-derived 2026-06-03 from current source (lane-console architecture)
Purpose#
Admin lane console for the Hathor simulation persistence primitives. Enter a
simulation state payload and read back its canonical cache keys
(state:<id>, world:<id>:*, domain:<name>:* from @hathor/simulation), the
serialized form, whether the @hathor/domain-models serialize→deserialize
round-trip is stable, and which date fields hydrate back into Date instances.
Admin-scoped and fail-closed.
Entry points#
- Direct URL / bookmark —
/studio/hathor/simulation-state-persistence;alternates.canonicalis set. - Breadcrumb / quick-action — Studio › Hathor › Simulation › Simulation State Persistence (sibling lane); this page links back to the Simulation aggregator and to Simulation Physics.
- Studio overview — see
../../studio-overview.md.
Layout regions#
page.tsx renders inside <ShellLayout active="studio">:
- Breadcrumb panel
(
<section data-hathor-simulation-state-persistence-breadcrumbs>): Studio → Hathor → Simulation → Simulation State Persistence (sibling lane). - Workspace (
StudioHathorSimulationStatePersistenceWorkspace,data-hathor-simulation-state-persistence-workspace):<h1>WorkspaceHeading— "Hathor Simulation State Persistence Workspace"- Summary
<p data-hathor-simulation-state-persistence-summary> - Catalog state, then the persistence form + result.
- IA-contract panel
(
<section data-hathor-simulation-state-persistence-route-map>,<h2>Hathor Simulation cluster — IA contract</h2>): rendersSTUDIO_HATHOR_SIMULATION_STATE_PERSISTENCE_ROUTE_MAP(7 entries) grouped byrole— oneparent-aggregator, oneself, and fivepeer-laneentries. - Quick-action lane (
className="quickAction"Links): Back to Hathor Simulation aggregator, Simulation Physics, Back to Studio workspace index.
States#
- Loading —
<p data-hathor-sp-loading>"Loading persistence engine…". - Unauthorized —
data-hathor-sp-unauthorizedon 401/403 (admin-scope). - Error —
data-hathor-sp-erroron a non-OK catalog response or network failure. - Ready (form) —
data-hathor-sp-formwith state id / world id / domain inputs, the payload textarea, and the date-fields input. - Result —
data-hathor-sp-resultwithdata-hathor-sp-key-state/-key-world/-key-domain,data-hathor-sp-roundtrip, anddata-hathor-sp-hydrated. - Validation error —
data-hathor-sp-persist-errorfor missing ids, malformed JSON, or a failed POST.
Interactions#
-
data-hathor-sp-state-id/-world-id/-domain(inputs) — the cache key components. -
data-hathor-sp-payload(textarea,aria-label="payload json") — the state payload. -
data-hathor-sp-date-fields(input,aria-label="date fields") — comma-separated date field names. -
data-hathor-sp-submit("Inspect persistence") — validates ids and JSON then POSTs{ stateId, worldId, domain, payload, dateFields }; on 200 with a validresultrenders the cache keys + round-trip read-out. - IA-contract entries — verify against
STUDIO_HATHOR_SIMULATION_STATE_PERSISTENCE_ROUTE_MAP(parent + self + 5 peers). - Quick-action links — Hathor Simulation
(
/studio/hathor/simulation), Simulation Physics (/studio/hathor/simulation-physics), Back to Studio (/studio).
Data & contracts#
- Reads:
GET /v1/admin/hathor/simulation-state-persistence(catalog:keySchemes,defaultDateFields). - Writes:
POST /v1/admin/hathor/simulation-state-persistence/persistwith the state descriptor + payload. - Realtime: none.
- Caching: client fetch on mount,
cache: 'no-store',buildBffAuthHeaders(),AbortControlleron unmount. - Auth: admin-scoped, fail-closed (401/403 → unauthorized); route is behind the signed-in + studio proxy gate.
Cross-references#
- Parent:
../../studio-overview.md - Component sources:
apps/oshun/web/src/components/studio/StudioHathorSimulationStatePersistenceWorkspace.tsxapps/oshun/web/src/components/studio/StudioHathorSimulationStatePersistenceRouteMap.ts(role-tagged IA contract)
- Aggregators that embed this lane:
./studio-hathor-database.md - Siblings:
./studio-hathor-simulation.md(parent aggregator),./studio-hathor-simulation-physics.md,./studio-hathor-simulation-worker.md
Open questions / known gaps#
- Hathor is
unconfirmed-v1perWALKTHROUGH/matrix/routes.csv; confirm whether the dedicated/studio/hathor/*admin lanes ship V1 or are internal-only.