Commit graph

1524 commits

Author SHA1 Message Date
Shay
d48d040467 feat(workbench): Audit route — event timeline with mutation-boundary weighting (Wave R2-A) 2026-06-12 16:53:03 -07:00
Shay
bd52d6b38a
Merge pull request #714 from AssetOverflow/feat/wb-r2-trace-route
feat(workbench): Trace route — turn evidence timeline over the journal (Wave R2-T)
2026-06-12 16:41:39 -07:00
Shay
a116597619 docs(analysis): scope the Replay Moment backend (Wave R3 GET /replay/{turn_id})
Decides sealed genesis-prefix replay semantics against the actual
constraints (single rolling post-turn checkpoint; journal appended only
by the workbench handler, so history completeness is unprovable today).
Response carries comparison_basis + history_complete so the UI never
oversells; typed refusals; five MEANINGFULLY-FAILS proof obligations.
2026-06-12 16:37:59 -07:00
Shay
5182b495d5 docs(handoff): commit Wave 1 + Wave R2 brief packs incl. part 2 (R2-S/Runs/Packs/Vault/Settings)
Production-line record: the already-executed Wave 1 and R2-B/R2-T/R2-A
briefs, plus the new part-2 pack — R2-S (EvidenceSubject extension +
Proposals wrinkles, gating), then Runs, Packs, Vault (fail-closed),
Settings. Strictly sequential merges; operators stop after checks green.
2026-06-12 16:34:53 -07:00
Shay
21718cffb2 docs(planning): record #700 deductive entailment demo as merged
Reconciles a stale local edit with the upstream roadmap: the deductive
entailment authority demo (PR #700) moves under Demonstrated with its
evidence caveat, and the merged-boundary count is corrected to five
(#687, #688, #690, #696, #700). Next proposed target: Embodied Authority
Simulation Demo.
2026-06-12 16:34:53 -07:00
Shay
aa6fb8ba90 feat(workbench): add trace route journal timeline 2026-06-12 16:30:34 -07:00
Shay
41755c001f
Merge pull request #713 from AssetOverflow/feat/wb-r1-design-mastery
feat(workbench): design mastery pass — chain rail, typography, doctrine-as-tests (Wave R R1)
2026-06-12 13:37:50 -07:00
Shay
8ce60cc196 fix(workbench): guard missing global navigator for node-env test files (Node 20) 2026-06-12 13:26:30 -07:00
Shay
9344f11415 feat(workbench): design mastery pass — chain rail, typography, doctrine-as-tests (Wave R R1)
- EvidenceChainRail: the spine's seven stages rendered per subject with
  the honesty contract — lit/hollow/dim derive ONLY from carried fields
  (a trace hash lights 'replay' as RECORDED, never as verified); pure
  deriveStages() with meaningfully-fail tests (remove one field -> exactly
  its stage hollows).
- Hash display standard: DigestBadge default 12-char + copy everywhere;
  CopyableHash consolidated away (2 call sites swapped, file deleted).
- Typography: tabular-nums on MetadataTable values + eval metrics;
  text-wrap balance on Panel titles + EmptyState statements.
- Selection unification: new --color-selected-bg/-border tokens; selected
  (persistent) vs focused (transient) now visually distinct across
  Proposals/Replay/Evals lists; focus-ring no longer doubles as selection.
- EmptyState gains a deterministic monochrome inline-SVG glyph.
- Panel adopted in Evals lane list + Proposals queue.
- Doctrine-as-tests: hexScan (no palette literals outside tokens.css/
  generated tokens.ts) + schemaDrift gate (scripts/dump-schemas.py AST
  walk -> schema-snapshot.json -> every dataclass field mirrored in
  types/api.ts; explicit shrink-only NOT_YET_MIRRORED debt list).
  The drift gate caught real drift on first run: ChatTurnResult.turn_id
  existed in Python, missing from TS — now mirrored.

Verified: build green; vitest 36 files / 279 tests EXIT=0; playwright
12/12; dump-schemas.py runs clean.
2026-06-12 13:18:44 -07:00
Shay
026aadc1e9
Merge pull request #712 from AssetOverflow/feat/wb-r2-backend-reads
feat(workbench): R2 backend read substrate — packs, audit, runs (+vault investigate)
2026-06-12 13:01:20 -07:00
Shay
0885e7594f
Merge pull request #711 from AssetOverflow/feat/wb-r0d-interaction-substrate
feat(workbench): interaction substrate — list nav, virtualization, panel chrome, inspector resize, palette verbs (Wave R R0d)
2026-06-12 12:56:43 -07:00
Shay
f177efc837 feat(workbench): add R2 backend read substrate 2026-06-12 12:49:41 -07:00
Shay
c54a942871 feat(workbench): interaction substrate — list nav, virtualization, panel chrome, inspector resize, palette verbs (Wave R R0d)
- useListNavigation: shared j/k/arrows/Home/End/Enter keyboard spine,
  container or window scope, input guard, roving tabindex. Replaces
  ProposalsRoute's bespoke window listener (one pattern app-wide).
- VirtualizedList over @tanstack/react-virtual composing the hook;
  evidence lists render O(viewport).
- Panel: standard header/toolbar/body chrome for routes.
- Inspector resize: Shell center cell becomes SplitPane(main, inspector)
  when open; width persists via guarded storage (SplitPane id).
- Palette action verbs: Command gains kind (navigate|action); Shell
  registers Toggle inspector + Copy evidence link; EvalsRoute registers
  'Run eval lane <lane>' per read-only lane (same POST /evals/run).
- shortcutRegistry: binding sites register what they handle while
  mounted; KeyboardHelp renders FROM the registry — advertising an
  unbound shortcut is structurally impossible. j/k, /, Enter rows
  (removed in R0a as false) return as live registry entries.
- Kbd primitive (front-loaded from R1); SearchInput registers '/';
  SearchInput wired into Proposals + Replay lists with client filters.
- Preview entries for Kbd/Panel/VirtualizedList.

Verified: build green; vitest 33 files / 245 tests EXIT=0 (~5.5s);
playwright 12/12.
2026-06-12 12:48:02 -07:00
Shay
1c2f786445
Merge pull request #710 from AssetOverflow/feat/wb-r0c-evidence-addresses
feat(workbench): evidence addresses — deep-linkable subjects + inspector URL state
2026-06-12 12:27:53 -07:00
Shay
922e700048 test(workbench): mount conformance routes with param paths + EvidenceProvider
Routes now publish selection as the evidence subject and read selection
from path params (R0c), so the ADR-0162 conformance harness mounts them
the way App.tsx declares them.
2026-06-12 12:17:57 -07:00
Shay
41f4435dc1 feat(workbench): evidence addresses — deep-linkable subjects + inspector URL state
URL = subject: one codec (evidenceAddress.ts) owns the address grammar for
every EvidenceSubject kind, including kinds whose routes are placeholders.
urlToSubject is a total inverse — malformed input yields null, never throws.

- Route params: /trace/:turnId?, /proposals/:proposalId?, /evals/:laneId?,
  /replay/:artifactId? (placeholders keep flat paths)
- ?inspect= carries inspector subject + open state; EvidenceUrlSync restores
  deep links and write-through syncs with replace (selection churn never
  pollutes history); malformed values are dropped from the URL
- Proposals/Evals/Replay restore selection from their param on load, write it
  on selection change (replace), and publish the selected subject to the
  evidence context (identity at once, detail when the query resolves)
- EvidenceSubject.data now optional; inspectors render an honest
  'detail not loaded' state for identity-only subjects
- Cmd+Shift+C copies origin + subjectToUrl(subject); no-op without subject;
  input-focus guard; transient inline 'Copied' on the inspector header
- Fix pre-existing unbounded re-render loop in RightInspector.test.tsx
  (render-phase setSubject); subjects now set from effects
2026-06-12 12:17:57 -07:00
Shay
d2247ac08a
Merge pull request #708 from AssetOverflow/feat/wb-r0b-playwright
test(workbench): playwright smoke lane (ADR-0162 acceptance 5-7)
2026-06-12 12:16:42 -07:00
Shay
d7236559da fix(workbench): exclude e2e/ from vitest collection
Reconciliation on rebase over R0a (#709): vitest's default include
pattern collects e2e/*.spec.ts and fails on Playwright imports.
e2e/ belongs to 'pnpm test:e2e'; vitest owns src/.
Verified post-rebase: vitest 27 files/181 tests EXIT=0 + playwright 12/12.
2026-06-12 12:07:57 -07:00
Shay
c356a13055 test(workbench): playwright smoke lane (ADR-0162 acceptance 5-7) 2026-06-12 12:05:28 -07:00
Shay
02938eef0f
Merge pull request #709 from AssetOverflow/feat/wb-r0a-test-hardening
fix(workbench): test-runner teardown hardening + frontend CI lane (Wave R R0a)
2026-06-12 12:04:05 -07:00
Shay
52b5d89206 fix(ci): pnpm action reads packageManager from workbench-ui/package.json 2026-06-12 11:54:29 -07:00
Shay
513f80d5fb fix(workbench): test-runner teardown hardening + frontend CI lane (Wave R R0a)
Full 'pnpm test' previously hung indefinitely (killed at CI walls,
misdiagnosed as teardown slowness). Two root causes found and fixed:

1. RightInspector.test.tsx called setSubject() during render with a fresh
   object every pass -> infinite synchronous render loop (100% CPU spin,
   blocks the event loop so no timeout can fire). Moved into useEffect.
2. Test QueryClients used retry:false but default gcTime (5 min) -> a live
   GC timer per cached query kept workers from exiting. New shared
   createTestQueryClient() with gcTime:0 adopted across all 7 test files.

Hardening so any future leak fails loudly instead of hanging:
- vite.config.ts: testTimeout/hookTimeout 10s, teardownTimeout 5s
- useManagedTimeout hook owns previously-bare setTimeouts in DigestBadge,
  MetadataTable, RatificationCommandPanel (4 sites), CommandPalette focus

First-ever frontend CI lane (.github/workflows/workbench-ui.yml):
path-filtered to workbench-ui/** AND the workflow file itself,
pnpm install --frozen-lockfile + build + vitest, timeout-minutes 15.

Honesty fix: KeyboardHelp no longer advertises j/k, /, Enter (unbuilt
until R0d restores them registry-backed).

Route conformance test (ADR-0162 §6, executable): empty/error/loading
contracts asserted for Chat/Proposals/Evals/Replay; fixed the two gaps
it caught (ReplayRoute bare-div error branch -> ErrorState contract;
ArtifactList empty state gained a next action).

Result: 27 files / 181 tests pass, suite EXITS in 4.9s wall-clock
(was: indefinite hang).
2026-06-12 11:45:23 -07:00
Shay
52d5d815ec
Merge pull request #707 from AssetOverflow/feat/wb-mastery-revamp-docs
docs(workbench): Wave R mastery revamp plan + R0/R1 dispatch brief pack
2026-06-12 10:58:47 -07:00
Shay
e77403f773 docs(workbench): R0a CI path filter includes the workflow file itself 2026-06-12 10:29:29 -07:00
Shay
4d70841386 docs(workbench): fold execution-shape review into Wave R plan + briefs
- R0a honesty fix unconditional (j/k, /, Enter rows out; R0d restores)
- minimal route conformance test front-loaded R1 -> R0a
- Kbd front-loaded R1 -> R0d; KeyboardHelp becomes registry-driven
  (structurally impossible to advertise unimplemented shortcuts)
- merge order pinned: strict train, R0a first; parallel dispatch retained
- declined with reasons recorded: full echelon-1 serialization, folding
  Playwright into R0a
2026-06-12 10:22:28 -07:00
Shay
8e3995ff10 docs(workbench): Wave R mastery revamp plan + R0/R1 dispatch brief pack
Re-audit of the shipped Wave 1 evidence spine found six compounding gaps
(advertised-but-unimplemented shortcuts, no evidence addresses, doctrine
without tests, deferred substrate, CRUD-shaped Wave 2, no frontend CI lane).
Wave R fixes the substrate before Wave 2 routes are built on it:

- R0a test-runner hardening + first frontend CI lane
- R0b Playwright smoke lane (ADR-0162 acceptance 5-7 debt)
- R0c evidence addresses (URL = subject, Cmd+Shift+C copy link)
- R0d interaction substrate (list nav, virtualization, panel, resize, verbs)
- R1 design mastery pass (chain rail, typography, doctrine-as-tests)
- R2/R3 upgraded specs (deterministic DAG viewer, Replay Moment,
  wrong=0 ledger, Demo Theater)

Brief 5 (Trace) dispatch holds until R0 lands; re-issued upgraded as first
R2 brief. Wave 1 doc gains a supersession pointer.
2026-06-12 10:02:46 -07:00
Shay
6153ee278b
Merge pull request #706 from AssetOverflow/feat/wb-evidence-ui
feat(workbench): evidence context, inspector drawer & command registry (Wave 1A/1B)
2026-06-12 09:17:57 -07:00
Shay
2d850c8d9b fix(workbench): preserve command section focus indices 2026-06-12 09:06:52 -07:00
Shay
94a122ba6e fix(workbench): guard recent-item persistence 2026-06-12 09:06:22 -07:00
Shay
2746655bb4 feat(workbench): evidence context, inspector drawer & command registry (Wave 1A/1B)
Brief 4 of the Wave 1 evidence spine — wire the evidence-context architecture
so every route can project into one shared evidence manifold.

Command registry (1A):
- commandRegistry.ts: useSyncExternalStore-backed command store with a cached
  snapshot (referentially stable to avoid render loops); useCommands /
  useCommandRegistry; recent-items in localStorage (last 10).
- CommandPalette.tsx: reads from the registry; all ten routes are navigation
  commands (was Chat/Proposals/Evals hardcoded); fuzzy filter, recent section,
  shortcut badges; Router/Fallback split preserved.
- useGlobalKeyboard.ts: Cmd+K palette, Cmd+I inspector, Cmd+1-0 routes, ? help.

Evidence drawer (1B):
- evidenceContext.tsx: EvidenceSubject union (turn|proposal|artifact|
  eval_result|none) + useEvidenceSubject hook + EvidenceProvider above the
  router Outlet so inspector state persists across route transitions.
- RightInspector.tsx: five evidence projections (was a null stub); reuses the
  Brief 2 primitives (MetadataTable, DigestBadge, Timestamp, badges).
- Shell.tsx: visibility driven by inspectorOpen (collapsed by default); no more
  hardcoded collapsed=true.
- KeyboardHelp.tsx: shortcut reference dialog.
- TopBar.tsx: palette open state lifted to Shell via props.

Tests: evidenceContext + RightInspector specs added; CommandPalette keyboard
contract updated for the ten-command navigation set (clamp at both ends).

Deferred (noted in spine doc): per-route register()/setSubject call sites,
action-commands (run eval / copy hash), resizable inspector width.

Verified: tsc -b + vite build green; affected specs pass per-file.
2026-06-12 07:44:19 -07:00
Shay
af8d4f75da fix(workbench-ui): guard SplitPane storage access
Handle environments where localStorage is unavailable and provide the Vitest browser-storage shim expected by SplitPane tests.
2026-06-12 07:08:22 -07:00
Shay
f4cb7a6b12 Merge pull request #704 from AssetOverflow/feat/wb-mutation-docs
docs(workbench): reconcile mutation doctrine
2026-06-12 07:05:01 -07:00
Shay
1630de6047 Merge pull request #703 from AssetOverflow/feat/wb-primitives
feat(workbench): six evidence primitives
2026-06-12 07:04:29 -07:00
Shay
6edf2d3ac1 Merge pull request #702 from AssetOverflow/feat/wb-journal
feat(workbench): turn evidence journal + trace API
2026-06-12 07:03:50 -07:00
Shay
e48e337407 Merge pull request #705 from AssetOverflow/fix/restore-readme-after-701
docs: restore README after PR #701 truncation
2026-06-12 07:03:45 -07:00
Shay
a01bca1e52 docs: restore README after accidental truncation
Restore README.md from the parent of PR #701. The merged PR replaced the project README with a blank file; this correction preserves current main history and repairs the documentation without rewriting history.
2026-06-12 06:56:02 -07:00
Shay
c87cb1e1fb Update README.md 2026-06-12 06:52:51 -07:00
Shay
ac9004783a docs(workbench): reconcile mutation doctrine with admitted corridors
Replace blanket no-mutation language with the admitted-corridor rule: ADR-governed path, visible preconditions, auditable telemetry, and replay evidence before action.

Math ratification is documented as the first admitted proposal corridor. Corpus, pack, workflow, arbitrary file, and unadmitted proposal mutation remain forbidden.
2026-06-12 06:50:26 -07:00
Shay
5b68e78ed2 feat(workbench): six evidence primitives (Wave 1C)
SplitPane, TabBar, MetadataTable, DigestBadge, Timestamp, SearchInput.
All token-driven, keyboard-navigable, ARIA-accessible, dark theme,
motion-respectful. No new dependencies — TabBar uses native ARIA
semantics instead of @radix-ui/react-tabs.

PreviewPage updated with all six components in representative states.
Section 1C checked off in wave-1-evidence-spine.md.
2026-06-12 06:45:20 -07:00
Shay
0d203d5b55 feat(workbench): turn evidence journal + trace API
Append-only JSONL journal records the exact ChatTurnResult envelope returned by /chat/turn with stable turn_id, trace_hash, all three surfaces, verdicts, and deterministic journal_digest.

GET /trace/turns and GET /trace/{turn_id} serve journal evidence for the Trace route frontend. Read model only; no teaching, pack, or journal-owned engine_state mutation.
2026-06-12 06:44:25 -07:00
Shay
e7cd7a5ed9
Merge pull request #700 from AssetOverflow/feat/demo-deductive-entailment-authority
feat(demo): deductive entailment authority demo (Demo E)
2026-06-12 00:44:34 -07:00
Shay
893136969a
Merge pull request #699 from AssetOverflow/security/main-protection-codeowners
chore: add CODEOWNERS
2026-06-12 00:36:32 -07:00
Shay
b2ad7c3ce9 feat(demo): add deductive entailment authority demo (Demo E)
Local deterministic demo exposing the formal entailment substrate as its
own public authority: the proposer's verdict/confidence/proof are data
only; CORE recomputes propositional entailment through the pinned ROBDD
engine (generate.proof_chain.entail.evaluate_entailment_with_trace),
independently cross-checks with the deductive lane's code-disjoint
truth-table oracle (evals.deductive_logic.oracle.oracle_entailment), and
serves entailed/refuted/unknown only when both procedures agree —
refusing on inconsistent premises (no vacuous entailment), out-of-regime
input (by design, before grammar), a distinct-atom regime bound (honors
the brute-force oracle's small-atom contract), and engine/oracle
disagreement (test-only fault injection, defensive refusal).

Seven committed scenarios with byte-pinned expected artifacts; 38 tests
covering recursive schema closure, output-smuggling-before-evaluation,
proposer-garbage byte-invariance in both directions, oracle module
disjointness, trace-hash folding of trace + oracle verdict, runner
hardening, and INV-21/24/29 discipline of the demo files.
2026-06-12 00:28:46 -07:00
Shay
3dc3554995 chore(security): add global CODEOWNERS gate 2026-06-12 00:23:43 -07:00
Shay
cde36e887d
Merge pull request #698 from AssetOverflow/feat/demo-authority-strength
docs: reconcile public evidence after #697
2026-06-11 23:56:23 -07:00
Shay
a69de813cb fix(demo): harden epistemic truth-state authority — sealed corpus + entailment-decided inference
Two-pass hardening of the #690 demo so no epistemic state is proposer-mintable:

Pass 1 (sealed corpus, from the reconciliation pass):
- evidence items are references only (evidence_id + content_sha256) resolved
  against a committed content-addressed corpus (evidence_corpus.json)
- support derived from committed subject/predicate match; independence from
  distinct provenance_root values; proposer support/independence labels are
  rejected by the closed schema
- evidence-strength taxonomy (substrate-capability vs interface-contract) in
  PUBLIC-DEMO-ROADMAP / DEMO-PACKAGING-CHECKLIST; position-paper refinements

Pass 2 (entailment-decided inference, closes a live false-status hazard):
- the merged inferred leg required only that premise IDs resolve — a claim
  with no support citing one unrelated record as a premise was assigned
  'inferred' (empirically confirmed). inferred is now decided by
  generate.proof_chain.entail (sound+complete ROBDD) over resolved corpus
  premises, cross-checked against the independent truth-table oracle
  (evals.deductive_logic.oracle, no shared code); proof keys + oracle verdict
  in the trace; disagreement => defensive refusal; refutation => contradicted
- committed adversarial scenario unrelated-premise-still-undetermined proves
  the attack now lands on undetermined
- corpus seal (corpus_sha256) pinned into every evaluated trace; scope
  refusals no longer consult the corpus; corpus cache hands out copies;
  claim subject/predicate constrained to atom-compatible snake_case
- .gitignore: private packet dir, agent worktrees, tooling artifacts

Validation: 30 demo tests; 96 across all three demo suites; 7/7 scenarios
double-run byte-identical; 61 architectural invariants green.
2026-06-11 23:38:03 -07:00
Shay
c6d0e2a920
Merge pull request #697 from AssetOverflow/feat/demo-authority-strength
fix(demo): harden #690 epistemic truth-state — sealed corpus + entailment-decided inference
2026-06-11 23:27:05 -07:00
Shay
015b97803b
Merge pull request #696 from AssetOverflow/feat/pccp-demo
ADR-0218 PR D: local deterministic proof-carrying promotion demo
2026-06-11 22:51:05 -07:00
Shay
4c64328884 fix(demo): harden epistemic truth-state authority — sealed corpus + entailment-decided inference
Two-pass hardening of the #690 demo so no epistemic state is proposer-mintable:

Pass 1 (sealed corpus, from the reconciliation pass):
- evidence items are references only (evidence_id + content_sha256) resolved
  against a committed content-addressed corpus (evidence_corpus.json)
- support derived from committed subject/predicate match; independence from
  distinct provenance_root values; proposer support/independence labels are
  rejected by the closed schema
- evidence-strength taxonomy (substrate-capability vs interface-contract) in
  PUBLIC-DEMO-ROADMAP / DEMO-PACKAGING-CHECKLIST; position-paper refinements

Pass 2 (entailment-decided inference, closes a live false-status hazard):
- the merged inferred leg required only that premise IDs resolve — a claim
  with no support citing one unrelated record as a premise was assigned
  'inferred' (empirically confirmed). inferred is now decided by
  generate.proof_chain.entail (sound+complete ROBDD) over resolved corpus
  premises, cross-checked against the independent truth-table oracle
  (evals.deductive_logic.oracle, no shared code); proof keys + oracle verdict
  in the trace; disagreement => defensive refusal; refutation => contradicted
- committed adversarial scenario unrelated-premise-still-undetermined proves
  the attack now lands on undetermined
- corpus seal (corpus_sha256) pinned into every evaluated trace; scope
  refusals no longer consult the corpus; corpus cache hands out copies;
  claim subject/predicate constrained to atom-compatible snake_case
- .gitignore: private packet dir, agent worktrees, tooling artifacts

Validation: 30 demo tests; 96 across all three demo suites; 7/7 scenarios
double-run byte-identical; 61 architectural invariants green.
2026-06-11 21:25:08 -07:00
Shay
c2892fa466 docs(public_demo): add known environment caveat for wall-clock budget flake 2026-06-11 18:12:00 -07:00