Skip to content

Preserve subsecond record timestamps in RDF exports - #823

Merged
WaylandYang merged 3 commits into
deeplethe:devfrom
Maya-Kid:codex/preserve-rdf-subseconds
Sep 20, 2026
Merged

WaylandYang merged 3 commits into
deeplethe:devfrom
Maya-Kid:codex/preserve-rdf-subseconds

Conversation

@Maya-Kid

@Maya-Kid Maya-Kid commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Problem

RDF record timestamps were formatted with whole seconds. Recording at 00:00:00.100001Z and retracting at 00:00:00.100002Z exported the same time, losing the record-axis distinction even though PostgreSQL retained it.

Change

Use Chrono's AutoSi in the record-time literal helper. Existing fractional precision survives; whole-second timestamps retain their spelling. World-time precision formatting and validity decisions are unchanged.

Validation

Linux, dedicated PostgreSQL/pgvector, UTOPIA_TEST_REQUIRE_DB=1:

  • Baseline helper and authenticated HTTP export tests both fail at the intended timestamp-truncation assertions; both pass with the fix.
  • Parsed Turtle and JSON-LD retain fact recording/retraction, derived-result generation/retraction, and document creation/deletion times, including two times one microsecond apart.
  • Controls cover whole seconds, milliseconds, microseconds, nanoseconds, and unchanged world-axis year/month/day/sub-day formatting. The export leaves source rows unchanged.
  • Format, workspace Clippy (-D warnings), workspace tests and build pass: 940 passed, 0 failed, 1 ignored live-public-HTTPS test.
  • Unchanged frontend tree: reused the freshly verified T2 frontend checks (91 tests and build).

Only the record-time formatter changes in production. No SQL, schema, write-path, or time-filter change. Consumers comparing exact output strings may now see fractional seconds; previous exports are not rewritten.

Combined regression verification

All five independent fixes merge cleanly onto the same dev baseline. On the combined Linux branch, format, workspace Clippy, build and the full test suite pass (952 passed, 0 failed, 1 explicitly ignored live-public-HTTPS test). A shared authenticated RDF fixture verifies unbound values, subsecond history and explicit ontology links together in Turtle and JSON-LD. Removing each fix individually makes its regression fail again; restoring all fixes returns the full suite to 952 passing tests. No database migration or historical rewrite is included.

@WaylandYang
WaylandYang merged commit 50234d9 into deeplethe:dev Sep 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants