You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c75962a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(service-storage): accept the driver's Date for created_at in the stranded-orphan inventory (#14102)
`inventoryStrandedFileOrphans` projects `created_at` out of the `sys_file` read
door and then tested it with `typeof row.created_at === 'string'`. `created_at`
is a BUILTIN audit column, so no declared-field coercion reaches it and
`SqlDriver#formatOutput` repairs the audit columns only inside its
`if (this.isSqlite)` arm: that door hands the value back as canonical ISO-Z text
on SQLite and as a JS `Date` on Postgres and MySQL, the production default
drivers. The guard was therefore false for every row on both live dialects and
the projected field was silently discarded from every sample.
Accept both shapes at the consumer, in the form `@objectstack/metadata-protocol`
already carries for `occurred_at`. Normalising at the driver's read door instead
would reverse the deliberate `withPostgresCalendarDayAsText` decision that a
`timestamptz` is an instant, so the consumer owes the canonical spelling.
The terminal arm stays `undefined` rather than `String(value)`: this field is
optional where `occurredAt` is not, and stringifying a null or an Invalid Date
would spell `"undefined"` / `"Invalid Date"` into the position an operator reads
a timestamp from. The sibling `key` / `name` guards are untouched — those are
text columns on every dialect.
Claude-Session: https://claude.ai/code/session_016ZC5rNQj3WEet5HAmmAkMs
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments