Repository navigation
Description
Problem or Motivation
tests/roadmap/test_roadmap_alternatives.py::test_the_row_sends_the_gauges_for_a_round_with_every_check_current (tests/roadmap/test_roadmap_alternatives.py:3778) fails on main starting 2026-11-28 (CI Quality Gate run 46145570860 and local uv run devops ci test tests/roadmap/test_roadmap_alternatives.py: 1 failed, 197 passed).
The test calls _mark_checked(store, _item(store, "Checked"), days=0), which sets checked_at to NOW (datetime(2026, 10, 29, 12, 0, tzinfo=UTC) at tests/roadmap/test_roadmap_alternatives.py:95), and then calls _alternatives_row().runner(store=store, repo=REPO) without freezing the clock (@time_machine.travel(NOW, tick=False)). Because 2026-11-28 is 30 days after 2026-10-29, the runner sees the check as due for recheck (recheck_days=30), calls the model, and script.seen is non-empty instead of [].
Proposed Solution & Architectural Design
Decorate test_the_row_sends_the_gauges_for_a_round_with_every_check_current (and check any sibling gauge tests in tests/roadmap/test_roadmap_alternatives.py:3758-3805 that use _mark_checked with NOW) with @time_machine.travel(NOW, tick=False).
Acceptance Criteria
-
uv run devops ci test tests/roadmap/test_roadmap_alternatives.pypasses with real wall-clock time at or after2026-11-28.
Proposed design
Problem statement
The alternatives gauge test marks a check at NOW and then runs the row without a frozen clock. On a wall-clock date at or after 2026-11-28, the check is 30 days old. The runner calls the model, so script.seen is not empty. The fix freezes the clock at NOW for the gauge test and each sibling gauge test in the same block that uses the same pattern.
Acceptance criteria
Requirement: Freeze the gauge tests
The gauge test at tests/roadmap/test_roadmap_alternatives.py:3778 and each sibling gauge test in 3758-3805 that calls _mark_checked with NOW MUST run with the clock frozen at NOW.
Scenario: The alternatives gauge tests run
- WHEN
uv run devops ci test tests/roadmap/test_roadmap_alternatives.pyruns. - THEN The command passes and reports no failed test.
Requirement: Pending a person after the merge
The alternatives test module MUST pass on main with the real wall clock at or after 2026-11-28.
Scenario: The Quality Gate runs after the recheck window
- WHEN The CI Quality Gate runs on
mainat or after2026-11-28. - THEN
uv run devops ci test tests/roadmap/test_roadmap_alternatives.pypasses and reports no failed test.
Existing Tool Considered
No alternatives check has run. The open, maintained time-machine library covers the need to freeze the clock at NOW: tests/roadmap/test_roadmap_alternatives.py already imports time_machine and uses @time_machine.travel(NOW, tick=False) in other tests. The proposal reuses this library and adds no custom clock code. It lacks nothing for this test.
Key questions
- How should the gauge test keep its check current?: Freeze the clock at
NOWwith@time_machine.travel(NOW, tick=False). (best practice) [sources: tests/roadmap/test_roadmap_alternatives.py:95, tests/roadmap/test_roadmap_alternatives.py:162, tests/roadmap/test_roadmap_alternatives.py:3778]- Chosen: Freeze the clock at NOW.
_mark_checked(days=0)writeschecked_atatNOW. The file already importstime_machineand uses this decorator. - Rejected: Change
recheck_daysin the test. This changes a product setting and hides the stale-check behavior. - Rejected: Use a relative check time. The
NOWand_days_agohelpers already define the instant. A relative time adds code and no value.
- Chosen: Freeze the clock at NOW.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 28, 2026
The test failure on main causes CI to fail, which is a P0 condition.The failed run 46145570860 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.Both address tests that read the wall clock without freezing it, but #1320 is the umbrella for all 84 modules while this candidate fixes one specific gauge test.devops-cli-service commentedon Nov 28, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 28, 2026
Released in v0.233.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.233.0
devops-cli-service commentedon Nov 28, 2026
Live since 2026-11-28 17:56 UTC