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
[finding] Seven out-of-package comments still say formatOutput's audit and datetime repairs sit inside if (this.isSqlite) — false since PR #16619 landed, and one of them tells readers a declared Field.datetime is NOT protected on Postgres/MySQL #16728
Filed by the domain:engine execution PM seat. This is the follow-up PR #16619's own body said the seat owes — it listed the residue under "noted, not filed" and said the card is the PM's to file, not a rider on that PR. Filing it now that the PR has landed, because the moment it landed the prose became false.
⛔ Filed unassigned and unlabelled, as an observation for triage. Grade deliberately not asserted; ⛔ comment drift only, no behaviour.
What changed underneath them
PR #16619 (45cfa1b88d, card #13973, ADR-0053 D-F1, merged by hand at 2026-09-08T01:09Z) made SqlDriver#formatOutput's two timestamp passes unconditional on every dialect. Verified on origin/mainbe92d46804 by readingformatOutput, ⛔ not by grepping — both passes sit at top level with no isSqlite wrapper:
// Builtin audit timestamps. On SQLite: repair any legacy/raw row … On// Postgres/MySQL: fold the client's `Date`. See `presentAuditTimestampOutput`.for(constcolofAUDIT_TIMESTAMP_COLUMNS){if(data[col]!==undefined)data[col]=presentAuditTimestampOutput(data[col]);}…// … A Postgres/MySQL `Date` takes the same fold.constdatetimeFields=this.datetimeFields[object];if(datetimeFields&&datetimeFields.size>0){…normalizeSqliteDatetimeOutput(data[field])…}
The only surviving if (this.isSqlite) early in formatOutput is the JSON codec arm, which PR #16619 deliberately left gated ("The JSON, numeric and boolean read repairs keep their dialect gates exactly as they were").
The seven sites, measured
git grep -n normalizeSqliteDatetimeOutput origin/main -- 'packages/**' ⇒ 18 hits: 10 inside drivers/driver-sql (its home — firing control: 7 in sql-driver.ts itself), 1 in packages/rest/CHANGELOG.md:1352 (⛔ a changelog, not to be touched), and 7 out-of-package source/test sites — exactly the seven PR #16619 named:
Sampled by reading (⛔ not by grepping — this is prose inside comments, where backticks, wrapping and // prefixes routinely defeat a pattern):
sys-metadata-repository.ts:96 — "folds the declared datetime columns (normalizeSqliteDatetimeOutput) ONLY inside its if (this.isSqlite) arm"
database-loader.ts:108 — "…only inside its if (this.isSqlite) arm, and withPostgresCalendarDayAsText leaves timestamptz / timestamp deliberately untouched. Both column classes therefore arrive as a JS Date on the live dialects"
⭐ One of them is worse than stale prose
packages/rest/src/rest-server.ts:699, verbatim:
formatOutput's two timestamp repairs — the AUDIT_TIMESTAMP_COLUMNS pass and the normalizeSqliteDatetimeOutput pass over datetimeFields — both sit INSIDE its if (this.isSqlite) arm, so neither runs here. ⚠️A declared Field.datetime is therefore NOT protected on Postgres/MySQL.
That is a warning aimed at a future author, and it is now false. Its failure mode is not confusion but action: it invites exactly the defensive coercion PR #16619's own card explicitly ruled out — "Not a licence to add a tolerant ?? fallback at any consumer." ⇒ the prose now argues for the change its own governing ruling forbids.
Suggested shape, not asserted
One docs-only commit rewriting the seven against the current tree: the two passes are unconditional since #16619 / ADR-0053 D-F1; a declared Field.datetime and the builtin audit columns are presented as canonical ISO-Z text on every dialect.
⚠️ Two things a fixer must not flatten:
withPostgresCalendarDayAsText is still untouched — D-F2 says the client parsers were deliberately not changed and the fold happens at the driver's own read boundary. A comment saying "the client hands back a Date" is still true; only the claim that nothing folds it is false.
Filed by the
domain:engineexecution PM seat. This is the follow-up PR #16619's own body said the seat owes — it listed the residue under "noted, not filed" and said the card is the PM's to file, not a rider on that PR. Filing it now that the PR has landed, because the moment it landed the prose became false.⛔ Filed unassigned and unlabelled, as an observation for triage. Grade deliberately not asserted; ⛔ comment drift only, no behaviour.
What changed underneath them
PR #16619 (
45cfa1b88d, card #13973, ADR-0053 D-F1, merged by hand at 2026-09-08T01:09Z) madeSqlDriver#formatOutput's two timestamp passes unconditional on every dialect. Verified onorigin/mainbe92d46804by readingformatOutput, ⛔ not by grepping — both passes sit at top level with noisSqlitewrapper:The only surviving
if (this.isSqlite)early informatOutputis the JSON codec arm, which PR #16619 deliberately left gated ("The JSON, numeric and boolean read repairs keep their dialect gates exactly as they were").The seven sites, measured
git grep -n normalizeSqliteDatetimeOutput origin/main -- 'packages/**'⇒ 18 hits: 10 insidedrivers/driver-sql(its home — firing control: 7 insql-driver.tsitself), 1 inpackages/rest/CHANGELOG.md:1352(⛔ a changelog, not to be touched), and 7 out-of-package source/test sites — exactly the seven PR #16619 named:packages/metadata-protocol/src/sys-metadata-repository.ts:96packages/metadata-protocol/src/sys-metadata-repository-14037-event-ts-canonicalisation.test.ts:17packages/metadata-protocol/src/sys-metadata-repository-14938-list-drafts-updated-at.test.ts:26packages/metadata/src/loaders/database-loader.ts:108packages/metadata/src/loaders/database-loader-14037-adapter-boundary-iso.test.ts:19packages/rest/src/rest-server.ts:699packages/rest/src/import-job-dto-timestamp-canonical.test.ts:22Sampled by reading (⛔ not by grepping — this is prose inside comments, where backticks, wrapping and
//prefixes routinely defeat a pattern):sys-metadata-repository.ts:96— "folds the declared datetime columns (normalizeSqliteDatetimeOutput) ONLY inside itsif (this.isSqlite)arm"database-loader.ts:108— "…only inside itsif (this.isSqlite)arm, andwithPostgresCalendarDayAsTextleavestimestamptz/timestampdeliberately untouched. Both column classes therefore arrive as a JSDateon the live dialects"⭐ One of them is worse than stale prose
packages/rest/src/rest-server.ts:699, verbatim:That is a warning aimed at a future author, and it is now false. Its failure mode is not confusion but action: it invites exactly the defensive coercion PR #16619's own card explicitly ruled out — "Not a licence to add a tolerant
??fallback at any consumer." ⇒ the prose now argues for the change its own governing ruling forbids.Suggested shape, not asserted
One docs-only commit rewriting the seven against the current tree: the two passes are unconditional since #16619 / ADR-0053 D-F1; a declared
Field.datetimeand the builtin audit columns are presented as canonical ISO-Z text on every dialect.withPostgresCalendarDayAsTextis still untouched — D-F2 says the client parsers were deliberately not changed and the fold happens at the driver's own read boundary. A comment saying "the client hands back aDate" is still true; only the claim that nothing folds it is false.Dateresidue survives (ADR-0053 D-F3): a value that has no canonical text passes through as an InvalidDate. ⇒ ⛔ the rewrite must not say "a read door never hands out aDate" without that carve-out — PR feat(driver-sql): the read door presents datetime values and audit stamps as canonical ISO-Z text on every dialect (#13973, B1 narrow) #16619's own contract review returned a finding for exactly that overstatement, and the corrected sentences onmaincarry the carve-out.Boundaries
packages/rest/CHANGELOG.md— a changelog is history.#14078consumer arms or the seven per-site#13993–#13999canonicalisations. PR feat(driver-sql): the read door presents datetime values and audit stamps as canonical ISO-Z text on every dialect (#13973, B1 narrow) #16619 left them deliberately: under B1 they become no-ops, not conflicts, and retiring them is separate, deliberate work.origin/mainbe92d46804and will drift — ⛔ 按符号重新推导, and verify each sentence by reading it, not by matching a pattern.