Skip to content

fix: synced() stays true once the network has set the clock (release 0.10.2) - #59

Merged
genmon merged 2 commits into
mainfrom
fix/synced-stays-set
Oct 6, 2026
Merged

genmon merged 2 commits into
mainfrom
fix/synced-stays-set

Conversation

@genmon

@genmon genmon commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

time.synced() and datetime.synced() compared ezTime's status with timeSet.

The bug: ezTime drops to timeNeedsSync when an NTP refresh is overdue (about 90 minutes). On a network that blocks NTP, Courier sets the clock from the HTTP Date header, so about 90 minutes after boot an app saw the clock turn unsynced while it was running fine.

The fix: both calls now share clockSynced(), which means the clock has been set at least once (timeStatus() != timeNotSet), from either source. "Synced" means the network has set the clock; which way it did doesn't matter. The same fix is in Courier: inanimate-tech/courier#38.

Tests: the test stub's ezTime gains a stale state (timeNeedsSync). A new test in each module checks that a stale clock is still synced, and both fail on the old check. Unit tests pass 271/271, and static analysis is clean.

Also: prompts/sandbox.md now says "until the network sets the clock" instead of "until NTP". arc's verbatim copy of that sheet follows when it next pins Resident.

Changelog: v0.10.2-dev.

🤖 Generated with Claude Code

genmon and others added 2 commits October 6, 2026 16:00
time.synced() and datetime.synced() compared ezTime's status with timeSet.
ezTime drops to timeNeedsSync when an NTP refresh is overdue (~90 min), so
on a network that blocks NTP — where Courier sets the clock from the HTTP
Date header — an app saw the clock turn unsynced an hour and a half after
boot while it ran on. Both now share clockSynced(): set at least once
(timeStatus() != timeNotSet), from either source.

The test stub's ezTime gains `stale` (timeNeedsSync); a test in each module
checks a stale clock is still synced, and both fail on the old check.
prompts/sandbox.md: "until the network sets the clock", not "until NTP".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@genmon genmon changed the title fix(time): synced stays true once the network has set the clock fix: synced() stays true once the network has set the clock (release 0.10.2) Oct 6, 2026
@genmon
genmon merged commit ecabf22 into main Oct 6, 2026
4 checks passed
@genmon
genmon deleted the fix/synced-stays-set branch October 6, 2026 17:05
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.

1 participant