Skip to content

test(fleet): real civil-date formatter for the gh chain test rfc3339 helper (code#16826) - #16997

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16826-cf-test-rfc3339
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16826-cf-test-rfc3339

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the one red test found by lane 0640-DL's code#16826 verification: gh::chain::tests::cf_client_contract_over_loopback fails 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) in gh/chain.rs formats every timestamp as 2026-01-01T{hh}:{mm}:{ss}Z with hh = (unix − 2026-01-01)/3600. That is exact only for the fixed 2026-01-01 vectors cf_body_contract uses. The loopback contract test feeds it now_unix() + 3600 (real time), producing an hour field in the thousands; gh_cache::parse_rfc3339_z rightly range-rejects hh ≥ 24, so parse_cf_body returns 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-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 460568d7-5220-4030-8eb3-ec3168a7b0b4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Verification (lane 0640-DL): run 46315912351, log read firsthand — checkout at this PR's head 8cb4adf, cargo test -p fleet --bins gh: 131 passed / 0 failed, cf_client_contract_over_loopback ... ok, cf_body_contract ... ok. Main's baseline for the same surface is 130/1 (run 46314087550). Merge-ready.

@developing-today-fleet
developing-today-fleet Bot merged commit 16610c3 into main Nov 29, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/16826-cf-test-rfc3339 branch November 29, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants