You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The checker exposes zero-argument time.now_ms() -> int64 and time.now_s() -> int64 builtins, and the shared interpreter reads SystemTime::now() directly. These calls have no Clock parameter, are treated as pure, and can execute in verify blocks; the current fixture verifies host-clock-dependent thresholds. Before the Unix epoch the interpreter silently returns zero, while large unsigned durations are cast to int64 without a checked range policy. There is no stdlib/time.jett, no Clock.now implementation, and no dedicated time/Clock tracker.
The design and architecture instead describe Clock.now(view clock), Time, Timestamp, Duration, date formatting/arithmetic helpers, and platform-specific runtime lowering. The relationship between that intended surface and the current builtins is not defined.
Scope
This issue selects and documents the time boundary before implementation. It includes the canonical current-time entry point; Clock ownership and purity rules; wall-clock versus monotonic semantics; epoch, precision, range, and failure behavior; the relationship among Time, Timestamp, and Duration; deterministic testing and verify/comptime policy; compatibility for time.now_ms and time.now_s; and the source-defined versus runtime-backed split.
It does not implement the full calendar/timezone library, scheduler timers, async sleep, or native code generation. Those should be staged as separate implementation work after the contract is selected.
Acceptance criteria
One canonical current-time API and compatibility policy for time.now_ms / time.now_s are selected.
Wall-clock and monotonic use cases, units, epoch, precision, range, and pre-epoch/overflow behavior are specified.
The Time, Timestamp, and Duration value model is defined or the unused spellings are retired.
Clock capability ownership, interpreter/runtime injection, purity, and verify/comptime rules are specified.
The minimum runtime-backed kernel and source-defined time helper boundary is documented, with deferred calendar/timezone work explicit.
Focused implementation/test slices and future-backend handoff are identified.
docs/design.md, docs/architecture.md, and docs/progress.md are aligned with the decision while the originating documentation remains in place.
Dependencies / open questions
Coordinate deterministic capability testing with #67. Future native lowering remains downstream of the HIR and MIR work tracked by #20 and #22.
This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.
Summary
Define the canonical current-time API, value model, and
Clockcapability boundary before extending or extracting thetimemodule.Source documentation
docs/progress.md, Phase K: Full Standard Library recordstime.now_msandtime.now_sas the partial current surface.docs/design.md, date and time examples instead useClock.now(view clock)withTimeandDurationplus higher-leveltime.*helpers.docs/design.md, Rule Set 16 definesClockas the capability for reading current time and requires effects to be explicit.docs/architecture.md, capability analysis requires capability-free functions and verify blocks to remain pure.docs/architecture.md, standard library describestime.formatas source-defined andClock.nowas runtime-backed.Current state
The checker exposes zero-argument
time.now_ms() -> int64andtime.now_s() -> int64builtins, and the shared interpreter readsSystemTime::now()directly. These calls have noClockparameter, are treated as pure, and can execute in verify blocks; the current fixture verifies host-clock-dependent thresholds. Before the Unix epoch the interpreter silently returns zero, while large unsigned durations are cast toint64without a checked range policy. There is nostdlib/time.jett, noClock.nowimplementation, and no dedicated time/Clock tracker.The design and architecture instead describe
Clock.now(view clock),Time,Timestamp,Duration, date formatting/arithmetic helpers, and platform-specific runtime lowering. The relationship between that intended surface and the current builtins is not defined.Scope
This issue selects and documents the time boundary before implementation. It includes the canonical current-time entry point;
Clockownership and purity rules; wall-clock versus monotonic semantics; epoch, precision, range, and failure behavior; the relationship amongTime,Timestamp, andDuration; deterministic testing and verify/comptime policy; compatibility fortime.now_msandtime.now_s; and the source-defined versus runtime-backed split.It does not implement the full calendar/timezone library, scheduler timers, async sleep, or native code generation. Those should be staged as separate implementation work after the contract is selected.
Acceptance criteria
time.now_ms/time.now_sare selected.Time,Timestamp, andDurationvalue model is defined or the unused spellings are retired.Clockcapability ownership, interpreter/runtime injection, purity, and verify/comptime rules are specified.timehelper boundary is documented, with deferred calendar/timezone work explicit.docs/design.md,docs/architecture.md, anddocs/progress.mdare aligned with the decision while the originating documentation remains in place.Dependencies / open questions
Coordinate deterministic capability testing with #67. Future native lowering remains downstream of the HIR and MIR work tracked by #20 and #22.
This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.