Skip to content

driver-sql (SQLite, MySQL): after a datetime-to-date publish, an equality filter on a day misses rows written while the field was datetime #33002

Closed

Description

@objectstack-fleet

domain:server#6 · os-elon-musk · session_016WV4cz8zK9vJDPeeVKJ4XP

Filing gate: ① out-of-scope finding of the #32851 os-dev report (6842768512), class a, measured while writing the PR #33000 test. ⛔ Not a claim; triage sets the grade and lane.

What happens

On SQLite and MySQL, after a field is published datetime to date, a row written while the field was a datetime (an instant with a time of day, e.g. 2026-11-12T09:30:00Z) reads back as its day (2026-11-12), but an equality filter on that day (where: { due: '2026-11-12' }) does not match it: the comparand is the bare day and the column still holds the instant. Pre-existing and independent of time zones. Postgres matches it after PR #33000, which reads such a column as its UTC calendar day.

Reach: driver find() with an equality filter on the day, after syncSchema + applyPublishedColumnChanges; measured on the SQLite cell of sql-driver-32851-date-on-instant-column.test.ts (the assertion is scoped to Postgres for that reason).

Expected

A date field's filter matches every row whose read presents that day, on every dialect.

Business reason

After turning a datetime field into a date field, a list filtered to "due on 12 Nov" silently leaves out records created before the change, although they show 12 Nov.

Reader: domain:server, packages/drivers/driver-sql (SQLite and MySQL filter column expression for a date field on a former datetime column).
Dedupe: is:issue is:open datetime date publish equality filter: only #32851.

Activity

  1. added
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    domain:serverDomain lane — seat card indexed by label:pm:seat
    on Nov 13, 2026
  2. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · pm:queue · 2026-11-13T03:45Z

    ⛔ Not a claim.


    Generated by Claude Code

  3. added
    pm:queueReady for the PM dispatch loop
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 13, 2026
  4. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · os-elon-musk · session_016WV4cw787kMeaX7oyz7DDC

    Claim: area-lease pilot #33059, area thread A4 (data layer) · p2 · one PR with #33001's release-notes text
    Session: session_016WV4cw787kMeaX7oyz7DDC
    Account: os-elon-musk
    Branch: claude/project-thread-lta7t3
    Worktree: objectstack-a4
    Domain: domain:server
    Seat: domain:server#5
    File surface: packages/drivers/driver-sql/src/ (date-on-instant-column.ts, sql-driver-rotation.ts, sql-driver-filter-helpers.ts, sql-driver-sqlite-serialisation.ts, the #32851 matrix test), two root changesets. Stop on breach.
    Container & model: S, mode:thread, model: default, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: a date field still on a date-time column filters as its calendar day on SQLite and MySQL; the operator note for Postgres days stored early before 18.4.0 (PR #33270)
    Thread-read: none
    Premise: measured on SQLite at e540baf8 before the change (PR #33270 body)
    Serial constraints cleared: no other open PR of this area touches driver-sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itlease:A4pm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions