You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "MasamiYui (via GitHub)" <gi...@apache.org> on 2026/09/14 09:35:17 UTC

[I] Node 23 satisfies engines >=22.19.0 but lacks node:sqlite isTransaction; every State Root open fails [maka]

MasamiYui opened a new issue, #5290:
URL: https://github.com/apache/maka/issues/5290

   ### What happened
   
   Running Maka from source on Node.js 23.x (tested 23.7.0) fails to open any State Root. Every `createSessionStore()` / `acquireOperationalStateDatabase()` call throws:
   
   ```
   OperationalStateMigrationBlockedError: cannot start a transaction within a transaction
       at inspectAndMigrateOperationalState (packages/storage/dist/operational-state-store.js)
       at new OperationalStateDatabaseOwner
       at acquireOperationalStateDatabase
       at new SqliteSessionStore
     [cause]: Error: cannot start a transaction within a transaction   (ERR_SQLITE_ERROR, errcode 1)
   ```
   
   `npm run test:dist` reports several hundred failures across `@maka/storage`, `@maka/runtime`, and `@maka/runtime-host` with the same root cause.
   
   **Root cause.** `inspectOperationalStateSchema` (`packages/storage/src/operational-state-store.ts`) guards its `BEGIN` with `if (database.isTransaction)`. `DatabaseSync.isTransaction` was added to `node:sqlite` in Node 22.16 and 24.0, but never landed on the 23.x line. On Node 23 the property is `undefined`, the guard is skipped, and the nested `BEGIN` fails.
   
   **Why nothing warned.** The root `package.json` declares `"engines": { "node": ">=22.19.0" }`, which semver-accepts 23.x, so `npm install` is silent. CI only exercises 22.19.0 and 24, so the gap is invisible there. `scripts/release-cli-package.mjs` `validateNodeVersion()` has the same hole (`major < 22 || (major === 22 && minor < 19)`).
   
   Expected: either the engines range excludes Node 23, or the storage layer does not depend on an API that is missing on a version the range accepts.
   
   ### How to reproduce
   
   1. `nvm use 23` (any 23.x; 23.7.0 confirmed)
   2. `node -e "const {DatabaseSync}=require('node:sqlite'); console.log(new DatabaseSync(':memory:').isTransaction)"` → prints `undefined`
   3. `npm ci && npm run build && npm run test:dist`
   4. Observe `cannot start a transaction within a transaction` from `operational-state-store` in storage / runtime / runtime-host suites.
   
   ### Environment
   
   - Maka commit: fa25b3d01 (`main`)
   - OS: macOS 15 (arm64)
   - Surface: Runtime Host / from-source test run (`@maka/storage`)
   - Node.js: v23.7.0, npm 10.9.2
   
   ### Additional context
   
   Node 23 is EOL, so the pragmatic fix is to make the declared support range truthful rather than to add a fallback: `"node": "^22.19.0 || >=24.0.0"`, reject major 23 in `validateNodeVersion()`, and align README / CONTRIBUTING / CLI README wording. A PR with that change follows.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] Node 23 satisfies engines >=22.19.0 but lacks node:sqlite isTransaction; every State Root open fails [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed issue #5290: Node 23 satisfies engines >=22.19.0 but lacks node:sqlite isTransaction; every State Root open fails
URL: https://github.com/apache/maka/issues/5290


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org