fix(T11546): exodus type coercion + no-swallow (P0 data-loss)#888
Merged
Conversation
…w + brain_usage_log mapping (P0 data-loss)
- detectEpochToIsoColumns(): reads target DDL from sqlite_master, applies
strftime('%Y-%m-%dT%H:%M:%fZ', col[/1000.0], 'unixepoch') for INTEGER
epoch source columns targeting TEXT+ISO-GLOB CHECK columns (conduit.messages
created_at, brain_observations created_at, etc.)
- No-swallow assertion: after INSERT OR IGNORE, compares changes vs sourceCount;
full-table drops (rowsCopied=0) return hard error instead of silent success
- brain_usage_log: added to consolidated cleo-project + cleo-global Drizzle
schema (migration 20260531000002) + BRAIN_DB_MAP identity mapping so 8471
quality-feedback rows are copied during exodus migration
- schema_meta -> tasks_schema_meta + brain_schema_meta identity mapping (no-home fixes)
- 46 regression tests added + all passing
…tiple migration folders resolveMigrationSql was hardcoded to expect exactly 1 migration folder; now that T11546 adds a second migration (20260531000002), the helper readAllMigrationSql collects and applies all folders in sorted order. 21 previously-failing AC1/AC2/AC4 tests now pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per-column value transform for type/format-drifted columns (conduit created_at epoch->ISO-8601 so CHECK passes), strict no-swallow on per-row INSERT failures, brain_usage_log consolidated mapping. Validated via orchestrator re-validation workflow.
Changes
Per-column epoch→ISO coercion:
detectEpochToIsoColumns()reads target table DDL fromsqlite_master, identifies columns with ISO-8601 GLOB CHECK constraints, and injectsstrftime('%Y-%m-%dT%H:%M:%fZ', col[/1000.0], 'unixepoch')for INTEGER-typed source columns. Fixes silent data loss where epoch integers failed GLOB checks and were dropped byINSERT OR IGNORE.No-swallow assertion: after bulk INSERT, compares
changesvssourceCount. Full-table drops (rowsCopied=0) return a hard table-level error with details. Partial drops emit a warning for verifier follow-up. Eliminates the silentsuccess: true, rowsCopied: 0P0 bug.brain_usage_log migration: added to consolidated cleo-project + cleo-global Drizzle schema (migration
20260531000002_t11546-brain-usage-log) + identity mapping inBRAIN_DB_MAPso 8471 quality-feedback rows are copied during exodus migration.No-home-table fixes:
schema_meta → tasks_schema_meta(was missing from TASKS_DB_MAP, fell through to identity which doesn't exist) +brain_schema_metaidentity mapping.46 regression tests: all passing locally.