Skip to content

test(self-update): compare install budgets with pytest.approx - #12

Merged
ra-co88 merged 1 commit into
developfrom
fix/self-update-budget-float
Oct 12, 2026
Merged

ra-co88 merged 1 commit into
developfrom
fix/self-update-budget-float

Conversation

@ra-co88

@ra-co88 ra-co88 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Test-only fix for a CI flake inherited from upstream (956e789).

_run_managed_upgrade computes the cold-target install budget as fallback_deadline - time.monotonic() with fallback_deadline = now + 900. In floats, (now + 900) - now can be 899.9999999999999 when time.monotonic() is large, so the exact budgets == [90, 900] assertion fails intermittently (seen on #9 CI).

Change: compare with pytest.approx. No production code touched.

Verification: ruff format/check clean; pytest tests/unit/infra/setup/test_self_update.py -k cold_target 4 passed.

Upstream candidate: same assertion exists on upstream/develop.

The cold-target budget is computed as (deadline - now) in float seconds and
can land one ULP under 900 when time.monotonic() is large, failing the exact
list comparison on long-running CI hosts (899.9999999999999 != 900).
Inherited from upstream 956e789.
@ra-co88
ra-co88 merged commit c43eb77 into develop Oct 12, 2026
3 checks passed
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.

1 participant