Problem
BrainLayer's runtime schema-ensure path can create or replace FTS objects without writing a corresponding schema_migrations or migration_events record.
During the M1 outage, the index job reported missing/mismatched chunks_fts_* objects. Hours later the 21-object runtime contract passed, but:
- the latest
schema_migrations entry predated the repair by weeks;
migration_events was empty.
This made the exact repair time and actor impossible to establish.
Expected
Every runtime path that mutates DDL should leave an atomic, queryable event containing at least:
- timestamp;
- actor/path;
- prior and resulting schema fingerprint;
- affected objects;
- success/failure.
Acceptance
- Regression test performs a runtime FTS/schema repair and asserts a ledger event.
- No event is written for a read-only validation.
- Failed repairs record failure without claiming the resulting fingerprint.
- Existing explicit migrations remain compatible.
Problem
BrainLayer's runtime schema-ensure path can create or replace FTS objects without writing a corresponding
schema_migrationsormigration_eventsrecord.During the M1 outage, the index job reported missing/mismatched
chunks_fts_*objects. Hours later the 21-object runtime contract passed, but:schema_migrationsentry predated the repair by weeks;migration_eventswas empty.This made the exact repair time and actor impossible to establish.
Expected
Every runtime path that mutates DDL should leave an atomic, queryable event containing at least:
Acceptance