Skip to content

ci(drift): pin the decorative-guard budget and wire the cache-key guard - #1933

Merged
zackees merged 1 commit into
mainfrom
agent/wire-unwired-guards
Nov 6, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/wire-unwired-guards

Conversation

@zackees

@zackees zackees commented Nov 6, 2026

Copy link
Copy Markdown
Member

Why

ci/local_suites.py's KNOWN_UNWIRED docstring claims the list "can only shrink". It has no count, so both of its tests stay green when a brand new ci/test_*.py is 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 by MAX_UNTESTED (ci/test_gate_script_coverage.py).

What

  1. MAX_UNWIRED = 6 in ci/local_suites.py plus test_unwired_budget_never_grows in ci/test_local_suites.py, mirroring the MAX_UNTESTED budget shape (message tells you to wire the module, not to add a name).
  2. Shrink the list by one: ci.test_setup_soldr_cache_keys is now in DRIFT_UNITTEST_MODULES and 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 only pyyaml, and until now nothing invoked it. KNOWN_UNWIRED 7 → 6.

Wiring via DRIFT_UNITTEST_MODULES also covers the native gate: ci/local_gate.py runs *LOCAL_UNITTEST_MODULES, and test_local_suites asserts 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).
  • Whole drift registry, 23 modules → Ran 380 tests in 17.9s / OK, rc 0.
  • ruff check on both touched modules → All checks passed!
  • python ci/render_workflows.py --check → rc 0; python ci/check_python_complexity.py → All checks passed!
  • RED by mutation, both directions:
    • Pre-change suite + a freshly added ci/test_zzz_decorative.py + allowlist entry → Ran 6 tests … OK (the gap, demonstrated).
    • Post-change suite, same tree → AssertionError: 7 not less than or equal to 6 : a new decorative guard was allowlisted instead of wired….
    • Dropping the new token from the drift step → FAILED (failures=1) on test_drift_workflow_step_matches_registry.
    • Dropping it from the registry (step still names it) → FAILED (failures=1) on test_local_gate_runs_the_registry_plus_local_only.

No product code touched; untested/MAX_UNTESTED unmoved.

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.
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 8ec9a7e Nov 6, 2026
31 checks passed
@zackees
zackees deleted the agent/wire-unwired-guards branch November 6, 2026 13:29
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant