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
{{ message }}
Repository navigation
id(world-doctor): clock check accepts absurd future readings — its doc promises a zero-or-absurd check but only zero is tested, so a clock set to year 2100 (or u64::MAX) reports ok #3004
id world doctor's clock check promises to catch an absurd clock reading but only checks that the reading is positive — a clock set years or millennia in the future reports ok.
pkgs/id/src/world_doctor.rs:399-411 — the doc comment on check_clock says: "The clock reads a positive unix time. A zero (or absurd) reading means the system clock is before the epoch, which breaks every schedule and expiry." The implementation is only:
match inputs.now_ms{Some(now)if now > 0 => ok("clock",format!("{now} ms since the epoch")),
_ => fail(/* ... */),}
No upper bound / absurdity check exists anywhere in the check.
The CLI feeds it the real system clock: pkgs/id/src/commands/world.rs:445 sets now_ms: Some(crate::time::unix_ms()).
Verified this run on the laptop with a verbatim copy of check_clock (world_doctor.rs md5 d82936864cfb68121393220ece88f98f, identical on both clones; probe ~/git/fleet/probe-2026-10-31-laneB-doctorclock/):
input
result
Some(0) / None
Fail (correct)
realistic 2026-10-31 ms
Ok
year 2100 (4102444800000 ms)
Ok
year 3000 (32503680000000 ms)
Ok
u64::MAX
Ok
Why it matters
Doctor exists to mechanically diagnose a broken world setup, and a mis-set clock is one of its six named checks. A far-future clock (bad RTC, mis-set VM/container clock — the classic failure this check is for) silently breaks the things the fix text itself names: schedules are bounded relative to now (MAX_SCHEDULE_HORIZON_MS, 30 days, world_caps.rs:99-101) and expiries compare against now, so a clock years ahead makes expiries instantly due and schedules un-settable — while id world doctor reports the clock check ok and sends the operator looking elsewhere. The module's other checks are carefully aligned with the code they diagnose (e.g. the journal check matches restore semantics, the profile check matches WorldExecutionProfile::resolve exactly); the clock check is the one whose implementation does not deliver what its own contract states.
Acceptance criteria
Triage pins the absurdity rule: the upper bound (e.g. a fixed sanity ceiling or a bound relative to a plausible range) and the severity (Fail vs Warn) for a beyond-bound reading, including what the detail/fix text should say for the future case (the current Fail text only covers "before the unix epoch").
check_clock implements the pinned rule; realistic current timestamps still report Ok, zero/None still Fail.
Unit tests in world_doctor.rs cover: zero, a realistic now, the pinned boundary, and a far-future value (year 2100 / u64::MAX class).
The doc comment and the implementation agree after the fix.
Dedup: no open or closed issue covers the doctor clock check (issue search for doctor/clock returned only #2093, the doctor journal disagreement — distinct check). NOT self-solved: the bound and severity are triage's pin.
agent-note:v1
state: filed
Found via: filed this run by new-issue-creator-code-b (Lane B). Verified on the laptop with a verbatim copy of check_clock (world_doctor.rs md5 d82936864cfb68121393220ece88f98f on both clones, main bd13798; probe ~/git/fleet/probe-2026-10-31-laneB-doctorclock/): zero/None Fail, realistic now Ok, year 2100 / year 3000 / u64::MAX all Ok despite the doc comment promising a zero-or-absurd check. NOT self-solved: the absurdity bound and severity are triage's pin.
Agent: queue worker (repo-worker-code), lane E shift
Session / ID: task 5515
Found via: queue claim
Task: Implementation complete and pushed: PR fix(aggregator): parse grouped SaaS metrics #4289 (branch queue/5515-3004-clock-bound, head 569729b65) adds ABSURD_FUTURE_NOW_MS and the boundary tests. Parked because the id workflow run (41416960232) is still QUEUED (runner backlog) and no Codex round has posted yet — the worker does not hold a claim while waiting on CI.
Lane C claimed task 5515 and parked it again — with one correction and one change since the last park. Correction: this task's PR is #4288 (branch queue/5515-3004-clock-bound, head 569729b, verified by branch lookup); the #4289 named in the task progress belongs to task 5505 (lane E already logged the same correction). Change: the diff and PR body check out (ABSURD_FUTURE_NOW_MS = 2100-01-01 bound, boundary test at bound-1 / bound / u64::MAX), the PR is mergeable, and there are no Codex findings — but the test has still never passed anywhere: the laptop cargo run was interrupted by an SSH drop and CI run 41416960232 remains queued (runner backlog). Laptop load briefly fell below the gate (3.97/13.56/38.07 at 09:44Z) but spiked back to 117/107/76 before a compile could run. Parked 1h; resume when CI completes green or a sustained low-load window allows cargo test --lib world_doctor, then merge PR #4288 and close #3004.
Activity
dezren39 commentedon Oct 31, 2026
agent-note:v1
state: filed
Found via: filed this run by new-issue-creator-code-b (Lane B). Verified on the laptop with a verbatim copy of check_clock (world_doctor.rs md5 d82936864cfb68121393220ece88f98f on both clones, main bd13798; probe ~/git/fleet/probe-2026-10-31-laneB-doctorclock/): zero/None Fail, realistic now Ok, year 2100 / year 3000 / u64::MAX all Ok despite the doc comment promising a zero-or-absurd check. NOT self-solved: the absurdity bound and severity are triage's pin.
15 remaining items
dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked
queue/5515-3004-clock-bound, head569729b65) addsABSURD_FUTURE_NOW_MSand the boundary tests. Parked because theidworkflow run (41416960232) is still QUEUED (runner backlog) and no Codex round has posted yet — the worker does not hold a claim while waiting on CI.cargo test --lib world_doctorverification was interrupted by an SSH drop mid-compile, so CI is the test record.dezren39 commentedon Nov 2, 2026
🤖 Agent note · correction (lane E shift, post-shift)
queue/5515-3004-clock-bound, head569729b65) — not PR fix(aggregator): parse grouped SaaS metrics #4289 as my earlier park note said (PR fix(aggregator): parse grouped SaaS metrics #4289 is task 5505's aggregator PR; the wrong number came from a mismatched tool output during the shift). All other park details stand: resume by reading PR fix(id): fail world doctor clock check at or after 2100-01-01 (#3004) #4288's checks + Codex findings fresh, merge when green, close issue id(world-doctor): clock check accepts absurd future readings — its doc promises a zero-or-absurd check but only zero is tested, so a clock set to year 2100 (or u64::MAX) reports ok #3004, complete task 5515.dezren39 commentedon Nov 2, 2026
agent: repo-worker-code (lane C)
state: parked
task: 5515
issue: 3004
pr: 4288
Lane C claimed task 5515 and parked it again — with one correction and one change since the last park. Correction: this task's PR is #4288 (branch queue/5515-3004-clock-bound, head 569729b, verified by branch lookup); the #4289 named in the task progress belongs to task 5505 (lane E already logged the same correction). Change: the diff and PR body check out (ABSURD_FUTURE_NOW_MS = 2100-01-01 bound, boundary test at bound-1 / bound / u64::MAX), the PR is mergeable, and there are no Codex findings — but the test has still never passed anywhere: the laptop cargo run was interrupted by an SSH drop and CI run 41416960232 remains queued (runner backlog). Laptop load briefly fell below the gate (3.97/13.56/38.07 at 09:44Z) but spiked back to 117/107/76 before a compile could run. Parked 1h; resume when CI completes green or a sustained low-load window allows
cargo test --lib world_doctor, then merge PR #4288 and close #3004.dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up
fix(id): fail world doctor clock check at or after 2100-01-01 (#3004) (…
dezren39 commentedon Nov 2, 2026
🤖 Agent note · done
check_clockin pkgs/id/src/world_doctor.rs now fails readings at/after 2100-01-01 (ABSURD_FUTURE_NOW_MS), closing issue id(world-doctor): clock check accepts absurd future readings — its doc promises a zero-or-absurd check but only zero is tested, so a clock set to year 2100 (or u64::MAX) reports ok #3004.cargo test --lib world_doctoron the laptop at head 569729b — all world_doctor tests pass, including the new boundary testa_clock_at_or_after_2100_fails. Codex review on that head completed with no findings. The PR's id CI stayed queued ~2h (runner backlog), so the laptop run is the verification of record. (The laptop test process later aborted on an unrelated cli parse test's stack overflow — the pre-existing libtest issue filed as id(test): test_cli_parse_world_new_and_stats stack-overflows under default libtest stack — abort hides all lib test results #4327; every world_doctor test had already reported ok.)