8000 fix(deps): replace chrono with strict built-in UTC timestamps (#900) by adityamukho · Pull Request #922 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

fix(deps): replace chrono with strict built-in UTC timestamps (#900) - #922

Merged
adityamukho merged 1 commit into
v3from
fix/900-replace-chrono
Nov 27, 2026
Merged

adityamukho merged 1 commit into
v3from
fix/900-replace-chrono

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Refs #900 (RUSTSEC-2026-0543: chrono unmaintained).

What

  • Removes chrono. src/temporal.rs parses and formats UTC timestamps itself (no replacement crate), and the RUSTSEC-2026-0543 ignore is removed from deny.toml.
  • v3.0.0 behaviour change: accepted forms are exactly YYYY-MM-DD, YYYY-MM-DDTHH:MM:SSZ and YYYY-MM-DDTHH:MM:SS.fZ (1–9 fractional digits, truncated to milliseconds), years 0000–9999, uppercase T/Z. chrono 0.4.45 also accepted two-digit years (24-01-15 = year 24), single-digit fields, lowercase z, a UTC suffix, surrounding/inner whitespace, leap seconds and negative years; these are now INT-004. Offsets stay rejected.
  • millis_to_timestamp_string keeps its whole-second output and returns INT-005 outside 0000–9999.
  • No error codes added or removed; stored data is unaffected (timestamps are stored as milliseconds).

Evidence

  • 328 (input, millis) vectors generated from chrono 0.4.45 (src/temporal/chrono_vectors.rs) all parse to chrono's value; whole-second ones round-trip through the formatter.
  • Tests for every newly rejected form, calendar/clock boundaries (century leap rule, 0000/9999), formatter range edges, multibyte input at every byte offset, two proptests (round trip, no panic), and a Datalog-level test over :as-of, :valid-at, :valid-from, :valid-to.
  • Full native suite: 2,158 passed, 23 ignored. fmt, clippy (--all-targets --all-features -D warnings), browser wasm build and cargo-deny pass.
  • Dist binary 22,704 bytes smaller.

Docs

CHANGELOG (Unreleased, Changed), docs/ERROR_REFERENCE.md INT-004/INT-005, CLAUDE.md, docs/TEST_COVERAGE.md. Docs-site PR for content/datalog-reference.md follows.

No main backport: an unmaintained advisory is not a security fix and the stricter parsing is a behaviour change; main keeps its deny.toml ignore.

🤖 Generated with Claude Code

chrono is unmaintained (RUSTSEC-2026-0543). Minigraf used it only to
parse and format UTC timestamps, so src/temporal.rs now does both
without a dependency, and the deny.toml ignore is removed.

Accepted forms are tightened for v3.0.0: YYYY-MM-DD,
YYYY-MM-DDTHH:MM:SSZ and YYYY-MM-DDTHH:MM:SS.fZ (1-9 fractional
digits, truncated to milliseconds), years 0000-9999, uppercase T/Z.
Forms chrono also accepted (two-digit years, single-digit fields,
lowercase z, a UTC suffix, whitespace, leap seconds, negative years)
are now INT-004. Results for the kept forms match 328 vectors
generated from chrono 0.4.45. The dist binary shrinks by 22,704 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adityamukho adityamukho added this to the v3.0.0 milestone Nov 27, 2026
@adityamukho adityamukho added the dependencies Pull requests that update a dependency file label Nov 27, 2026
@codecov
codecov Bot commented Nov 27, 2026
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.35683% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/temporal.rs 97.32% 2 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit 33b4b16 into v3 Nov 27, 2026
29 checks passed
@adityamukho
adityamukho deleted the fix/900-replace-chrono branch November 27, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0