Skip to content

test: rename legacy test.rs and *_test.rs files to *_tests.rs - #8

Merged
senamakel merged 2 commits into
mainfrom
legacy-test-renames
Oct 2, 2026
Merged

senamakel merged 2 commits into
mainfrom
legacy-test-renames

Conversation

@senamakel

@senamakel senamakel commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Renames 13 legacy test files (test.rs and <name>_test.rs) to <module>_tests.rs (test.rs becomes <declaring file>_tests.rs, mod_tests.rs beside a mod.rs). Each module keeps its identifier, so references to it keep resolving; its declaration gains a #[path] to the renamed file. Only file names and those attributes change, no test code. Removes the now-stale "legacy files" note from the guidance. Done with OpenHuman's scripts/externalize-inline-tests.mjs --rename-legacy.

Related issue

None.

API or behavior changes

None. Test-only files renamed; no public API or runtime behavior changes.

Validation

Commands actually run, with their outcome:

  • cargo fmt --all -- --check (clean)
  • cargo clippy --all-targets --all-features -- -D warnings (left to CI)
  • cargo check --workspace --tests (passes; cargo build/cargo test left to CI)
  • cargo test --all-features (left to CI)

Tests

No tests added or changed; 13 files renamed. Test bodies are untouched (git detects them as renames).

Documentation

CLAUDE.md / AGENTS.md updated.

Checklist

  • The change is focused on one logical change
  • No new #[allow(...)], #[ignore], or relaxed lints
  • No secrets, tokens, or .env contents in the diff or the description

Summary by CodeRabbit

  • Tests
    • Updated test discovery across search and provider components to use the current test file locations. No user-facing behavior changed.

senamakel and others added 2 commits October 1, 2026 22:14
Each module keeps its name; its declaration gains a #[path] to the renamed file.
Only names change, no test code does. Drops the legacy-files note from the guidance.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Oct 1, 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: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ec22cf5c-62f1-4978-9c1a-9f8edd6180ba

📥 Commits

Reviewing files that changed from the base of the PR and between 7aff0a9 and 2a71ea9.

📒 Files selected for processing (27)
  • AGENTS.md
  • crates/tinysearch-bus/src/errors/mod.rs
  • crates/tinysearch-bus/src/errors/mod_tests.rs
  • crates/tinysearch-bus/src/names/mod.rs
  • crates/tinysearch-bus/src/names/mod_tests.rs
  • crates/tinysearch-bus/src/search/catalog/mod.rs
  • crates/tinysearch-bus/src/search/catalog/mod_tests.rs
  • crates/tinysearch-bus/src/search/mod.rs
  • crates/tinysearch-bus/src/search/mod_tests.rs
  • crates/tinysearch-bus/src/version/mod.rs
  • crates/tinysearch-bus/src/version/mod_tests.rs
  • crates/tinysearch/src/error/mod.rs
  • crates/tinysearch/src/error/mod_tests.rs
  • crates/tinysearch/src/provider/direct/parallel.rs
  • crates/tinysearch/src/provider/direct/parallel/parallel_tests.rs
  • crates/tinysearch/src/provider/direct/tavily.rs
  • crates/tinysearch/src/provider/direct/tavily/tavily_tests.rs
  • crates/tinysearch/src/provider/direct/tinyfish.rs
  • crates/tinysearch/src/provider/direct/tinyfish/tinyfish_tests.rs
  • crates/tinysearch/src/provider/mod.rs
  • crates/tinysearch/src/provider/mod_tests.rs
  • crates/tinysearch/src/search/mod.rs
  • crates/tinysearch/src/search/mod_tests.rs
  • crates/tinysearch/src/search/roles/mod.rs
  • crates/tinysearch/src/search/roles/mod_tests.rs
  • crates/tinysearch/src/tinybus_module/mod.rs
  • crates/tinysearch/src/tinybus_module/mod_tests.rs
💤 Files with no reviewable changes (1)
  • AGENTS.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Test module declarations across the tinysearch crates now specify their source files with path attributes. Repository guidance no longer requires renaming existing test files when they are touched.

Changes

Test Module Source Paths

