Repository navigation
Sync: leave out a report too old for the wire, never misdate it - #106
Merged
Merged
Conversation
A report's time travels as a 32-bit millisecond offset from the send time, about 24.8 days either side. A report outside that was clamped and arrived with a wrong time; it is now left out, and the engine logs it. The engine tests' reports were dated 2026-09-24, so once that was more than 24.8 days ago nodes_share_one_picture_under_one_number failed on main. They are now dated noon yesterday. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 2026
phornstein
added a commit
that referenced
this pull request
Oct 22, 2026
Follow-ups to #106 from review: - Reports too far from now for the wire are left out before the sync byte budget is charged, so current reports are not deferred for bytes never sent. - They are logged at most once a minute, with a count and a few tracks, so replaying old data does not flood the log. - The engine tests' t0 is computed once per run, so a run across midnight UTC keeps one time. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
rustcheck, which has failed onmainsince Oct 20.Cause. In the sync wire format (
ot-sync/src/wire.rs) a report's time is a 32-bit millisecond offset from the message's send time, about ±24.8 days. Older or newer times were silently clamped, so the receiving node got a wrong time. The engine tests used fixed report times starting 2026-09-24. Once that was more than 24.8 days ago,nodes_share_one_picture_under_one_numberfailed every run. On the dev server it passes with times 24 days old and fails at 25.Changes
wire::report_time_fits.encode_reportsleaves out a report whose offset doesn't fit, instead of clamping it. The wire format is unchanged.Engine::sync_flushlogs a warning naming the tracks it leaves out.t0()is now noon UTC yesterday, so test times can't go stale.Gate (dev server):
cargo fmt --check,cargo clippy --workspace --all-targets -D warningsandcargo test --workspaceall pass. ot-server: 227/227.🤖 Generated with Claude Code