Manage the complete browser-session lifecycle #5
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
lab/pilcrow#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
Make browser-created sessions durable workspace records through their whole lifecycle while keeping process ownership directly in the hub. A project's plus action creates and opens a Starting record before spawning Pi. Readiness binds the exact Pi identity and path when one exists. The hub may stop only the process group it launched; no separate supervisor is introduced.
Stop retains the record, history, drafts, and placement. An untouched stopped session remains an empty New session record and Continue starts a fresh Pi process for that same workspace identity. A persisted stopped session continues by its exact canonical path. Continue selects an already-live session instead of duplicating it and never adopts an independent process.
Handle start failure, hub restart, duplicate declared IDs, duplicate resume races, missing working directories or files, and stale management authority explicitly. Forget is stopped-only and removes Pilcrow metadata without deleting or rewriting Pi JSONL.
Acceptance criteria
Blocked by
Implemented in jj revision
7c615132(feat(hub): persist browser session lifecycle and exact-path continuation).What changed:
+creates, persists, emits, and selects an opaquestartingworkspace record before spawn. Input remains unavailable until the exact launch is durably registered and bound.starting,ready,stopped, and safety-quarantinedblockedrecords with bounded failure diagnostics and no migration or Pi JSONL rewrite.blockedrecords rather than ordinary stopped records. They remain non-Continue-able after restart until safe reconciliation or Forget.SessionHistorySourceprecursor for bounded, timed, non-symlink exact-file validation with Pi session-header checks and dev/inode/size/time identity rechecks before spawn and binding.0600replacement.Audit and regression coverage:
Validation:
git diff --checkpassed.vp checkis blocked only by the unchanged pre-existing formatting finding in.dev/agents/triage-labels.md.No supervisor process, migration path, cold History UI, observed Stop authority, or Pi JSONL mutation was introduced. No dev server was managed.