Repository navigation
[FIX] Keep an offset deadline's written date in the cockpit - #144
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
puretensor
force-pushed
the
grok/review/deadline-civil-date
branch
from
October 25, 2026 06:14
b93ff85 to
bf3b8e2
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.
Seat: grok-4.7 / xhigh (adversarial review wave 7, 2026-10-25)
Category: [FIX]
Problem / Opportunity:
pt servebuildsdeadline_datefor/api/tasksand/api/timelineby converting the timestamp to UTC and then reading that UTC calendar day. The Python sidecar's_parse_deadlineusesdatetime.date(), which is the date written on the timestamp.2026-10-26T00:30:00+01:00is 26 October at that offset and 23:30 UTC on 25 October, so the two cockpits disagree. The day count is already an instant delta and is left alone.Evidence: Sidecar, this session:
Unfixed
parse_deadline, before the function change (/tmp/ptask-deadlineat1a80d2aplus the new test only):jiff will not parse an offset timestamp as
Zonedwithout a[Time/Zone]annotation, so the written date cannot be recovered by parsingZonedand then skipping the UTC fold. From jiff 0.2.24src/fmt/temporal/pieces.rs(the crate this repo already pins):The date is the leading
YYYY-MM-DDonceparse_iso_to_utchas accepted the string. AZtimestamp's leading date is the UTC date, which is what the existing sidecar test locks (2026-01-01T09:00:00Z→2026-01-01).Change: After a successful parse,
deadline_dateis that leading civil date when it is a real date. Otherwise it stays the UTC dateparse_iso_to_utcalready returned (SQLiteYYYY-MM-DD HH:MM:SSand the char-safe fallback).days_untilis still the instant delta. Date-only deadlines stay on the operator-timezone day count. Version 3.51.6 in the workspace package, the six internal requirements,Cargo.lock, anddocs/gen/pt.1.Verification: Toolchain 1.98.1, on this branch:
The workspace suite and the Python sidecar suite were not re-run. The sidecar function was not changed.
deadline_datechanges only for a timestamp whose written date is not the UTC date.days_until, date-only deadlines, andZtimestamps are unchanged. Revert is one commit.