Skip to content

process-ledger-and-orphan-detection - #899

Merged
VeryComplexAndLongName merged 2 commits into
mainfrom
process-ledger-and-orphan-detection
Oct 11, 2026
Merged

VeryComplexAndLongName merged 2 commits into
mainfrom
process-ledger-and-orphan-detection

Conversation

@VeryComplexAndLongName

Copy link
Copy Markdown
Owner

Summary

Add a durable process ledger (ADR 0050) that records each shared spawn synchronously by PID + OS start time + hostname, with a secret-free SHA-256 command-line hash. Orphaned/overdue processes surface as read-only Compliance findings; a confirmed terminate re-verifies the OS start time before killing the process tree (PID reuse is refused).

What changed

  • packages/core: process-ledger.ts, process-start-time.ts, capture in spawnAndStream + ACP driver (opt-in via setProcessLedgerStateRoot), verifyProcessSnapshot + terminateLedgerProcess, process-overdue/process-orphan rules (no repair → autorepair resolves to advice).
  • packages/server: POST /api/processes/ledger (read-only list) and /api/processes/terminate (re-verified kill); ledger activation in the CLI.
  • packages/webui: a "Detached processes" section in ProcessesView with a confirmation-gated Terminate.
  • packages/extension: openspec-ui.terminateLedgerProcess command in the Processes view title.
  • New verb/noun vocabulary (Terminate / Ledger Process), ADR-0050, OpenSpec change and a minor changeset for core/server/extension.

Verification

  • 13 core process-ledger tests + affected shared/ACP/compliance suites (71 core tests total).
  • 15 ProcessesView tests and 1 detached-process REST contract (unverifiable PID refused before any kill).
  • action/control vocabulary tests, all package typechecks, touched-file ESLint, strict OpenSpec validation, changeset/English/test-budget gates pass.
  • No live process is spawned/killed in local tests; a real orphan smoke is left to CI or a documented delegated run.

@VeryComplexAndLongName
VeryComplexAndLongName enabled auto-merge (squash) October 11, 2026 18:51
@VeryComplexAndLongName
VeryComplexAndLongName merged commit 0dbbd4b into main Oct 11, 2026
10 checks passed
@VeryComplexAndLongName
VeryComplexAndLongName deleted the process-ledger-and-orphan-detection branch October 11, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant