Skip to content

brainlayer index exits 0 after fatal schema fingerprint errors #617

Description

@EtanHey

Problem

The scheduled brainlayer index job can print a fatal runtime schema fingerprint mismatch and then return exit 0. launchd records success, so the nightly embedding/index failure is silent.

Live evidence

The M1 index.out.log ended a scheduled run with:

Error: runtime schema fingerprint mismatch; missing or wrong-type objects:
chunks_fts_operational, chunks_fts_operational_insert; definition mismatches:
chunks_fts_delete, chunks_fts_insert, chunks_fts_trigram_delete,
chunks_fts_trigram_insert, chunks_fts_update

launchctl list still showed last exit status 0. Embedding coverage then stopped progressing.

Expected

Any fatal index error must produce a non-zero process exit and a machine-readable failure signal suitable for launchd/health monitoring.

Acceptance

  • Regression test proves the CLI exits non-zero on SchemaFingerprintMismatch.
  • launchd can distinguish success from fatal failure.
  • Partial progress is not reported as a successful completed run.
  • Error context remains in stdout/stderr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions