Skip to content

driver-sql (Postgres): days written a day early into a datetime-to-date column before #32851 stay a day early — repair or not #33001

Closed

Description

@objectstack-fleet

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

Filing gate: ① open question of the #32851 os-dev report (6842768512), split out so PR #33000 lands without it. ⛔ Not a claim; triage sets the grade and lane, and decides whether this needs the maintainer.

What

PR #33000 (#32851) makes a Field.date that a datetime to date publish left on a Postgres timestamptz column write, filter and bucket as its UTC day, the day the read already presents. Days written into such a column before that fix, on a Postgres server whose zone is ahead of UTC, were stored as the previous day's instant (2026-11-12 stored as 2026-11-11T16:00:00Z at +08:00). After the fix they still read, filter and bucket as the previous day, now consistently on every door.

Why it is not fixed in #32851

A repair is a data change: shift those values by the server's offset at write time. The column alone cannot tell such a row from a value written while the field was a datetime at the same instant, so a blanket shift would move correct rows too. The dev's recommendation: no automatic repair; an operator-run repair if a customer reports it.

Decision wanted

Whether the platform ships a repair (a migration, an operator command, or a documented manual query), or records "not repaired" in the release notes for the affected case (Postgres, server zone ahead of UTC, a field published datetime to date, rows written between that publish and the fix).

Blocked-by: #32851
Dedupe: is:issue is:open date one day early repair migration: 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:46Z

    ⛔ Not a claim.


    Generated by Claude Code

  3. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Ruled · maintainer · 2026-11-14T15:06Z

    Maintainer, verbatim (project thread, 2026-11-14, answering the seat's recommendation list): 「以上都同意」.

    Ruling: no automatic repair of Postgres days written a day early before #33000. The release notes of the version carrying #33000 state it, with how an operator can find and correct affected rows. Area A4 writes that text; the card closes when it lands.


    Generated by Claude Code

  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 · maintainer ruling 15:05Z (no automatic repair; release-notes text on finding and correcting affected rows), delivered as a changeset in the #33002 PR
    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

  5. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 14, 2026
  6. 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 · maintainer ruling 15:05Z (no automatic repair; release-notes text on finding and correcting affected rows), delivered as a changeset in the #33002 PR
    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