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
fleet-queue(fallback): parse_ts accepts impossible dates — Feb 31 / non-leap Feb 29 / Apr 31 silently roll into the next month and shift marker lease math by days #6667
parse_ts in the queue fallback mode (pkgs/fleet/crates/fleet-queue/src/fallback.rs:151-158) validates the day field only as 1..=31, regardless of month or leap year. Impossible dates are accepted and silently normalized by days_from_civil into a different real date, shifting the parsed epoch by days:
2026-02-31T00:00:00Z → parses as 2026-03-03
2026-02-29T00:00:00Z (2026 is not a leap year) → parses as 2026-03-01
2026-04-31T00:00:00Z → parses as 2026-05-01
Marker timestamps are authoritative for all lease math in fallback mode ("The marker's own embedded ts is authoritative — comment metadata is never consulted for lease math", fetch_markers doc), and parse_marker accepts any marker whose ts parses. So a claim/heartbeat marker stamped with an impossible date gets a silently shifted activity time — up to ~3 days of phantom lease — instead of being rejected as malformed the way a month-13 timestamp already is (ts_round_trip pins 2026-13-06 → None, but no impossible-day case).
Evidence
Verified on the laptop against origin/main @5492f27e02 (probe ~/git/fleet/probe-fallback-contest, real fallback.rs included verbatim, parse_ts/format_ts called directly):
Fallback markers are the claim state: a misparsed ts moves last_activity, which decides Live vs Stale, supersede, and contest outcomes. Every other malformed-marker shape (bad month, bad hour, unparseable text) is rejected as "not a marker at all" precisely so near-misses never move claim state — impossible days are the one shape that slips through and actively moves it in the wrong direction.
Acceptance criteria
parse_ts returns None for day-of-month values that do not exist in the given month/year (Feb 29 on non-leap years, Feb 30/31, Apr/Jun/Sep/Nov 31), while still accepting 2024-02-29 and all valid dates.
ts_round_trip (or a sibling test) gains the impossible-date cases above.
Round-trip property preserved: parse_ts(format_ts(e)) == Some(e) for the existing epoch set.
Task: Small fix: make fallback parse_ts reject day-of-month values that do not exist in the given month/year instead of normalizing them into the next month.
Expectation: effort/xs — done when parse_ts returns None for Feb 29 (non-leap)/Feb 30-31/Apr 31, 2024-02-29 still parses, and ts_round_trip gains the impossible-date cases.
Links: probe ~/git/fleet/probe-fallback-contest (laptop, real fallback.rs verbatim @5492f27e02)
Picked up by repo-worker-code-q — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-q posts progress markers; after 30 minutes of silence any other worker may pick this up.)
🤖 Agent note · picked up
Agent: queue worker (repo-worker-code), lane code-q
Picked up by repo-worker-code-l — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-l posts progress markers; after 30 minutes of silence any other worker may pick this up.)
🤖 Agent note · picked up (resume of parked work)
Agent: queue worker (repo-worker-code), lane code-l
Task: resume, do not restart: verify PR fix(fleet-queue): parse_ts rejects impossible dates #6684 fresh (diff + fleet-queue tests re-run on laptop), disposition the still-pending PR-tier checks under the standing merge criteria, merge if verified, complete the release
Progress from repo-worker-code-l: resumed: PR #6684 verified as a single-file change (fallback.rs +70/-1, fix 9df8a5e + property tests 234e448); Codex on head clean (no findings, none unresolved); re-running cargo test -p fleet-queue --features client on the laptop before merging under the standing criteria (scripts-test still pending in the runner backlog)
Released by repo-worker-code-l (outcome: done). Issue #6667 FIXED and merged (resume of lane code-q's parked work): PR #6684#6684 merged be4040c (fix 9df8a5e + property tests 234e448 by lane code-q). parse_ts now validates the day against the real month length with the Gregorian leap rule, so impossible dates (Feb 31, non-leap Feb 29, Apr 31) return None instead of rolling into the next month and shifting fallback lease math. Resume verification by this lane: Codex review on head 234e448 completed with no findings and none unresolved; cargo test -p fleet-queue --features client re-run on the laptop at the PR head: 40 passed / 0 failed (EXIT:0), matching the parked evidence. PR-tier scripts-test was still pending in the runner backlog at merge — merged under the standing merge criteria with locally re-verified tests. Issue auto-closed by the PR.
🤖 Agent note · done (resumed and completed)
Agent: queue worker (repo-worker-code), lane code-l (fix + PR by lane code-q, parked awaiting CI; resumed and completed by lane code-l)
Activity
developing-today commentedon Nov 7, 2026
CODE-2064
dezren39 commentedon Nov 7, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 7, 2026
Picked up by
repo-worker-code-q— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-code-qposts progress markers; after 30 minutes of silence any other worker may pick this up.)🤖 Agent note · picked up
6 remaining items
dezren39 commentedon Nov 7, 2026
Picked up by
repo-worker-code-l— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-code-lposts progress markers; after 30 minutes of silence any other worker may pick this up.)🤖 Agent note · picked up (resume of parked work)
dezren39 commentedon Nov 7, 2026
Progress from
repo-worker-code-l: resumed: PR #6684 verified as a single-file change (fallback.rs +70/-1, fix 9df8a5e + property tests 234e448); Codex on head clean (no findings, none unresolved); re-running cargo test -p fleet-queue --features client on the laptop before merging under the standing criteria (scripts-test still pending in the runner backlog)dezren39 commentedon Nov 7, 2026
Released by
repo-worker-code-l(outcome: done). Issue #6667 FIXED and merged (resume of lane code-q's parked work): PR #6684 #6684 merged be4040c (fix 9df8a5e + property tests 234e448 by lane code-q). parse_ts now validates the day against the real month length with the Gregorian leap rule, so impossible dates (Feb 31, non-leap Feb 29, Apr 31) return None instead of rolling into the next month and shifting fallback lease math. Resume verification by this lane: Codex review on head 234e448 completed with no findings and none unresolved; cargo test -p fleet-queue --features client re-run on the laptop at the PR head: 40 passed / 0 failed (EXIT:0), matching the parked evidence. PR-tier scripts-test was still pending in the runner backlog at merge — merged under the standing merge criteria with locally re-verified tests. Issue auto-closed by the PR.🤖 Agent note · done (resumed and completed)
fix(fleet-queue): validate not_before at packet, client, and broker l…