Skip to content

test: fix fixture revision lifetime and SQLite restart runtime - #40665

Merged
nwparker merged 1 commit into
mainfrom
module-layout-v2/renderer-integration-fixture-lifetimes-f4e
Nov 10, 2026
Merged

nwparker merged 1 commit into
mainfrom
module-layout-v2/renderer-integration-fixture-lifetimes-f4e

Conversation

@nwparker

@nwparker nwparker commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Keep state created by terminal-link tests from leaking into the next suite, and run a real SQLite restart test with the runtime that supports its read-only WAL reopen.

Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4

What Changed

  • Retire runtime environment revisions through their defining public owner before and after each terminal-link fixture case. Retirement happens while the case’s window stubs still exist; mock clearing follows setup retirement.
  • Admit the hook session-binding suite to the existing Node runtime list. It reaches SQLite through a fixture import, beyond the direct-import scan.

No production code, test registrations, or assertions change. No new reset API or forwarding module is added.

Why

On pristine main, the ordered terminal-link → Codex pair leaves pairing revision 2 behind and fails the Codex request assertion. The same pair passes after cleanup. The hook suite’s WAL restart cases fail under Bun but pass with the normal test command after explicit Node admission.

Linked Issue

Part of the ongoing module layout cleanup; no separate issue.

Visual Proof

N/A — test infrastructure and fixture lifecycle only; no UI or interaction change.

Testing

  • Local checks on macOS: pnpm check:changed — all 27 checks pass, including Node/web typechecking and selected units.
  • Ordered two-suite control: before 1 failed / 31 passed; after 32 passed, both using shared Bun workers and unchanged assertions.
  • Normal pnpm test src/main/agent-hooks/server/testing/identity/server-hook-session-binding.test.ts --maxWorkers=1 --reporter=verbose — Node runtime, 14 passed.
  • pnpm test src/renderer/src/components/terminal-pane/links --maxWorkers=2 --reporter=verbose — 21 files / 172 tests passed.
  • No new tests; existing failing tests demonstrate both changes. Required hosted CI must pass before merge. Broader renderer integration still has separate shared-window failures; this PR does not claim to resolve them.

Risk

Level: Low. Fixture retirement invokes the existing retirement listeners, rather than silently clearing a Map. Cleanup runs before window teardown to preserve that contract. Production local/remote/Mobile/folder behavior is unchanged. Linux and Windows execution is left to CI. A plain revert restores the previous test behavior.

Review

Two independent native Codex implementation reviews accepted the exact patch, including retirement listener side effects and transitive SQLite runtime selection. Detailed evidence remains local.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material copied or translated.

Checklist

  • Focused change; mechanism, validation, risk, and rollback described.
  • Self-reviewed; two independent reviews completed.
  • Cross-platform and remote/Mobile/folder impact considered.
  • No UI change; visual proof N/A.
  • Required local changed checks passed; full hosted CI required before merge.

@nwparker
nwparker merged commit 71c5781 into main Nov 10, 2026
40 of 41 checks passed
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