Repository navigation
test(cache-metrics): Pin the paginated cache URL the caller sends (#962) - #2634
Merged
Merged
Conversation
The gh mock matched the bare '/actions/caches?' prefix, so it accepted a cache read with no pagination marker. Match the exact URL the caller sends (per_page=100) and assert --paginate/--slurp, so a future change that drops pagination fails the test instead of silently undercounting. Clears the [CACHE-033] ci-lint precheck finding.
zackees
enabled auto-merge
October 27, 2026 13:24
Member
Author
|
Handed off to the coordinator. Test-only, based on current |
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.
Refs #962. Clears one
ci-lint precheckVIOLATIONagainstci/test_cache_metrics.py.RED
ci-lint precheckonmaster(pina1917ce7…, the pin inci.toml) reports:The finding lands on the test's
ghmock, whose match string is the bare prefix"/actions/caches?". The real reader (ci/cache_metrics.py:332) already paginates —gh("api", f"repos/{repo}/actions/caches?per_page=100", "--paginate", "--slurp")— but themock accepted any cache URL, so nothing in the test held the caller to that contract.
GREEN
Commit
c85ae6565makes the mock match the exact URL the caller sends(
/actions/caches?per_page=100) and assert--paginateand--slurpare present, so afuture change that drops pagination fails the test instead of silently undercounting.
Test-only; no
docs/features.mdline.