Skip to content

ci(capability): treat a lone tests.rs directory as owner tests, and move router and read_limit_disclosure tests out of line (#15193) - #16677

Queued
EffortlessSteven wants to merge 8 commits into
mainfrom
claude/project-thread-c92paw
Queued

EffortlessSteven wants to merge 8 commits into
mainfrom
claude/project-thread-c92paw

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

Batch 8 (#16657) failed check-capability-producers on hosted CI. That gate counts every directory under analysis/language/ as a language adapter, so moving router.rs's or read_limit_disclosure.rs's inline tests to <stem>/tests.rs made it demand lang-router and lang-read_limit_disclosure features. Both owners went to the tail. This PR:

  • makes the gate skip a directory that holds only tests.rs (a module's out-of-line tests, not an adapter), with a unit test of the rule;
  • moves both owners' tests out of line (mechanical_relocation.py apply output).

Negative experiment on this tree: with the gate change reverted and the moves kept, cargo xtask check-capability-producers fails on exactly those two directories ("adapter directory ... has no registered language with required_feature lang-router"). With the change, it passes.

Source-of-truth Links

Proposal: #15217
Spec:
ADR:
Plan item:
Governing issue or accepted claim: #15193
Acceptance delta (one sentence): check-capability-producers ignores a directory holding only an out-of-line tests.rs, and router and read_limit_disclosure move their tests out of the published source.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): claude/project-thread-c92paw
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none

Scope

Production delta:

  • None in the published crate (only #[cfg(test)] code moves). xtask's adapter inventory skips owner test directories.

Evidence/support delta:

  • only_a_lone_tests_rs_directory_is_an_owner_test_dir: router/ with only tests.rs is an owner test dir; python/ with tests.rs and another file, a dir whose tests.rs is a directory, a dir with mod.rs, and an empty dir are not.

Non-goals:

  • Changing what counts as a registered adapter.

Proof

  • cargo test -p xtask --bin xtask capability_producers: 22 passed.
  • cargo xtask check-capability-producers passes with the change and fails without it (above).
  • cargo xtask precommit exits 0 (same commit on base 53e06e9; the cherry-pick onto current main only re-resolved policy/inline-test-modules.txt).

Source review: REVIEW_READY 534db08

Claim Boundary

May claim: the gate no longer reads owner test directories as adapters; these two owners' tests leave the published source.
Must not claim: a measured .crate size change.

Rollback

Plain revert.

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.

CI Economics

  • n/a (no workflow change).

Generated by Claude Code

… their path checks at the new files (#15193)

stop_reason_contract and gap_vocabulary skip their own file by path, so the
skip now also covers the moved tests.rs. seam_cache's compaction test reads
macro_item_names as a fixture that must contain tests, so it now reads the
owner and its tests.rs together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzV3JdcCDM6STapqHBr
…-c92paw

# Conflicts:
#	policy/inline-test-modules.txt
…weep pin (#15193)

The timeout-refusal schema binding in xtask's schema producer sweep pins a
test name by reading limited_check.rs with include_str!. The test now lives
in limited_check/tests.rs, so the pin and its authority text read that file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzV3JdcCDM6STapqHBr
…ove router and read_limit_disclosure tests out of line (#15193)

check-capability-producers counted every directory under analysis/language/
as a language adapter. Moving router.rs's or read_limit_disclosure.rs's
inline tests to <stem>/tests.rs created such a directory, and the gate then
demanded a `lang-router` feature (#16657). A directory holding only tests.rs
is now skipped. With the fix, the two owners move out of line and the gate
passes; with the gate reverted, the same tree fails on both directories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzV3JdcCDM6STapqHBr
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 30, 2026 06:45

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_REVIEW_READY for head 534db08

Inspected the full diff. read_inventory now skips a directory for which is_owner_test_dir is true: exactly one entry, named tests.rs, and a regular file. A read failure there propagates as an error rather than being ignored. The unit test covers the positive case and four alternates. The two owners keep #[cfg(test)] mod tests; with unchanged production code, and their bodies are apply output. The baseline loses both rows. The gate passes with the change and fails without it on the same tree; precommit exits 0.


Generated by Claude Code

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

1 similar comment
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 138 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 5cb8bde5-ee56-4ca0-9eb2-f32620571ae4
Commits

Reviewing files that changed from the base of the PR and between 313456e and 534db08.

Files selected for processing: 8

  • changelog.d/15193-capability-owner-test-dir.md
  • crates/ripr/src/analysis/language/read_limit_disclosure.rs
  • crates/ripr/src/analysis/language/read_limit_disclosure/tests.rs
  • crates/ripr/src/analysis/language/router.rs
  • crates/ripr/src/analysis/language/router/tests.rs
  • policy/inline-test-modules.txt
  • xtask/src/policy/capability_producers.rs
  • xtask/src/policy/capability_producers/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven
EffortlessSteven added this pull request to the merge queue Nov 30, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants