Skip to content

Conversation

@ptomato
Copy link
Collaborator

@ptomato ptomato commented Oct 20, 2025

A group at the University of Bergen has done some work using an automated proof assistant on the type assertions in the spec text, and brought several issues to my attention. This PR fixes those issues.

The proof code is available at https://github.com/bldl/temporal-rocq

I recommend reviewing each commit separately.

Summary of the changes:

  • Adding type assertions to constrain UTC offset minutes and nanoseconds to their range of ±1 day (exclusive), and adding a Time Zone Identifier Parse Record to support this
  • Fixing a mistake in the type of the [[Days]] field of Time Record
  • Bringing the description of ISO Date Records in line with Time Records in terms of where the validity is described.

Thank you to @voiestad and @aria-eide.

ptomato and others added 5 commits October 23, 2025 11:48
This Record was previously anonymous. Introduce it as a specific Record
type in order to clarify the limits of the [[OffsetMinutes]] field and
that the two fields are mutually exclusive.

Since this type information is considered to be equivalent to
assertions, this allows removing some assertions and some descriptive
text from elsewhere.

Credit to Vebjørn Øiestad for discovering this.

Co-Authored-By: Vebjørn Øiestad <102312685+voiestad@users.noreply.github.com>
This should allow implementors to more easily pick the width of the
integer type used to represent these quantities.

Credit to Vebjørn Øiestad for discovering this.

Co-Authored-By: Vebjørn Øiestad <102312685+voiestad@users.noreply.github.com>
We have similar language in ISO Date-Time Record.
This field is not ≥ 0, as can be trivially verified by calling AddTime
with any Time Record and a time duration < -86400,000,000,000.

Credit to Vebjørn Øiestad and Aria Bjørnbakken Eide for discovering
this.

Co-Authored-By: Vebjørn Øiestad <102312685+voiestad@users.noreply.github.com>
Co-Authored-By: Aria Bjørnbakken Eide <179501967+aria-eide@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.91%. Comparing base (c8571ae) to head (b203fc9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3167   +/-   ##
=======================================
  Coverage   96.91%   96.91%           
=======================================
  Files          22       22           
  Lines       10209    10209           
  Branches     1839     1839           
=======================================
  Hits         9894     9894           
  Misses        266      266           
  Partials       49       49           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants