Skip to content

test: move inline cfg(test) modules out of line, batch 8 of 27 (#15193) - #16657

Merged
EffortlessSteven merged 1 commit into
mainfrom
claude/project-thread-1qexgg
Nov 30, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
claude/project-thread-1qexgg

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

Mechanical relocation: inline-cfg-test-v1
Governing issue or accepted claim: #15193
Acceptance delta (one sentence): Moves the inline cfg(test) modules of batch 8's owners into out-of-line files that the published crates exclude, with token-identical bodies.
Source review: REVIEW_READY c631a27

Source-of-truth Links

Plan item: #15193, v3 series after #16517 (Steven-approved mechanical-relocation lane, #15217 exception; verifier #15235; ratchet #15221)

Candidate Relationships

Candidate branch: claude/project-thread-1qexgg
Stack parent or prerequisite PR: none. Only one relocation batch should sit in a merge group at a time.

Scope

  • Test-only relocation. No production code changes; module bodies are token-identical.
  • Non-goals: the non-mechanical tail owners and .crate size measurement (owned by a separate lane).

Proof

python3 .github/actions/pr-candidate-admission/mechanical_relocation.py apply <batch 8 owners>
python3 .github/actions/pr-candidate-admission/mechanical_relocation.py verify --base origin/main   # status: validated
python3 .github/actions/pr-candidate-admission/mechanical_relocation.py indirect-owners --check     # current
cargo check -p ripr -p ripr-contract --lib --tests                                                  # exit 0
cargo xtask check-architecture                                                                       # pass
cargo xtask check-process-policy                                                                     # pass
cargo xtask check-network-policy                                                                     # pass
cargo fmt --check                                                                                    # exit 0

Not verified: a base-to-head cargo test -p ripr --lib -- --list. The ripr lib test binary does not build in this container's memory, and hosted shards check only the head revision. Base-to-head parity rests on the independent review's per-module comparison of test attribute counts and test fn names; hosted gates confirm the head compiles and passes.

Spec prose citations of moved tests are left for #16547 so the PR stays inside the mechanical transform.

Claim Boundary

May claim: these owners' inline test modules no longer ship in the published source. Must not claim: any .crate byte change or compile-memory change (not measured here).

Rollback

Revert the squash commit; the ratchet rows move back with it.


Generated by Claude Code

@EffortlessSteven EffortlessSteven self-assigned this Nov 30, 2026
@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

Explain Change →

No actionable comments were generated in the recent review.

Summary by CodeRabbit

  • Tests
    • Improved regression coverage across Rust and Python analysis, workspace discovery, file selection, parsing, and dependency handling.
    • Updated test references to match the reorganized test suite.
  • Refactor
    • Moved many tests into separate modules; production behavior is unchanged.

Walkthrough

The PR moves inline Rust, Perl, and Python analysis tests into external modules and adds test cases across indexing, parsing, reachability, repository discovery, and candidate execution. It updates traceability paths and inline-test policy entries. The supplied summaries report no production implementation changes.

Changes

Rust facts and workspace indexing

Layer / File(s) Summary
Rust facts and workspace indexing
crates/ripr/src/analysis/facts/*, .ripr/traceability.toml
Rust facts tests were moved into external modules or extended across member-crate discovery, fact models, resource dependencies, role composition, stray files, and generated-Rust corpus analysis. Related traceability references were updated.

Rust execution and input boundaries

Layer / File(s) Summary
Rust execution and input boundaries
crates/ripr/src/analysis/git_candidate_execution/*, crates/ripr/src/analysis/input_boundary/*, crates/ripr/src/analysis/input_facts/*, crates/ripr/src/analysis/inventory_progress/*, crates/ripr/src/analysis/language/rust/dependent_scope*, crates/ripr/src/analysis/language/tests.rs, policy/inline-test-modules.txt, .ripr/traceability.toml, .ripr/traceability.d/*
Tests for Git candidate execution, input boundaries and facts, progress reporting, dependent-scope indexing, and language routing were moved or added. Related traceability and inline-test policy entries were updated.

Language analysis tests

Layer / File(s) Summary
Language analysis tests
crates/ripr/src/analysis/language/perl/*, crates/ripr/src/analysis/language/python/..., .ripr/traceability.toml, .ripr/traceability.d/*, policy/relocation-indirect-owners.txt
Perl and Python analysis tests were relocated or added across parsing, activation, reachability, static limits, and related test analysis. Traceability paths and the Python identity-test exclusion entry were updated.

Python repository analysis

Layer / File(s) Summary
Python repository analysis
crates/ripr/src/analysis/language/python/repo/*, .ripr/traceability.toml
Repository discovery, role classification, evidence, and run-status tests were moved into external modules or added. The traceability manifest now points to the relocated tests.

Estimated code review effort: 4 (Complex) | ~60 minutes

Merge Risk: Minimal · up to c631a

This PR relocates unit tests into separate files without changing production behavior, so user and production impact is negligible. The remaining uncertainty is whether the full test suite builds and runs with the same test list as before. Normal CI should confirm that before merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: moving inline cfg(test) modules out of line, as batch 8 of 27 for issue #15193. The changeset matches this. The title is specific and concise. It omits the file-count …
Description check Passed The description covers the summary, the batch scope, the mechanical-relocation method, the three owners excluded from the batch, the proof commands, the claim boundary, and the rollback plan. It does …
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.
Full details: Title check

Explanation

The title names the main change: moving inline cfg(test) modules out of line, as batch 8 of 27 for issue #15193. The changeset matches this. The title is specific and concise. It omits the file-count scope, which is expected.

Full details: Description check

Explanation

The description covers the summary, the batch scope, the mechanical-relocation method, the three owners excluded from the batch, the proof commands, the claim boundary, and the rollback plan. It does not fill in several template sections: Swarm/Source Boundary checkboxes, Source-of-truth Links (Spec, ADR, Acceptance delta is given but Proposal/Spec/ADR are blank), Scope Classification checkboxes, Support-tier Impact, Policy Impact, Engineering Check, and Gates. The Proof section lists commands but the template's Gates checklist is not addressed. Because the core content is present and the omissions are mostly non-critical checkboxes, the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the paths at dawn
Test names hop to files anew
Rust leaves a trail; Python follows
Perl tests tuck in beside them
The manifest marks each burrow
And carrots wait when checks are through

Recent review info

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: 88dde2c8-4055-469e-baa4-ad1d175429b1
Commits

Reviewing files that changed from the base of the PR and between 53e06e9 and c631a27.

Files selected for processing: 128

  • .ripr/traceability.d/10461-python-cap-keeps-changed-files.toml
  • .ripr/traceability.d/10594-python-walk-streams-bounded-selection.toml
  • .ripr/traceability.d/10685-python-signature-body-uses.toml
  • .ripr/traceability.d/10796-timeout-refusal-input-context.toml
  • .ripr/traceability.d/12948-python-empty-range.toml
  • .ripr/traceability.d/13801-python-verify-interpreter-at-producer.toml
  • .ripr/traceability.d/14035-python-module-attribute-identity-gate.toml
  • .ripr/traceability.d/14150-python-route-helper-reach.toml
  • .ripr/traceability.d/14768-rust-benchmark-input.toml
  • .ripr/traceability.d/15292-python-multiline-def-boundary.toml
  • .ripr/traceability.d/15302-python-nested-project-verify-cwd.toml
  • .ripr/traceability.d/9619-python-removed-type-guard.toml
  • .ripr/traceability.toml
  • crates/ripr/src/analysis/facts/member_crates.rs
  • crates/ripr/src/analysis/facts/member_crates/tests.rs
  • crates/ripr/src/analysis/facts/model.rs
  • crates/ripr/src/analysis/facts/model/tests.rs
  • crates/ripr/src/analysis/facts/parameterized_tests.rs
  • crates/ripr/src/analysis/facts/parameterized_tests/tests.rs
  • crates/ripr/src/analysis/facts/process_memo.rs
  • crates/ripr/src/analysis/facts/process_memo/tests.rs
  • crates/ripr/src/analysis/facts/rebound_assertion_roots.rs
  • crates/ripr/src/analysis/facts/rebound_assertion_roots/tests.rs
  • crates/ripr/src/analysis/facts/resource_dependencies.rs
  • crates/ripr/src/analysis/facts/resource_dependencies/tests.rs
  • crates/ripr/src/analysis/facts/role_composition.rs
  • crates/ripr/src/analysis/facts/role_composition/cycle_depth_tests.rs
  • crates/ripr/src/analysis/facts/role_composition/tests.rs
  • crates/ripr/src/analysis/facts/stray_files.rs
  • crates/ripr/src/analysis/facts/stray_files/index_tests.rs
  • crates/ripr/src/analysis/facts/stray_files/tests.rs
  • crates/ripr/src/analysis/generated_rust_corpus.rs
  • crates/ripr/src/analysis/generated_rust_corpus/tests.rs
  • crates/ripr/src/analysis/git_candidate_execution.rs
  • crates/ripr/src/analysis/git_candidate_execution/tests.rs
  • crates/ripr/src/analysis/input_boundary.rs
  • crates/ripr/src/analysis/input_boundary/tests.rs
  • crates/ripr/src/analysis/input_facts.rs
  • crates/ripr/src/analysis/input_facts/tests.rs
  • crates/ripr/src/analysis/inventory_progress.rs
  • crates/ripr/src/analysis/inventory_progress/tests.rs
  • crates/ripr/src/analysis/language/mod.rs
  • crates/ripr/src/analysis/language/perl/boundary_input.rs
  • crates/ripr/src/analysis/language/perl/boundary_input/tests.rs
  • crates/ripr/src/analysis/language/perl/static_limit.rs
  • crates/ripr/src/analysis/language/perl/static_limit/tests.rs
  • crates/ripr/src/analysis/language/python.rs
  • crates/ripr/src/analysis/language/python/boundary.rs
  • crates/ripr/src/analysis/language/python/boundary/call_line_text_tests.rs
  • crates/ripr/src/analysis/language/python/boundary/literals_equal_tests.rs
  • crates/ripr/src/analysis/language/python/bounded_read.rs
  • crates/ripr/src/analysis/language/python/bounded_read/tests.rs
  • crates/ripr/src/analysis/language/python/coarse_projection.rs
  • crates/ripr/src/analysis/language/python/coarse_projection/tests.rs
  • crates/ripr/src/analysis/language/python/conditional_defs.rs
  • crates/ripr/src/analysis/language/python/conditional_defs/tests.rs
  • crates/ripr/src/analysis/language/python/doctest_eval.rs
  • crates/ripr/src/analysis/language/python/doctest_eval/tests.rs
  • crates/ripr/src/analysis/language/python/dunder_truthiness/workspace_admission.rs
  • crates/ripr/src/analysis/language/python/dunder_truthiness/workspace_admission/tests.rs
  • crates/ripr/src/analysis/language/python/forwarding_decorator.rs
  • crates/ripr/src/analysis/language/python/forwarding_decorator/tests.rs
  • crates/ripr/src/analysis/language/python/guard_activation.rs
  • crates/ripr/src/analysis/language/python/guard_activation/tests.rs
  • crates/ripr/src/analysis/language/python/hypothesis.rs
  • crates/ripr/src/analysis/language/python/hypothesis/tests.rs
  • crates/ripr/src/analysis/language/python/message_pin.rs
  • crates/ripr/src/analysis/language/python/message_pin/tests.rs
  • crates/ripr/src/analysis/language/python/module_callees.rs
  • crates/ripr/src/analysis/language/python/module_callees/own_scope_tests.rs
  • crates/ripr/src/analysis/language/python/parametrize.rs
  • crates/ripr/src/analysis/language/python/parametrize/tests.rs
  • crates/ripr/src/analysis/language/python/parse_budget.rs
  • crates/ripr/src/analysis/language/python/parse_budget/tests.rs
  • crates/ripr/src/analysis/language/python/parse_budget_limitation_tests.rs
  • crates/ripr/src/analysis/language/python/python_identity_review_controls_tests.rs
  • crates/ripr/src/analysis/language/python/range_activation.rs
  • crates/ripr/src/analysis/language/python/range_activation/tests.rs
  • crates/ripr/src/analysis/language/python/reexports.rs
  • crates/ripr/src/analysis/language/python/reexports/primed_tests.rs
  • crates/ripr/src/analysis/language/python/related_tests.rs
  • crates/ripr/src/analysis/language/python/related_tests/dunder_protocol.rs
  • crates/ripr/src/analysis/language/python/related_tests/dunder_protocol/tests.rs
  • crates/ripr/src/analysis/language/python/related_tests/oracle_operand_tests.rs
  • crates/ripr/src/analysis/language/python/related_tests/route_template_tests.rs
  • crates/ripr/src/analysis/language/python/repo/discovery.rs
  • crates/ripr/src/analysis/language/python/repo/discovery/tests.rs
  • crates/ripr/src/analysis/language/python/repo/evidence.rs
  • crates/ripr/src/analysis/language/python/repo/evidence/tests.rs
  • crates/ripr/src/analysis/language/python/repo/mod.rs
  • crates/ripr/src/analysis/language/python/repo/roles.rs
  • crates/ripr/src/analysis/language/python/repo/roles/tests.rs
  • crates/ripr/src/analysis/language/python/repo/run_status.rs
  • crates/ripr/src/analysis/language/python/repo/run_status/tests.rs
  • crates/ripr/src/analysis/language/python/repo/tests.rs
  • crates/ripr/src/analysis/language/python/row_reach.rs
  • crates/ripr/src/analysis/language/python/row_reach/tests.rs
  • crates/ripr/src/analysis/language/python/setup_receivers.rs
  • crates/ripr/src/analysis/language/python/setup_receivers/tests.rs
  • crates/ripr/src/analysis/language/python/sink_alignment.rs
  • crates/ripr/src/analysis/language/python/sink_alignment/helper_origin_tests.rs
  • crates/ripr/src/analysis/language/python/sink_alignment/row_sink_alignment_tests.rs
  • crates/ripr/src/analysis/language/python/static_limits.rs
  • crates/ripr/src/analysis/language/python/static_limits/tests.rs
  • crates/ripr/src/analysis/language/python/table_rows.rs
  • crates/ripr/src/analysis/language/python/table_rows/tests.rs
  • crates/ripr/src/analysis/language/python/term_activation.rs
  • crates/ripr/src/analysis/language/python/term_activation/tests.rs
  • crates/ripr/src/analysis/language/python/test_activation.rs
  • crates/ripr/src/analysis/language/python/test_activation/later_bindings_tests.rs
  • crates/ripr/src/analysis/language/python/transitive_reach.rs
  • crates/ripr/src/analysis/language/python/transitive_reach/tests.rs
  • crates/ripr/src/analysis/language/python/truthiness_swap.rs
  • crates/ripr/src/analysis/language/python/truthiness_swap/tests.rs
  • crates/ripr/src/analysis/language/python/type_guard.rs
  • crates/ripr/src/analysis/language/python/type_guard/tests.rs
  • crates/ripr/src/analysis/language/python/verify_interpreter.rs
  • crates/ripr/src/analysis/language/python/verify_interpreter/tests.rs
  • crates/ripr/src/analysis/language/python/workspace_reach.rs
  • crates/ripr/src/analysis/language/python/workspace_reach/tests.rs
  • crates/ripr/src/analysis/language/python/wrapped_call.rs
  • crates/ripr/src/analysis/language/python/wrapped_call/tests.rs
  • crates/ripr/src/analysis/language/rust/dependent_scope.rs
  • crates/ripr/src/analysis/language/rust/dependent_scope/reach_index_cache_tests.rs
  • crates/ripr/src/analysis/language/rust/dependent_scope/tests.rs
  • crates/ripr/src/analysis/language/tests.rs
  • policy/inline-test-modules.txt
  • policy/relocation-indirect-owners.txt
Files with no reviewable changes: 1

  • policy/inline-test-modules.txt

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@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 bff3a32

Inspected on this head (base 593dd0c):

  • mechanical_relocation.py verify --base 593dd0c2 returns validated for all 62 moves (55 owners); indirect-owners --check is current.
  • Independent subagent review: every moved module keeps the same test attribute count and the same test fn names as the base inline body; module names are unchanged, so libtest paths stay the same. Declarations keep their attributes and resolve to the new files, including any #[path] declarations for indirectly loaded owners. No file-relative macros or paths in moved bodies change meaning.
  • Non-crate rows (traceability, test intent, ratchet, allowlists, indirect owners) are renames or per-file splits that match the moves; split allowlist counts equal the occurrences in each file.
  • Local: cargo check -p ripr -p ripr-contract --lib --tests, cargo fmt --check, cargo xtask check-architecture, check-process-policy, check-network-policy, and precommit all exit 0.
  • Not run: a base-to-head --list of the ripr lib (its test binary does not build in this container, and hosted shards check only the head). Base-to-head parity rests on the per-module test count and name comparison above; hosted gates confirm the head compiles and passes.
  • Noted, not changed here: some spec prose still cites old test locations; no gate reads them, and #16547 tracks one docs refresh after the batches so this PR stays purely mechanical. Bot threads are answered and resolved.

Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 30, 2026 01:35
@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!

@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 c631a27

Inspected on this head (base 593dd0c):

  • mechanical_relocation.py verify --base 593dd0c2 returns validated for all 60 moves (53 owners); indirect-owners --check is current.
  • Independent subagent review: every moved module keeps the same test attribute count and the same test fn names as the base inline body; module names are unchanged, so libtest paths stay the same. Declarations keep their attributes and resolve to the new files, including any #[path] declarations for indirectly loaded owners. No file-relative macros or paths in moved bodies change meaning.
  • Non-crate rows (traceability, test intent, ratchet, allowlists, indirect owners) are renames or per-file splits that match the moves; split allowlist counts equal the occurrences in each file.
  • Local: cargo check -p ripr -p ripr-contract --lib --tests, cargo fmt --check, cargo xtask check-architecture, check-process-policy, check-network-policy, check-capability-producers, and precommit all exit 0. This head equals the earlier reviewed head bff3a32 with two owners (analysis/language/read_limit_disclosure.rs and router.rs) restored byte-identical to base and their two ratchet rows restored; xtask capability_producers tests (21) pass locally.
  • Not run: a base-to-head --list of the ripr lib (its test binary does not build in this container, and hosted shards check only the head). Base-to-head parity rests on the per-module test count and name comparison above; hosted gates confirm the head compiles and passes.
  • Noted, not changed here: some spec prose still cites old test locations; no gate reads them, and #16547 tracks one docs refresh after the batches so this PR stays purely mechanical. Bot threads are answered and resolved.

Generated by Claude Code

@EffortlessSteven
EffortlessSteven added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 7f94203 Nov 30, 2026
20 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/project-thread-1qexgg branch November 30, 2026 04:13
EffortlessSteven pushed a commit that referenced this pull request Nov 30, 2026
…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
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