Skip to content

Fresh Docker Deployment Fails Without Seeded Data #19

Description

@evkw

Summary

A fresh Hermes deployment via Docker fails to function correctly unless the database is pre-seeded. This creates a broken first-run experience for new users and blocks onboarding.

Context

A user attempted to:

  1. Build and run Hermes via Docker
  2. Start the application with a clean database (no seed data)
  3. Use the app normally

Result:

  • The application does not function correctly in this state
  • Seeding the database resolves the issue

This suggests there are implicit assumptions in the codebase about required baseline data.

Expected Behavior

  • A fresh install (empty DB) should be fully usable
  • Required system data should either:
    • Be created automatically on first run, OR
    • Be explicitly required and documented

Actual Behavior

  • Application only works correctly after running seed scripts
  • Failure mode is unclear (no clear surfaced error yet)

Suspected Root Causes

  • Missing required lookup data (e.g. SignalType, default rules, or system entities)
  • Assumptions around seeded defaults (e.g. built-in rules, default spaces)
  • Lack of bootstrap/initialization step for new environments

Relevant note:

  • Hermes relies on seeded system data such as signal types and default rules :contentReference[oaicite:0]{index=0}
  • V1 design expects built-in defaults (e.g. rules, base entities) to exist from first use :contentReference[oaicite:1]{index=1}

Areas to Investigate

  • Database seed scripts — what is required vs optional?
  • First-run experience:
    • Should we auto-seed on startup?
    • Or enforce a required seed step in Docker entrypoint?
  • Prisma migrations vs seed responsibilities
  • Any NOT NULL or foreign key assumptions that rely on seeded data
  • Rules engine defaults (built-in rules)
  • SignalType lookup table
  • Default Space creation for new users

Reproduction Steps

  1. Run Hermes via Docker with a clean database
  2. Do NOT run seed scripts
  3. Attempt to:
    • Sign in
    • Generate briefing
    • Create signals
  4. Observe failures

Proposed Fix Options

Option A — Auto Bootstrap (Recommended)

  • On app startup:
    • Ensure required system data exists
    • Seed missing data idempotently

Option B — Enforced Seed Step

  • Add required seed execution to Docker entrypoint
  • Fail fast with clear error if seed not run

Option C — Hybrid

  • Minimal required bootstrap (SignalType, default Space)
  • Optional seed for demo/sample data

Acceptance Criteria

  • Fresh Docker deployment works without manual seeding
  • No runtime errors due to missing system data
  • First user can:
    • Sign in
    • Create signals
    • Use core flows
  • System-required data is guaranteed to exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions