Repository navigation
test(fleet): real civil-date formatter for the gh chain test rfc3339 helper (code#16826) - #16997
Merged
Merged
Conversation
…atter (code#16826)
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
6 tasks
Contributor
Author
|
Verification (lane 0640-DL): run 46315912351, log read firsthand — checkout at this PR's head 8cb4adf, |
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.
Fixes the one red test found by lane 0640-DL's code#16826 verification:
gh::chain::tests::cf_client_contract_over_loopbackfails on main, deterministically, twice (runs 46314087550 and 46315064749, the second with NO_PROXY set — not an executor/proxy artifact).Root cause — test-side, production code is correct. The tests-module helper
rfc3339(unix)ingh/chain.rsformats every timestamp as2026-01-01T{hh}:{mm}:{ss}Zwith hh = (unix − 2026-01-01)/3600. That is exact only for the fixed 2026-01-01 vectorscf_body_contractuses. The loopback contract test feeds itnow_unix() + 3600(real time), producing an hour field in the thousands;gh_cache::parse_rfc3339_zrightly range-rejects hh ≥ 24, soparse_cf_bodyreturns BadBody and the unwrap at chain.rs:609 panics.Fix (test-only, one file, +23/−6): the helper becomes a real civil-date formatter — Hinnant's civil_from_days, the exact inverse of the parser's days_from_civil. Verified against reference timestamps (2026-01-01 vectors, current time, epoch, a leap day) before landing;
cf_body_contract's round-trip assertions are unaffected by construction.Authored via the Git Data API (seat disk quota exhausted); the commit diff was verified through the compare API (one file, test module only). A verification run against this branch is dispatched by the lane and its executed counts will be recorded on code#16826.
Refs code#16826. Felix lane 0640-DL.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.