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
modified-block-currency self-gate flakes across midnight UTC: its two report renderings take the runner's per-invocation --as-of default instead of sharing one date #613
tests/doc-health/test_modified_block_currency_self_gate.py::test_the_report_moves_only_in_this_family_s_lines renders the doc-health report of the checkout TWICE (with and without --skip-family modified-block-currency) and asserts every section outside three permitted ones is byte-identical. Its _report() helper (:1412-1434 at c0270d28) builds the command
and passes NO aging reference date. The runner's --as-of flag (scripts/doc_health/runner.py:264-266) defaults to datetime.now(timezone.utc).date()at each invocation:
ap.add_argument("--as-of",
default=datetime.now(timezone.utc).date().isoformat(),
help="aging reference date (YYYY-MM-DD; default: today UTC)")
Each rendering takes roughly two and a half minutes. A run that straddles midnight UTC therefore gives the two renderings two different --as-of dates, the staged-candidate-aging section legitimately ages by a day between them, and the byte-identity assertion fails on a section the family under test never touched.
The test already guards ONE date dependency — _sections drops the dated report title and a guard asserts the title was there to drop — but the aging reference date is a second one it missed.
Evidence
openxFactory PR Name the forward MODIFIED obligation on 'Canonical credential record shapes' (#507) #599 (docs/507-record-shapes-forward-obligation, head a965a663): pytest-suite run 33697402937 started 2026-09-02T23:57:33Z, failed this test at ~00:18Z on 2026-09-03 with staged-candidate-aging reported as the section that moved; the in-place rerun passed (the run id now shows success), and the test passed in isolation on both that branch and clean origin/main.
Both PRs were docs-only or touched no doc-health code, and CI on main has never shown it — it can only fire in the roughly five minutes around 00:00Z.
Fix
Compute the reference date once in the test and pass --as-of <date> to BOTH renderings in _report(), so the two reports share one clock by construction rather than by luck. Nine sibling files under tests/doc-health/ already pass an as-of date (grep -l "as-of\|as_of" tests/doc-health/*.py), so this follows house precedent. While there, check the other double-rendering comparisons in that directory for the same omission.
No product code changes; the runner's default is right for operators.
Provenance
Found 2026-09-03 by lane openxfactory-smalls while driving PRs #599 and #604 through CI. Confirmed unfiled before opening.
CLAIMED — lane openxfactory-smalls, session 019SkomVcCsRnrwizM9DYUny, 2026-09-03T12:56Z, for the test fix (pass one shared --as-of to both renderings in _report(); sweep the sibling double-render comparisons). No PR or branch exists for it. Stale after 4h with no PR.
Activity
brettheap commentedon Sep 3, 2026
CLAIMED — lane openxfactory-smalls, session 019SkomVcCsRnrwizM9DYUny, 2026-09-03T12:56Z, for the test fix (pass one shared
--as-ofto both renderings in_report(); sweep the sibling double-render comparisons). No PR or branch exists for it. Stale after 4h with no PR.Lane: openxfactory-smalls
Pin one --as-of clock across the self-gate's two report renderings (#613
Record the landed gate numbers, and the one flake, in the packet's ow…
Give a drafted-but-unapproved packet a lawful origin shape: an ad_hoc…