altimate-code
altimate-code copied to clipboard
`sql_execute`: `core7.getStatementTypes is not a function` — 36 failures in one day
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
getStatementTypesis 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
core7doesn't exposegetStatementTypes
Suggested investigation
- Check where
core7.getStatementTypesis called in thesql_executetool path - Verify
core7is properly initialized beforegetStatementTypesis invoked - Check if this is version-specific — could be a regression in a recent CLI release
- Add defensive check:
if (typeof core7?.getStatementTypes !== 'function')with a clear error message
Fixed by #475 — pinned @altimateai/altimate-core to exact version + added --force to npm/pnpm/bun upgrade to prevent stale platform binaries.