Repository navigation
ci: register the R2 cache census in the test execution registry - #13731
Conversation
tests/test_ci_r2_cache_census.py arrived with #13670 and has no entry, so the unconditional "test exists but has no execution registry entry" check fails and guards / workflow-guard-tests / preflight is red on main for every pull request, whatever it touched. ci-guards.yml runs it in the ci group, which is Linux, so it takes the linux-guard lane. Inserted in alphabetical position within the manifest's sorted tail, beside test_ci_r2_artifact.py. This is the second time today the registry has gone stale within an hour of being fixed: the check that stops a *new* test entering the legacy lane needs --base-sha and only runs on pull requests, while the check that a test is registered at all runs everywhere and reddens main the moment an unregistered test lands. Worth considering whether the registry entry should be generated from ci-guards.yml rather than hand-maintained alongside it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds ChangesCI test registration
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This change should resolve the test-registration guard failure without affecting production behavior. 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…equests `tests/test-execution.toml` requires an entry for every `tests/*.py`, and the preflight validator fails on any unregistered file no matter which pull request is being checked. A test that lands on main without an entry therefore turns every open pull request red until somebody registers it. That happened three times today: #13615's landing left 9 unregistered tests (#13710), then `test_ci_r2_cache_census.py` (#13731), then `test_cmux_settings_jsonc.py` and `test_sync_test_wiring.py` (#13739). This commit adds the regression only, so CI shows it red before the fix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* test: prove the execution registry validator reddens unrelated pull requests `tests/test-execution.toml` requires an entry for every `tests/*.py`, and the preflight validator fails on any unregistered file no matter which pull request is being checked. A test that lands on main without an entry therefore turns every open pull request red until somebody registers it. That happened three times today: #13615's landing left 9 unregistered tests (#13710), then `test_ci_r2_cache_census.py` (#13731), then `test_cmux_settings_jsonc.py` and `test_sync_test_wiring.py` (#13739). This commit adds the regression only, so CI shows it red before the fix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci: fail only the pull request that adds an unregistered test The validator now compares `tests/` against the merge base with the pull request's base commit. A test file with no registry entry is a hard failure only when this branch added it; one that was already unregistered on the base branch becomes a warning, printed as a GitHub annotation and a step summary note, so an unrelated pull request stays green. Everything a branch can only break by editing the registry itself stays a hard failure: entries pointing at missing tests, malformed or duplicated entries, unsupported requirements, manual entries without a reason, and lanes no workflow invokes. The failure now prints the exact TOML block to paste. When a workflow already runs the file directly, the block names `lane = "linux-guard"` and cites the workflow it derived that from; otherwise it lists the live runner lanes. CI never writes the registry itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci: drop the duplicate test_sync_test_wiring registration #13738 and #13739 each added a `[[test]]` block for `tests/test_sync_test_wiring.py`. The two merged cleanly and left main with the test registered twice, which the registry validator rejects, so every open pull request is currently red on `guards / workflow-guard-tests / preflight`. Both blocks were identical; this removes the second one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ci: warn instead of fail on a duplicate registration the base branch already has A duplicate entry was treated as something only the pull request at fault could produce. Today showed otherwise: two pull requests each registering the same test merge cleanly into a duplicate neither one wrote, and it reddens every open pull request exactly like an unregistered test does. The validator now reads the registry at the merge base. A path already duplicated there warns; a duplicate this branch introduces still fails. Parsing moved into `parse_registry(text, label)` so the base revision can be read through `git show` without a file on disk. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
mainis red onguards / workflow-guard-tests / preflightright now:That check is unconditional — it does not depend on
--base-sha— so it fails on every pull request regardless of what the pull request touched. The test arrived with #13670 and passes (13 tests,OK); only its registry entry is missing.ci-guards.ymlruns it in thecigroup, which is Linux, so it takes thelinux-guardlane. Inserted in alphabetical position within the manifest's sorted tail, besidetest_ci_r2_artifact.py.Worth noticing
This is the second time today the registry has gone stale within about an hour of being repaired — #13710 added nine missing entries, and this one appeared after it merged.
The asymmetry looks structural. The rule that a newly added test may not enter the
legacylane requires--base-shaand therefore only evaluates on a pull request. The rule that a test is registered at all evaluates everywhere, and turnsmainred the moment an unregistered test lands. So the cheap failure mode — forgetting an entry — is the one that escapes tomainand blocks everybody else's pull requests until someone notices.Since a
linux-guardentry is now valid exactly when some workflow runs the test, that entry is derivable from the workflows rather than asserted alongside them. Generating it, or defaulting to it, would remove this class of breakage entirely. Not attempted here — unbreakingmainshould not wait on a design change.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes the CI
preflightfailure onmainby registering the R2 cache census test in the test execution registry.tests/test_ci_r2_cache_census.pyhad no entry, so the unconditional "test exists but has no execution registry entry" check failed on every pull request regardless of what it touched. The test runs in thecigroup on Linux, so it's now mapped to thelinux-guardlane intests/test-execution.toml.This is the second registry staleness today; the deeper fix (deriving entries from
ci-guards.ymlinstead of hand-maintaining them) is left for a follow-up so unbreakingmainisn't blocked on a design change.Written for commit e1b224e. Summary will update on new commits.
Summary by CodeRabbit