Repository navigation
ci(drift): pin the decorative-guard budget and wire the cache-key guard - #1933
Merged
Merged
Conversation
KNOWN_UNWIRED documented a list that "can only shrink" but had no count, so both of its tests stayed green when a brand new ci/test_*.py was allowlisted: the name existed and it was, of course, still unwired. A ratchet whose entries can be added with no justification is not a ratchet. MAX_UNWIRED = 6 now pins the budget (test_unwired_budget_never_grows), and the list shrinks by wiring ci.test_setup_soldr_cache_keys into the drift registry — the guard for the cache-key collision class behind #1843 (two jobs sharing one immutable cache entry, so the smaller save owns it). Verified RED: with the old suite a freshly added ci/test_zzz_decorative.py + allowlist entry passed; with the budget pin the same tree fails naming the regrowth.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
Why
ci/local_suites.py'sKNOWN_UNWIREDdocstring claims the list "can only shrink". It has no count, so both of its tests stay green when a brand newci/test_*.pyis added to it: the name exists on disk, and it is (of course) still unwired. A ratchet whose entries can be added with no justification is not a ratchet — the same defect class already fixed for gate scripts byMAX_UNTESTED(ci/test_gate_script_coverage.py).What
MAX_UNWIRED = 6inci/local_suites.pyplustest_unwired_budget_never_growsinci/test_local_suites.py, mirroring theMAX_UNTESTEDbudget shape (message tells you to wire the module, not to add a name).ci.test_setup_soldr_cache_keysis now inDRIFT_UNITTEST_MODULESand named by the drift workflow's hosted-independence step. It is the guard for the cache-key collision class behind setup action: fbuild cache restore-keys fallback crosses fbuild versions and doubles the saved cache #1843/fix(ci): upgrade fbuild over a prefix-restored install cache in setup action #1842 (two jobs on the same runner OS sharing one immutable cache entry, so whichever saves first — the 166 MB fbuild-python job, not the 479 MB Check job — owns it), it needs onlypyyaml, and until now nothing invoked it.KNOWN_UNWIRED7 → 6.Wiring via
DRIFT_UNITTEST_MODULESalso covers the native gate:ci/local_gate.pyruns*LOCAL_UNITTEST_MODULES, andtest_local_suitesasserts the drift step command equals the registry verbatim, so the workflow cannot drift from it.Evidence (real output)
python -m unittest ci.test_local_suites→ 7 tests OK (6 before; +1 budget test).Ran 380 tests in 17.9s/OK, rc 0.ruff checkon both touched modules →All checks passed!python ci/render_workflows.py --check→ rc 0;python ci/check_python_complexity.py→All checks passed!ci/test_zzz_decorative.py+ allowlist entry →Ran 6 tests … OK(the gap, demonstrated).AssertionError: 7 not less than or equal to 6 : a new decorative guard was allowlisted instead of wired….FAILED (failures=1)ontest_drift_workflow_step_matches_registry.FAILED (failures=1)ontest_local_gate_runs_the_registry_plus_local_only.No product code touched;
untested/MAX_UNTESTEDunmoved.