Skip to content

Workbench as a database companion #613

Closed
9 of 9 issues completed
Closed

Description

@nockawa

The Workbench stops being a viewer you open separately and becomes the companion to a database: it knows that database's profiling captures, bridges between what a capture recorded and what the database holds, and steps aside when you run your app.

Design docs:

The experience

  1. Open world.typhon — everything the Workbench does today.
  2. A Profiles list appears, read from {name}.typhon/profilings/ and rendered from trace headers alone.
  3. Open one — the session gains profiler capabilities: timeline, call tree, system DAG, query analyzer, data flow.
  4. Bridges light up between what the capture recorded and what the database holds.
  5. Run your app — the Workbench releases the database, and resumes when the app exits.

Why it holds together

Three engine properties make the correlation safe, and it would have been unshippable if any one were false:

Property Consequence
EntityId is monotonic and never recycled, routing id persisted An entity named in a 6-month-old capture still names that entity, or nothing. Never the wrong one.
TSN is globally monotonic and durable across restarts Drift is measurable in transactions, not guessed.
SchemaHistoryR1 is a timestamped schema-change audit trail Drift is itemisable per component, not merely detectable.

Guiding principle throughout: identity is carried by structure (where a file lives, what a file records) rather than reconstructed by inference. And where a guarantee cannot be met, fail to a weaker guarantee, never to a plausible wrong one.

Features

Artefact self-description — engine-side, do first

The experience

Independent

Dependencies: F5–F7 require F4. F5/F6 are better with F1 but degrade gracefully to name-joins without it. F8 and F9 are independent of the profiles chain.

Status (2026-08-15) — DONE, merged in PR #810. All nine features are implemented and on main. What shipped and every deviation is recorded in §1.1–§1.9 of the two design docs.

F8 grew two additions beyond its original scope, both approved during implementation and recorded in the design: open-into-paused (a database already held by another process opens as a Paused session rather than failing), and the entry-mode subtraction — the Workbench now has exactly two ways in, Open database and Attach, with the standalone trace-session type deleted so a capture is only ever reachable through its database.

The merge also carried four engine fixes the work uncovered: the WAL resting footprint (#784) and the drain-overrun rule WR-03 (#785), the two remaining crash-recovery / advisory-lock defects in #767, and a retention bug that could delete a capture the Workbench had open on every platform except Windows — where File.Delete failing was the entire mechanism enforcing the opposite.

One follow-up is open: #811. DatabasePauseTests is quarantined from the merge gate because it wedges the c6id runner and passes everywhere else, including four consecutive full-suite runs on Linux under WSL2. That removes server-side F8 coverage from the gate until it is understood; the nightly still runs it.

Out of scope (recorded blockers)

  • B1 — a live engine's database cannot be opened at all (db.lock + FileShare.Read). Post-mortem only, unless a read-only open mode is ever built.
  • B2 — no historical read: MVCC reclaims old versions, so "data as it was at tick N" is not recoverable from these artefacts.
  • B3 — two Open sessions are blocked by the process-global ArchetypeRegistry.
  • Remote / multi-user Workbench — parked. The real gate is a read-only open mode, not auth: two Workbench processes cannot share a database because of the engine's exclusive lock, and a running app blocks everyone (B1). That one capability would unlock B1, N concurrent readers, and make F8 unnecessary — which is why it keeps surfacing as the answer.

Sub-issues

Sub-issues

9 of 9 Issues completed
Loading 9 sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Area

Workbench

Estimate

XL

Start date

None yet

Target date

None yet

Product

Workbench

Priority

P2-Medium

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions