Skip to content

engines node>=18 contradicts node:sqlite cost backend (needs >=22.5); doctor doesn't warn #114

Description

@ils15

Summary

package.json declares "engines": {"node": ">=18"} (package.json:118-120), but since B3-06 the pantheon_cost tool has a single backend: read-only node:sqlite, which only exists on Node >= 22.5. Users on Node 18–22 get UNSUPPORTED from pantheon_cost with no upfront warning, and doctor.mjs performs no Node version / node:sqlite availability check.

Evidence

  • package.json:118-120engines.node >= 18
  • CHANGELOG.md:30 + README.md:88-89 — single node:sqlite backend, UNSUPPORTED on Node < 22.5, CLI fallback removed (intentional, fail-closed)
  • scripts/doctor.mjs — no Node version or node:sqlite check (validated: zero references)
  • Live validation on a Node runtime without node:sqlite: pantheon_costUNSUPPORTED: No such built-in module: node:sqlite (honest, but nothing warned earlier in the install/doctor path)

Impact

  • Misleading engines range: install succeeds on Node 18, cost tool silently unavailable
  • Doctor reports 0 errors while a documented feature is dead on that runtime

Suggested fixes (non-breaking preferred)

  • (a) doctor: read process.version; if < 22.5, emit a WARNING (not error): "pantheon_cost will report UNSUPPORTED — node:sqlite requires Node >= 22.5"
  • (b) Optionally probe node:sqlite availability directly (more robust than version comparison)
  • (c) Keep engines at >=18 if the rest of the plugin supports it, but document the cost-tool requirement in the README install section
  • (d) Alternative (breaking): bump engines to >=22.5 — only if Node 18 support is not intentional

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions