From 5844a277886c3924e6b8609339ecff4aeea02219 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 13 Aug 2026 13:09:13 +0000 Subject: [PATCH 1/3] fix(daemon): bump better-sqlite3 to ^12 for Node 24 teardown abort better-sqlite3@11 aborts Node 24 processes with "Assertion failed: (env) != nullptr" in node::RemoveEnvironmentCleanupHook when Statement or Database finalizers run against a torn-down environment. That hits this package on two surfaces: - The daemon process itself: a restarted daemon can abort between binding its socket and sending its ready IPC message, so start() rejects with "Daemon failed to spawn ... exited null". On the Node 24 CI leg this failed the persistence tests (store pass-copy values, persist spawn and evaluation, rehydrated requests can be resolved after restart) with each crashed daemon's abort trace landing only in its endo.log. - The AVA worker: endo.test.js opens in-process Database handles via openTestDb for db-inspection assertions; their finalizers abort the test process at teardown, before AVA prints its failure summary (turbo then reports the task failed with exit 129 and no detail). Reproduced on Node 24.19.0, the CI toolchain version: the three restart tests failed 7 of 8 iterations with 11.10.0 and pass 8 of 8 with 12.11.1, which fixed the cleanup-hook lifecycle upstream. Node 22 is unaffected. No other workspace depends on better-sqlite3, so the lockfile drops 11.x entirely. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01RuRefk7nt9vH96nfxcQcNP (cherry picked from commit a53d20ee3eceb9342f4c40a0d12318daae1a3653) --- packages/daemon/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/daemon/package.json b/packages/daemon/package.json index c84b0157ac..49e738aa32 100644 --- a/packages/daemon/package.json +++ b/packages/daemon/package.json @@ -94,7 +94,7 @@ "@endo/utf8": "workspace:^", "@endo/where": "workspace:^", "@endo/zip": "workspace:^", - "better-sqlite3": "^11.0.0", + "better-sqlite3": "^12.0.0", "ses": "workspace:^", "ws": "^8.21.3" }, From 98312e3d49f9a4aeb061da98ef532ff2ce531590 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Sep 2026 06:49:46 +0000 Subject: [PATCH 2/3] fix(ci): unpin Node 24 now that better-sqlite3 12 survives teardown The matrix pinned Node to 24.18.0 because Node 24.19 triggers the better-sqlite3@11.10.0 legacy node::ObjectWrap cleanup abort (nodejs/node#65042). With @endo/daemon on better-sqlite3 ^12, which fixed the cleanup-hook lifecycle upstream, the pin is no longer needed; track the 24.x line again. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01FnsnQttCNY3PwrtVqoE67s --- .github/workflows/ci.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c53967807e..cbff929846 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,10 +163,7 @@ jobs: strategy: fail-fast: false matrix: - # Temporarily pin Node 24: Node 24.19 triggers the better-sqlite3@11.10.0 - # legacy node::ObjectWrap cleanup abort; see - # https://github.com/nodejs/node/pull/65042. - node-version: [22.x, 24.18.0] + node-version: [22.x, 24.x] platform: [ubuntu-latest, macos-15] # windows-latest exhibited flakey tests that are not yet worth the # trouble to investigate, and blocked us from upgrading yarn from 1 to @@ -332,10 +329,7 @@ jobs: strategy: fail-fast: false matrix: - # Temporarily pin Node 24: Node 24.19 triggers the better-sqlite3@11.10.0 - # legacy node::ObjectWrap cleanup abort; see - # https://github.com/nodejs/node/pull/65042. - node-version: [22.x, 24.18.0] + node-version: [22.x, 24.x] platform: [ubuntu-latest] steps: @@ -377,10 +371,7 @@ jobs: strategy: fail-fast: false matrix: - # Temporarily pin Node 24: Node 24.19 triggers the better-sqlite3@11.10.0 - # legacy node::ObjectWrap cleanup abort; see - # https://github.com/nodejs/node/pull/65042. - node-version: [22.x, 24.18.0] + node-version: [22.x, 24.x] platform: [ubuntu-latest] steps: @@ -486,10 +477,7 @@ jobs: strategy: fail-fast: false matrix: - # Temporarily pin Node 24: Node 24.19 triggers the better-sqlite3@11.10.0 - # legacy node::ObjectWrap cleanup abort; see - # https://github.com/nodejs/node/pull/65042. - node-version: [22.x, 24.18.0] + node-version: [22.x, 24.x] platform: [ubuntu-latest] steps: From e728a1dacd7be0a32e71fd358cf3afe9b50ba8fa Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Sep 2026 06:50:25 +0000 Subject: [PATCH 3/3] chore: Update yarn.lock Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01FnsnQttCNY3PwrtVqoE67s --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 73575558f2..f752246c54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1950,7 +1950,7 @@ __metadata: "@number0/iroh": "npm:^1.1.0" "@types/ws": "npm:^8.18.1" ava: "catalog:dev" - better-sqlite3: "npm:^11.0.0" + better-sqlite3: "npm:^12.0.0" c8: "catalog:dev" eslint: "catalog:dev" expect-type: "npm:^1.4.0" @@ -7942,14 +7942,14 @@ __metadata: languageName: node linkType: hard -"better-sqlite3@npm:^11.0.0": - version: 11.10.0 - resolution: "better-sqlite3@npm:11.10.0" +"better-sqlite3@npm:^12.0.0": + version: 12.11.1 + resolution: "better-sqlite3@npm:12.11.1" dependencies: bindings: "npm:^1.5.0" node-gyp: "npm:latest" prebuild-install: "npm:^7.1.1" - checksum: 10c0/1fffbf9e5fc9d24847a3ecf09491bceab1c294b46ba41df1c449dc20b6f5c5d9d94ff24becd0b1632ee282bd21278b7fea53a5a6215bb99209ded0ae05eda3b0 + checksum: 10c0/162d3fa6c19a68191d09537bd113bd54a636c9fb38b0fc0796f4f270032770695ef35a1bca041a0a0fa9bfa47e20b9e17c94484a3899c31f38881af4d12b7fa5 languageName: node linkType: hard