Skip to content

fix(runtime): reconcile syncs in-memory RunRegistry (v0.10.2 patch) - #17

Merged
rz1989s merged 1 commit into
mainfrom
fix/reconcile-syncs-run-registry
Jul 28, 2026
Merged

fix(runtime): reconcile syncs in-memory RunRegistry (v0.10.2 patch)#17
rz1989s merged 1 commit into
mainfrom
fix/reconcile-syncs-run-registry

Conversation

@rz1989s

@rz1989s rz1989s commented Jul 28, 2026

Copy link
Copy Markdown
Member

fix(runtime): reconcile syncs in-memory RunRegistry (v0.10.2 patch)

Orphaned (process-gone) runs left the in-memory RunRegistry stuck at status:"running"reconcile only wrote run:ended: aborted to the durable RunLog, never touching the in-memory registry. The live above-editor widget reads runRegistry.list()filterActive (keeps running|queued|paused), so it rendered a stale row that ticked forever for every orphan.

Fix

ReconcileOpts gains an optional runRegistry; for each orphan reconciled in the log, reconcileRuns also transitions it to status:"aborted" in memory. index.ts session_start passes deps.runRegistry. TDD: +3 reconcile tests (orphan-in-memory, fresh-untouched, back-compat-no-registry). 365 → 368.

Caught by

Dogfooding v0.10.1 — a 27m ghost row in ~/local-dev that never cleared; its RunLog already had run:ended: aborted from a prior reconcile, but the in-memory status never transitioned.

Out of scope (noted for SPEC-6-2)

The RunRegistry is shared across same-process sessions; a cross-cwd orphan from session A still leaks into session B's widget (reconcile scans per-cwd logs). Needs a cwd tag on RunRecord or a liveness probe on the session handle — a design call for the SPEC-6-2 brainstorm.

…ows)

Orphaned (process-gone) runs left the in-memory RunRegistry stuck at
status:"running" — reconcile only wrote run:ended: aborted to the durable
RunLog, never touching the in-memory registry. The live above-editor widget
reads runRegistry.list() + filterActive (keeps running|queued|paused), so it
rendered a stale ▶ row that ticked forever for every orphan.

Fix: ReconcileOpts gains an optional runRegistry; for each orphan reconciled
in the log, reconcileRuns also transitions it to status:"aborted" in memory.
index.ts session_start passes deps.runRegistry. TDD: +3 reconcile tests
(orphan-in-memory, fresh-untouched, back-compat-no-registry). 365 → 368.

Found while dogfooding v0.10.1 (a 27m ▶ ghost row in ~/local-dev that never
cleared; its RunLog already had run:ended: aborted from a prior reconcile,
but the in-memory status never transitioned). Bumps 0.10.1 → 0.10.2.

Out of scope (noted for SPEC-6-2): the RunRegistry is shared across same-
process sessions; a cross-cwd orphan from session A still leaks into session
B's widget (reconcile scans per-cwd logs). Needs a cwd tag on RunRecord or a
liveness probe on the session handle — a design call for the 6-2 brainstorm.
@rz1989s
rz1989s merged commit 37b0178 into main Jul 28, 2026
1 check passed
@rz1989s
rz1989s deleted the fix/reconcile-syncs-run-registry branch July 28, 2026 03:26
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