Skip to content

ci: register the R2 cache census in the test execution registry - #13731

Merged
teamleaderleo merged 1 commit into
mainfrom
register-r2-cache-census
Sep 22, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
register-r2-cache-census

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

main is red on guards / workflow-guard-tests / preflight right now:

- tests/test_ci_r2_cache_census.py: test exists but has no execution registry entry

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

Python test execution registry valid: 221 tests
(legacy=61, linux-guard=99, macos-cli-no-socket=48,
 macos-cli-no-socket-post-fish=11, macos-shell=1, macos-shell-fish=1)

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 legacy lane requires --base-sha and therefore only evaluates on a pull request. The rule that a test is registered at all evaluates everywhere, and turns main red the moment an unregistered test lands. So the cheap failure mode — forgetting an entry — is the one that escapes to main and blocks everybody else's pull requests until someone notices.

Since a linux-guard entry 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 — unbreaking main should not wait on a design change.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes the CI preflight failure on main by registering the R2 cache census test in the test execution registry.

tests/test_ci_r2_cache_census.py had 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 the ci group on Linux, so it's now mapped to the linux-guard lane in tests/test-execution.toml.

This is the second registry staleness today; the deeper fix (deriving entries from ci-guards.yml instead of hand-maintaining them) is left for a follow-up so unbreaking main isn't blocked on a design change.

Written for commit e1b224e. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Tests
    • Added the cache census test to the Linux guard test execution lane.

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>
@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 4159826d-4198-4da7-bab4-8da57b27fcc2

📥 Commits

Reviewing files that changed from the base of the PR and between 3f3e603 and e1b224e.

📒 Files selected for processing (1)
  • tests/test-execution.toml

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds tests/test_ci_r2_cache_census.py to the linux-guard execution lane.

Changes

CI test registration

Layer / File(s) Summary
Register cache census test
tests/test-execution.toml
The linux-guard lane now includes tests/test_ci_r2_cache_census.py.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e1b22

This change should resolve the test-registration guard failure without affecting production behavior.

🚥 Pre-merge checks | ✅ 25
✅ Passed checks (25 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: registering the R2 cache census test in the test execution registry.
Description check ✅ Passed The description explains what changed, why the change was required, the affected execution lane, and the validation result. It does not include the template checklist or review-trigger block, but the …
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS — The pull request changes only tests/test-execution.toml. It adds a linux-guard registry entry for tests/test_ci_r2_cache_census.py. The diff contains no Cloud terminal, cmux, transport, P…
Cmux Swift Actor Isolation ✅ Passed The pull request changes only tests/test-execution.toml. It adds a Python test entry to the linux-guard lane and introduces no Swift production code, actor isolation, or UI-bound store changes.
Cmux Swift Blocking Runtime ✅ Passed PASS: The authoritative diff changes only tests/test-execution.toml and adds one linux-guard registry entry. It introduces no Swift code and no blocking or timing-based synchronization.
Cmux Browser Automation Off-Main ✅ Passed PASS: The pull request changes only tests/test-execution.toml. It adds tests/test_ci_r2_cache_census.py to the linux-guard lane. It does not change browser socket commands, `Sources/TerminalCont…
Cmux Expensive Synchronous Load ✅ Passed PASS: The pull request changes only tests/test-execution.toml. It adds one Python test registry entry and contains no Swift or agent-history loading changes. The custom failure condition does not ap…
Cmux Cache Substitution Correctness ✅ Passed The pull request changes only tests/test-execution.toml. It adds a linux-guard registry entry for tests/test_ci_r2_cache_census.py. It does not change production Swift, TypeScript, or JavaScript…
Cmux No Hacky Sleeps ✅ Passed The pull request changes only tests/test-execution.toml. It adds a Python test registry entry and introduces no TypeScript, JavaScript, shell, or build/runtime code. Therefore, the no-hacky-sleeps r…
Cmux Algorithmic Complexity ✅ Passed The pull request changes only tests/test-execution.toml. It adds a registry entry for tests/test_ci_r2_cache_census.py and does not change production Swift, TypeScript, JavaScript, shell, or runti…
Cmux Swift Concurrency ✅ Passed The PR changes only tests/test-execution.toml. It changes no Swift files and introduces no Swift concurrency patterns. The cmux Swift concurrency check is therefore not applicable.
Cmux Swift @Concurrent ✅ Passed The reviewed range changes only tests/test-execution.toml. It contains no Swift files or Swift code, so the @concurrent check is not applicable.
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only tests/test-execution.toml and adds a Python test registry entry. It contains no production Swift or Swift package changes, so the Swift package boundary rule does…
Cmux Swiftpm Lockfiles ✅ Passed PASS. The authoritative PR diff changes only tests/test-execution.toml by adding a linux-guard test registry entry. It changes no Package.swift, Package.resolved, .gitignore, Xcode project, …
Cmux Swift Logging ✅ Passed The pull request changes only tests/test-execution.toml. It adds a Python test registry entry and changes no Swift files or logging statements. The Swift logging check is therefore not applicable.
Cmux User-Facing Error Privacy ✅ Passed The pull request changes only tests/test-execution.toml by adding a linux-guard registry entry for a test. It does not change production code, user-facing errors, alerts, command output, API respo…
Cmux Full Internationalization ✅ Passed The PR changes only tests/test-execution.toml by adding a linux-guard registry entry for tests/test_ci_r2_cache_census.py. This is a test/operational registry change. It adds no user-facing Swif…
Cmux Swiftui State Layout ✅ Passed The pull request changes only tests/test-execution.toml. It adds a Python test registry entry and contains no Swift, SwiftUI, AppKit, or layout/state code. The custom SwiftUI state-layout check is t…
Cmux Architecture Rethink ✅ Passed PASS: The pull request changes only tests/test-execution.toml. The diff adds one Python test registry entry under linux-guard. It contains no Swift files, Swift architecture changes, or lifecycle …
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The pull request changes only tests/test-execution.toml. It adds a Python test entry to the linux-guard lane. The diff contains no Swift, NSWindow, NSPanel, SwiftUI Window, or WindowGroup changes,…
Cmux Source Artifacts ✅ Passed The PR changes only tests/test-execution.toml. The diff adds a hand-written test execution registry entry for tests/test_ci_r2_cache_census.py under linux-guard. This is an intentional test-syst…
Cmux No Test Or Debug Seam In Production Source ✅ Passed The pull request changes only tests/test-execution.toml. It adds a Python test registry entry and changes no Swift file under a production Sources/ path. The custom check is therefore not applicab…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

Comment @coderabbitai help to get the list of available commands.

@teamleaderleo
teamleaderleo merged commit 6c14405 into main Sep 22, 2026
35 of 37 checks passed
teamleaderleo added a commit that referenced this pull request Sep 22, 2026
…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>
teamleaderleo added a commit that referenced this pull request Sep 22, 2026
* 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>
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