fix(runtime): reconcile syncs in-memory RunRegistry (v0.10.2 patch) - #17
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(runtime): reconcile syncs in-memory RunRegistry (v0.10.2 patch)
Orphaned (process-gone) runs left the in-memory
RunRegistrystuck atstatus:"running"—reconcileonly wroterun:ended: abortedto the durableRunLog, never touching the in-memory registry. The live above-editor widget readsrunRegistry.list()→filterActive(keepsrunning|queued|paused), so it rendered a stale▶row that ticked forever for every orphan.Fix
ReconcileOptsgains an optionalrunRegistry; for each orphan reconciled in the log,reconcileRunsalso transitions it tostatus:"aborted"in memory.index.tssession_startpassesdeps.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-devthat never cleared; itsRunLogalready hadrun:ended: abortedfrom a prior reconcile, but the in-memory status never transitioned.Out of scope (noted for SPEC-6-2)
The
RunRegistryis 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 onRunRecordor a liveness probe on the session handle — a design call for the SPEC-6-2 brainstorm.