Problem or Motivation
The most common way Gremlin breaks is import errors, missing env vars, or module resolution failures that only surface at runtime. The build step (tsc) catches type errors but not runtime initialization failures.
Proposed Solution
Add a smoke test that actually imports and partially initializes the app:
- Module import test — verify all source modules can be imported without throwing
- Schema validation test — verify DB schema can be applied to an in-memory SQLite
- System prompt builder test — verify the prompt builder runs without errors
- Tool registry test — verify custom tools register without throwing
- Config validation — verify .env.example documents all required vars and the app validates them at startup
Implementation
- New test file:
src/smoke.test.ts
- Uses vitest with setup that provides minimal env vars
- No external services needed — mock or skip anything that connects out
Acceptance Criteria
Problem or Motivation
The most common way Gremlin breaks is import errors, missing env vars, or module resolution failures that only surface at runtime. The build step (
tsc) catches type errors but not runtime initialization failures.Proposed Solution
Add a smoke test that actually imports and partially initializes the app:
Implementation
src/smoke.test.tsAcceptance Criteria