First R3 (Theater) piece. Reworks the stale artifact-keyed ReplayRoute into the turn-keyed hero over the #716 sealed-replay backend, and fully retires the dead W-026 artifact-keyed machinery on both sides (the NOT_YET_MIRRORED comment anticipated this). The hero makes determinism *felt*: pick a journaled turn, CORE re-executes its prompt in a sealed fresh runtime, and the result renders as a hash verdict (≡ equivalent / ≠ diverged) + the original/replay DigestBadges + a leaf diff (critical weighted above informational, each with a ≠ glyph). The 'What this proves' card surfaces comparison_basis + origin_state and states the honest limit: a divergence means nondeterminism OR origin-state influence, never rendered on its own as a determinism failure. Retirement (verified zero serving uses): - Python schemas.py: removed ReplayComparison/ReplayDivergence/ReplayStatus/ ReplayDivergenceSeverity; scripts/dump-enums.py drops the two replay enums; both snapshots regenerated (deterministic: dump == committed) - TS: removed ReplayComparison/ReplayDivergence/ReplayDivergenceSeverity; added TurnReplayComparison/TurnReplayDivergence (+ basis/origin/severity unions); NOT_YET_MIRRORED now empty (every engine schema mirrored) - badges: removed ReplayStatusBadge + ReplayDivergenceSeverityBadge + meta/enums + their enumCoverage cases (hero renders severity inline) - api: fetchReplayComparison/useReplayComparison -> fetchTurnReplay/ useTurnReplay (/replay/<turnId>) - deleted ArtifactList, ReplayComparisonPanel, ReplayDiffViewer, ReplayMetadataTable, old replay.test.tsx - App route /replay/:artifactId? -> /replay/:turnId?; conformance row turn-keyed (loading 'Loading turns...', empty 'No turns recorded yet.') Tests: ReplayRoute.test.tsx (equivalence hero + honesty card, diverged critical leaf, informational-only label, replace-mode select, j/k spine). Full vitest 358 green; workbench Python 34 green; both snapshots deterministic. Follow-up flagged (not in this PR to keep it focused): the artifact query hooks (useArtifacts/useArtifactDetail/fetchArtifacts*) are now orphaned but entangled with the still-live artifact EvidenceSubject kind — a separate cleanup once an Artifacts route or that subject's fate is decided. Brief: docs/handoff/wave-R3-briefs-2026-06-13.md (all four R3 pieces). |
||
|---|---|---|
| .. | ||
| e2e | ||
| preview | ||
| public/fonts | ||
| scripts | ||
| src | ||
| .gitignore | ||
| api-schema-snapshot.json | ||
| enum-snapshot.json | ||
| index.html | ||
| package.json | ||
| playwright.config.ts | ||
| pnpm-lock.yaml | ||
| postcss.config.js | ||
| README.md | ||
| schema-snapshot.json | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
CORE Workbench UI
React/Vite/TypeScript frontend for CORE Workbench — a local operator UI for inspecting engine state, proposals, evals, and audit trails.
Local development
# Terminal 1 — start the API (W-026)
uv run core workbench api
# Terminal 2 — start the frontend
cd workbench-ui
pnpm install
pnpm dev # http://127.0.0.1:5173
Custom API URL
VITE_WORKBENCH_API_URL=http://127.0.0.1:9000 pnpm dev
Design system baseline
pnpm preview # Serves dist/ on http://127.0.0.1:4173
# Navigate to /preview for the Branch 1 design-system baseline
Tests
pnpm test # Vitest unit + component tests
pnpm test:enum-coverage # Badge enum coverage (requires uv)
Schema drift detection
The TypeScript types in src/types/api.ts mirror workbench/schemas.py.
To check for drift after Python schema changes:
# From repo root
uv run python scripts/dump-api-schemas.py
# Then run: pnpm test (api.test.ts catches field-level drift)
Architecture
src/app/— Shell, TopBar, LeftNav, StatusFooter, ApiErrorBoundarysrc/api/— apiFetch client, TanStack Query hookssrc/types/— TypeScript mirrors of Python schemassrc/routes/— Route placeholder componentssrc/design/— Branch 1 design-system substrate (DO NOT MODIFY except EmptyState and CommandPalette)
ADR cross-references
- ADR-0160 — Workbench v1 architecture
- ADR-0162 — Design substrate (Branch 1)
- ADR-0156, ADR-0157, ADR-0158 — Engine-state checkpoint and reboot audit trail