Layer / File(s) Summary
Explicit test module paths
AGENTS.md, crates/tinysearch-bus/src/**/mod.rs, crates/tinysearch/src/**/mod.rs, crates/tinysearch/src/provider/direct/*.rs
Test module declarations now use explicit source paths. Repository guidance requiring renames of existing test files when touched was removed.

Priority: ⬇️ Low

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

Change: Other

Merge Risk: ⚪ Minimal · up to 2a71e

This change redirects test-module loading to renamed files without an indicated production behavior change. The reported test-target check passed, and no actionable merge risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to 2a71e

The change affects 2 systems.

Changed systems: crates, AGENTS.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — crates (service) was modified; 13 changed files map to changed impact.
  • observed — AGENTS.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in AGENTS.md: Removed the rule requiring pre-existing test.rs and <module>_test.rs files to be renamed, with their module declarations updated, the next time they are touched.
  • observed — Modified behavior in crates/tinysearch-bus/src/errors/mod.rs: The test module now uses the mod_tests.rs source file instead of the default module-file lookup.
  • observed — Modified behavior in crates/tinysearch-bus/src/names/mod.rs: The test module now uses mod_tests.rs as its source file instead of the default test.rs path.
  • observed — Modified behavior in crates/tinysearch-bus/src/search/catalog/mod.rs: The test module now explicitly resolves its source from mod_tests.rs instead of the default module path.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 13 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly summarizes the main change: renaming legacy test files to the *_tests.rs convention.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


A rabbit checks each test path twice,
Then hops through modules, neat and nice.
The source files sit where paths now lead,
No rename rule for touched files to heed.
A quiet burrow, tests in place.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T19:20:57.227813Z 2a71ea9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tinysweeper

tinysweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 6 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below.

State: Incomplete
Priority: none
Reviewed head: 2a71ea9da68e
Updated: 1790882500 (Unix time)

Review snapshot

Change surface Files Review signal Count
Production 13 Active findings 0
Tests 13 Noted findings 0
Documentation 1 Resolved findings 0
Configuration 0 Pending checks/questions 28

Completeness: Incomplete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

The review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

  • Unreviewed: tinysweeper/tests

Findings

No active actionable findings.

Could not review: crates/tinysearch-bus/src/errors/mod.rs, crates/tinysearch-bus/src/names/mod.rs, crates/tinysearch-bus/src/search/catalog/mod.rs, crates/tinysearch-bus/src/search/mod.rs, crates/tinysearch-bus/src/version/mod.rs, crates/tinysearch/src/error/mod.rs, crates/tinysearch/src/provider/direct/parallel.rs, crates/tinysearch/src/provider/direct/tavily.rs, crates/tinysearch/src/provider/direct/tinyfish.rs, crates/tinysearch/src/provider/mod.rs, crates/tinysearch/src/search/mod.rs, crates/tinysearch/src/search/roles/mod.rs, crates/tinysearch/src/tinybus_module/mod.rs, tinysweeper/description, tinysweeper/tests

Before merge

  • Complete the critique review for crates/tinysearch-bus/src/errors/mod.rs, crates/tinysearch-bus/src/names/mod.rs, crates/tinysearch/src/search/mod.rs, crates/tinysearch/src/search/roles/mod.rs, crates/tinysearch/src/tinybus_module/mod.rs, crates/tinysearch-bus/src/search/catalog/mod.rs, crates/tinysearch-bus/src/search/mod.rs, crates/tinysearch-bus/src/version/mod.rs, crates/tinysearch/src/error/mod.rs, crates/tinysearch/src/provider/direct/parallel.rs, crates/tinysearch/src/provider/direct/tavily.rs, crates/tinysearch/src/provider/direct/tinyfish.rs, crates/tinysearch/src/provider/mod.rs.
  • Complete the security review for crates/tinysearch-bus/src/errors/mod.rs, crates/tinysearch-bus/src/names/mod.rs, crates/tinysearch/src/search/mod.rs, crates/tinysearch/src/search/roles/mod.rs, crates/tinysearch/src/tinybus_module/mod.rs, crates/tinysearch-bus/src/search/catalog/mod.rs, crates/tinysearch-bus/src/search/mod.rs, crates/tinysearch-bus/src/version/mod.rs, crates/tinysearch/src/error/mod.rs, crates/tinysearch/src/provider/direct/parallel.rs, crates/tinysearch/src/provider/direct/tavily.rs, crates/tinysearch/src/provider/direct/tinyfish.rs, crates/tinysearch/src/provider/mod.rs.
  • Complete the tests review for tinysweeper/tests.
  • Complete the description review for tinysweeper/description.

How this fits together

flowchart LR
  n0["select_tools<br/>changed"]:::changed
  n1["Error<br/>changed"]:::changed
  n2["async_response<br/>changed"]:::changed
  n3["as_str"]:::impacted
  n4["all_tools_catalog_is_direct_only"]:::impacted
  n5["configured_provider_tools"]:::impacted
  n6["provider_tool_specs"]:::impacted
  n7["roles_mode_lists_one_tool_per_served_role"]:::impacted
  n8["...ackend_credential_drops_backend_providers"]:::impacted
  n2 -->|calls| n3
  n2 -->|uses| n3
  n4 -->|uses| n1
  n4 -->|calls| n3
  n4 -->|tests| n3
  n5 -->|calls| n3
  n7 -->|calls| n0
  n7 -->|tests| n0
  n7 -->|calls| n5
  n7 -->|tests| n5
  n7 -->|calls| n6
  n7 -->|tests| n6
  n8 -->|calls| n0
  n8 -->|tests| n0
  n8 -->|calls| n5
  n8 -->|tests| n5
  n8 -->|calls| n6
  n8 -->|tests| n6
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: crates/tinysearch-bus/src/errors/mod.rs, crates/tinysearch-bus/src/names/mod.rs, crates/tinysearch/src/search/mod.rs, crates/tinysearch/src/search/roles/mod.rs, crates/tinysearch/src/tinybus_module/mod.rs, crates/tinysearch-bus/src/search/catalog/mod.rs, crates/tinysearch-bus/src/search/mod.rs, crates/tinysearch-bus/src/version/mod.rs, crates/tinysearch/src/error/mod.rs, crates/tinysearch/src/provider/direct/parallel.rs, crates/tinysearch/src/provider/direct/tavily.rs, crates/tinysearch/src/provider/direct/tinyfish.rs, crates/tinysearch/src/provider/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 13 files could not be reviewed: crates/tinysearch-bus/src/errors/mod.rs, crates/tinysearch-bus/src/names/mod.rs, crates/tinysearch/src/search/mod.rs, crates/tinysearch/src/search/roles/mod.rs, crates/tinysearch/src/tinybus_module/mod.rs, crates/tinysearch-bus/src/search/catalog/mod.rs, crates/tinysearch-bus/src/search/mod.rs, crates/tinysearch-bus/src/version/mod.rs, crates/tinysearch/src/error/mod.rs, crates/tinysearch/src/provider/direct/parallel.rs, crates/tinysearch/src/provider/direct/tavily.rs, crates/tinysearch/src/provider/direct/tinyfish.rs, crates/tinysearch/src/provider/mod.rs.

security

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: crates/tinysearch-bus/src/errors/mod.rs, crates/tinysearch-bus/src/names/mod.rs, crates/tinysearch/src/search/mod.rs, crates/tinysearch/src/search/roles/mod.rs, crates/tinysearch/src/tinybus_module/mod.rs, crates/tinysearch-bus/src/search/catalog/mod.rs, crates/tinysearch-bus/src/search/mod.rs, crates/tinysearch-bus/src/version/mod.rs, crates/tinysearch/src/error/mod.rs, crates/tinysearch/src/provider/direct/parallel.rs, crates/tinysearch/src/provider/direct/tavily.rs, crates/tinysearch/src/provider/direct/tinyfish.rs, crates/tinysearch/src/provider/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 13 files could not be reviewed: crates/tinysearch-bus/src/errors/mod.rs, crates/tinysearch-bus/src/names/mod.rs, crates/tinysearch/src/search/mod.rs, crates/tinysearch/src/search/roles/mod.rs, crates/tinysearch/src/tinybus_module/mod.rs, crates/tinysearch-bus/src/search/catalog/mod.rs, crates/tinysearch-bus/src/search/mod.rs, crates/tinysearch-bus/src/version/mod.rs, crates/tinysearch/src/error/mod.rs, crates/tinysearch/src/provider/direct/parallel.rs, crates/tinysearch/src/provider/direct/tavily.rs, crates/tinysearch/src/provider/direct/tinyfish.rs, crates/tinysearch/src/provider/mod.rs.

tests

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/tests
  • Lane summary: No reviewer could be consulted.

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/description
  • Lane summary: No reviewer could be consulted.

e2e

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: No end-to-end harness in this repository: no e2e test files and no e2e workflow.
Evidence and run details
  • Models: ladder/vectors
  • Spend: $0.000006
  • Tokens: 0 input · 0 output · 0 cached · 597 embedding
Head State Pass summary
2a71ea9da68e incomplete 0 active finding(s), 0 resolved finding(s) (at 1790882500)

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinysearch-bus/src/errors/mod.rs, crates/tinysearch-bus/src/names/mod.rs, crates/tinysearch-bus/src/search/catalog/mod.rs, crates/tinysearch-bus/src/search/mod.rs, crates/tinysearch-bus/src/version/mod.rs, crates/tinysearch/src/error/mod.rs, crates/tinysearch/src/provider/direct/parallel.rs, crates/tinysearch/src/provider/direct/tavily.rs and 7 more.

$0.0000 · 0 in / 0 out · 597 embedded · ladder/vectors

@senamakel
senamakel merged commit ea276ea into main Oct 2, 2026
16 checks passed
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.

1 participant