altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

`sql_execute`: `core7.getStatementTypes is not a function` — 36 failures in one day

Open anandgupta42 opened this issue 8 months ago • 1 comments

Problem

sql_execute tool fails with:

core7.getStatementTypes is not a function. (In ?, ? is undefined)

36 occurrences observed in a single day across multiple sessions.

Impact

  • Users attempting to execute SQL queries hit this error silently
  • The function getStatementTypes is being called on an object (core7) where it is either undefined or not yet initialized
  • This suggests a race condition in module loading, or a version mismatch where core7 doesn't expose getStatementTypes

Suggested investigation

  1. Check where core7.getStatementTypes is called in the sql_execute tool path
  2. Verify core7 is properly initialized before getStatementTypes is invoked
  3. Check if this is version-specific — could be a regression in a recent CLI release
  4. Add defensive check: if (typeof core7?.getStatementTypes !== 'function') with a clear error message

anandgupta42 avatar Mar 26 '26 04:03 anandgupta42

Fixed by #475 — pinned @altimateai/altimate-core to exact version + added --force to npm/pnpm/bun upgrade to prevent stale platform binaries.

anandgupta42 avatar Mar 26 '26 17:03 anandgupta42