Repository navigation
fix(glue): count prints on the printer's clock when it runs behind (Refs #770) - #775
Merged
Merged
Conversation
alex-mextner
force-pushed
the
fix/770-printer-clock-skew
branch
from
November 18, 2026 11:18
7edefb5 to
8a8b20f
Compare
2 tasks
Owner
Author
|
Acceptance proof for #770 (head of this PR): Criterion 1: |
2 tasks done
alex-mextner
force-pushed
the
fix/770-printer-clock-skew
branch
from
November 18, 2026 13:42
8a8b20f to
8ac3369
Compare
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.
Moonraker job start times are on the printer's clock; the glue time is on this computer's. The history reader now reads the printer clock from the first history reply's Date header. A printer behind by more than the Date rounding (2 s) moves the glue cutoff onto the printer clock and re-reads the history from there (one shared 15 s deadline; a failed second read keeps the first read's jobs and failure). A printer ahead keeps the host cutoff, so a clock that jumped after the glue cannot hide prints. A skew over a minute makes the count an estimate (~N) with a note shown by
3d glue status: "the printer clock is 1h 00m behind this computer's; the count may include prints from up to 1h 00m before the glue".Regression tests: printer one hour behind (5 prints counted, ~5 with the note), one hour ahead, within a minute (exact), Date-rounding, failed/metric-less second read, shared deadline, malformed/overflowing Date.
Refs #770