Skip to content

fix(notebook): close environment leases on disposal - #585

Merged
ewen-poch merged 1 commit into
mainfrom
fix/notebook-dispose-leases
Aug 1, 2026
Merged

fix(notebook): close environment leases on disposal#585
ewen-poch merged 1 commit into
mainfrom
fix/notebook-dispose-leases

Conversation

@ewen-poch

Copy link
Copy Markdown
Member

Problem

Notebook runtime terminal disposal did not close its environment lease coordinator. A queued lease acquisition could therefore complete after the runtime crossed its disposal boundary, while releases from already-held leases could still mutate shutdown state.

Proposed change

  • Dispose the environment lease coordinator synchronously when terminal runtime disposal begins.
  • Add a regression test covering both a queued acquisition and a previously acquired lease.

Scope and non-goals

  • Limited to Notebook environment-lease lifecycle behavior.
  • No persisted data, renderer UI, or Specialist changes.

Acceptance criteria and validation

  • Queued acquisition rejects after dispose(), held release returns false, and runtime disposal completes: covered by src/main/notebook/runtime-service.test.ts.
  • npm run typecheck: passed.
  • npm run lint: passed with 0 errors and the existing 23 warnings.
  • npm test: 630 files passed, 15 skipped; 9,356 tests passed, 184 skipped.

Review focus

  • Whether the lease coordinator closes at the terminal boundary before asynchronous teardown can yield.
  • Whether the regression test captures both queued and held-lease behavior.

Related: #577

@github-actions github-actions Bot added the bug Something isn't working label Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codex Review

Verdict: mergeable

No actionable findings.

Summary: No concrete merge-blocking defects found in the pull request changes. Branch and title checks are valid; review was static-only as requested.

@github-actions github-actions Bot added the ready-to-merge All completed AI reviewers found this pull request mergeable. label Aug 1, 2026
@ewen-poch
ewen-poch merged commit 1ae2aca into main Aug 1, 2026
25 checks passed
@ewen-poch
ewen-poch deleted the fix/notebook-dispose-leases branch August 1, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready-to-merge All completed AI reviewers found this pull request mergeable.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant