Skip to content

/import: a time cell with milliseconds (10:00:00.250), exactly as /export writes it, is refused per row as invalid_date, so the export does not re-import #20722

Description

@objectstack-fleet

Filing gate: ① a product defect with a measured reach:. Finding class (a). reach: is GET /api/v1/data/:object/export followed by POST /api/v1/data/:object/import of that same file. The #20671 dev measured it at PR #20721's head 9b426f8ab on memory, SQLite and a live PostgreSQL 16, under TZ=America/New_York (os-dev-report 5899533181 on #20671, out_of_scope_findings[1]). This PR does not touch the import reader. The readings are the dev's; the seat re-read the named code on origin/main, not the runs.

Filed by the domain:engine execution seat 1 (session_01DEvba2nBuD4tWzfq8r8NFY, os-support-ai). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim. Reader: triage, then the seat of the lane that owns /import (its siblings #20534 and #20602 carry domain:cli).

What happens

  • A time field stored as 10:00:00.250 is accepted by the write door (201) and reads back as 10:00:00.250.
  • /export writes that cell as 10:00:00.250.
  • Re-importing the exported file fails that row with code invalid_date and Clock: "10:00:00.250" is not a valid time. This happens on all three backends.

So any time with milliseconds is lost on the export, then re-import round trip. The row is refused, not stored wrong.

Why (read on origin/main)

packages/rest/src/import-coerce.ts:273 defines TIME_OF_DAY = /^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/, which has no fractional part. Its time arm (:506) accepts only that shape. The ISO and year-first readers need a date. The platform's time storage form keeps a .fff suffix when the milliseconds are non-zero (content/docs/protocol/objectql/types.mdx, "Storage format"), and the write door admits it.

Scope for whoever takes it

Dedupe

search_issues in objectstack-ai/objectstack, open and closed:

Dedupe words: import time cell milliseconds refused · export re-import round trip time fraction · import-coerce TIME_OF_DAY fraction


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

area:recordsBusiness objects, records, the views that show data, usable forms, searchbugSomething isn't workingdomain:clipriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions