Repository navigation
Status, the login prompt and the launcher say when the clock reads more than a day before the newest statement, which would refuse every newer one - #320
Merged
Conversation
…re than a day before the newest statement, which would refuse every newer one
DevomB
marked this pull request as ready for review
October 9, 2026 19:56
This was referenced Oct 9, 2026
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.
What was wrong (3a's whole-picture read, LOW 1)
A clock behind the newest accepted statement silenced the 30-day report, and every newer statement was then refused without anyone being told.
staleness(update.rs:149-152) counts a clock behindissuedas zero days.stale_linesaid nothing, andstatussaid "stated 0 day(s) ago".update.rs:137-139). That reply goes only to the net zone (broker.rs:242-245).Two ways a clock gets there:
time.rs:247-255): the build date or the committed release, both earlier than a statement the channel re-signs daily. If the user then misses or declines the clock question, updates stop with nothing said.update-channel.mdsaid the report "needs a clock the net zone cannot set", which stops being true after one consent.What changed
update.rs:MAX_AHEAD_SECS) before the newest accepted statement, or, with none, before the install,stale_linesays "no statement from the release key can be accepted while this machine's clock reads N days before the newest one it accepted: set the clock" ("... before its install: ..." for the second).statusprints that line and gives the statement as "dated N day(s) after this machine's clock" in place of "stated 0 day(s) ago".stale_line's, so it says it too. The launcher shows any status line that starts "no statement from the release key", so it does as well, with no change to the chrome.statusnow takes its indented line fromstale_linefor both the statement and the install.Not done: the statement as a floor, 3a's stronger option.
docs/design/time.mdrejects it: the statement key is online, and a stolen one could walk the clock forward a day at a time.How the run proves it
a_clock_behind_the_newest_is_said(update/tests.rs):stale_line, instatusand in the login notice;On the old code
stale_linereturnsNonefor all of these.The update suite's network step (
update-test.sh) is now longer. After the aged-statement checks it moves the guest's clock 3 days back and restarts the launch service. Then it needs:BEHIND-OK);kryptik update statussaying the same;SET-RIGHT-OK).On the old code no notice comes, and the drive fails at
BEHIND-OK.CI's compartment job runs the unit test, and a Distro run follows on this head.
After 3a's read of 7a5dd4d (clear, three INFOs):
install.json's mtime, which is the medium's clock and is not signed. A machine installed with its RTC set days ahead, whose clock is later put right, is told to set the clock until its first statement is accepted. That is kept as a limit. The common case this branch catches is a dead RTC: it starts at the floor, which is the build date and so before the install, and then refuses every statement, with nothing said.