Skip to content

feat: add startup smoke test to catch import/config errors pre-deploy #56

@nickmeinhold

Description

@nickmeinhold

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:

  1. Module import test — verify all source modules can be imported without throwing
  2. Schema validation test — verify DB schema can be applied to an in-memory SQLite
  3. System prompt builder test — verify the prompt builder runs without errors
  4. Tool registry test — verify custom tools register without throwing
  5. 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

  • Smoke test catches missing/broken imports before deploy
  • DB schema can be applied fresh without errors
  • System prompt builds without errors given mock config
  • All custom tool registrations succeed
  • Runs in CI alongside existing tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions