Skip to content

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

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

senamakel merged 3 commits into
mainfrom
legacy-test-renames

Conversation

@senamakel

@senamakel senamakel commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Renames 9 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; 9 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

  • Maintenance
    • Updated internal test organization across document-processing components.
    • No user-facing functionality changes are indicated.

senamakel and others added 3 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>
Updated the pinned commit for the tinybus vendored dependency to include the latest upstream changes.

Auto-committed-on: dragonfly
@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: 25290eb964d3
Updated: 1790882923 (Unix time)

Review snapshot

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

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.

Pending checks: TinyBus module E2E

Could not review: crates/tinydocs-bus/src/error/mod.rs, crates/tinydocs-bus/src/spec/document/mod.rs, crates/tinydocs-bus/src/spec/image/mod.rs, crates/tinydocs-bus/src/spec/presentation/mod.rs, crates/tinydocs-module/src/outputs/mod.rs, crates/tinydocs-module/src/service/mod.rs, src/docx/mod.rs, src/pdf/mod.rs, src/pptx/mod.rs, tinysweeper/description, tinysweeper/e2e, tinysweeper/tests

Before merge

  • Complete the critique review for crates/tinydocs-bus/src/error/mod.rs, crates/tinydocs-bus/src/spec/image/mod.rs, crates/tinydocs-bus/src/spec/presentation/mod.rs, crates/tinydocs-module/src/outputs/mod.rs, crates/tinydocs-module/src/service/mod.rs, src/docx/mod.rs, src/pdf/mod.rs, src/pptx/mod.rs, crates/tinydocs-bus/src/spec/document/mod.rs.
  • Complete the security review for crates/tinydocs-bus/src/error/mod.rs, crates/tinydocs-module/src/outputs/mod.rs, crates/tinydocs-module/src/service/mod.rs, src/docx/mod.rs, src/pdf/mod.rs, src/pptx/mod.rs, crates/tinydocs-bus/src/spec/image/mod.rs, crates/tinydocs-bus/src/spec/presentation/mod.rs, crates/tinydocs-bus/src/spec/document/mod.rs.
  • Complete the tests review for tinysweeper/tests.
  • Complete the description review for tinysweeper/description.
  • Wait for TinyBus module E2E.
  • Complete the e2e review for tinysweeper/e2e.

How this fits together

flowchart LR
  n0["Error<br/>changed"]:::changed
  n1["DocumentSpec<br/>changed"]:::changed
  n2["build<br/>changed"]:::changed
  n3["extract_text<br/>changed"]:::changed
  n4["generate"]:::impacted
  n5["Result"]:::impacted
  n6["from_bytes"]:::impacted
  n7["generate_docx_holds_a_readable_document"]:::impacted
  n8["invalid_input"]:::impacted
  n9["check_image"]:::impacted
  n3 -->|calls| n8
  n4 -->|calls| n2
  n5 -->|uses| n0
  n6 -->|calls| n8
  n7 -->|uses| n1
  n9 -->|calls| n8
  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/tinydocs-bus/src/error/mod.rs, crates/tinydocs-bus/src/spec/image/mod.rs, crates/tinydocs-bus/src/spec/presentation/mod.rs, crates/tinydocs-module/src/outputs/mod.rs, crates/tinydocs-module/src/service/mod.rs, src/docx/mod.rs, src/pdf/mod.rs, src/pptx/mod.rs, crates/tinydocs-bus/src/spec/document/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 9 files could not be reviewed: crates/tinydocs-bus/src/error/mod.rs, crates/tinydocs-bus/src/spec/image/mod.rs, crates/tinydocs-bus/src/spec/presentation/mod.rs, crates/tinydocs-module/src/outputs/mod.rs, crates/tinydocs-module/src/service/mod.rs, src/docx/mod.rs, src/pdf/mod.rs, src/pptx/mod.rs, crates/tinydocs-bus/src/spec/document/mod.rs.

security

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: crates/tinydocs-bus/src/error/mod.rs, crates/tinydocs-module/src/outputs/mod.rs, crates/tinydocs-module/src/service/mod.rs, src/docx/mod.rs, src/pdf/mod.rs, src/pptx/mod.rs, crates/tinydocs-bus/src/spec/image/mod.rs, crates/tinydocs-bus/src/spec/presentation/mod.rs, crates/tinydocs-bus/src/spec/document/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 9 files could not be reviewed: crates/tinydocs-bus/src/error/mod.rs, crates/tinydocs-module/src/outputs/mod.rs, crates/tinydocs-module/src/service/mod.rs, src/docx/mod.rs, src/pdf/mod.rs, src/pptx/mod.rs, crates/tinydocs-bus/src/spec/image/mod.rs, crates/tinydocs-bus/src/spec/presentation/mod.rs, crates/tinydocs-bus/src/spec/document/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: incomplete; unanswered: tinysweeper/e2e
  • Lane summary: No reviewer could be consulted; only the job states below are reported. Waiting on 1 end-to-end job: `TinyBus module E2E`.
  • Unresolved questions/checks: TinyBus module E2E
Evidence and run details
  • Models: ladder/vectors
  • Spend: $0.000005
  • Tokens: 0 input · 0 output · 0 cached · 509 embedding
Head State Pass summary
25290eb964d3 incomplete 0 active finding(s), 0 resolved finding(s) (at 1790882923)

tinysweeper 0.1.0

@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:30:46.256445Z 25290eb 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.

@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: 042be765-9761-483d-bb65-619686609d2b

📥 Commits

Reviewing files that changed from the base of the PR and between 255fa63 and 25290eb.

📒 Files selected for processing (20)
  • AGENTS.md
  • crates/tinydocs-bus/src/error/mod.rs
  • crates/tinydocs-bus/src/error/mod_tests.rs
  • crates/tinydocs-bus/src/spec/document/mod.rs
  • crates/tinydocs-bus/src/spec/document/mod_tests.rs
  • crates/tinydocs-bus/src/spec/image/mod.rs
  • crates/tinydocs-bus/src/spec/image/mod_tests.rs
  • crates/tinydocs-bus/src/spec/presentation/mod.rs
  • crates/tinydocs-bus/src/spec/presentation/mod_tests.rs
  • crates/tinydocs-module/src/outputs/mod.rs
  • crates/tinydocs-module/src/outputs/mod_tests.rs
  • crates/tinydocs-module/src/service/mod.rs
  • crates/tinydocs-module/src/service/mod_tests.rs
  • src/docx/mod.rs
  • src/docx/mod_tests.rs
  • src/pdf/mod.rs
  • src/pdf/mod_tests.rs
  • src/pptx/mod.rs
  • src/pptx/mod_tests.rs
  • vendor/tinybus
💤 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 modules in several Rust modules now load from mod_tests.rs through explicit path attributes. The related file-naming guidance was removed from AGENTS.md, and the vendored tinybus reference changed.

Changes

Test module path updates

Layer / File(s) Summary
Explicit test module paths
AGENTS.md, crates/tinydocs-bus/src/error/mod.rs, crates/tinydocs-bus/src/spec/document/mod.rs, crates/tinydocs-bus/src/spec/image/mod.rs, crates/tinydocs-bus/src/spec/presentation/mod.rs, crates/tinydocs-module/src/outputs/mod.rs, crates/tinydocs-module/src/service/mod.rs, src/docx/mod.rs, src/pdf/mod.rs, src/pptx/mod.rs
The test module declarations now use mod_tests.rs as their source. AGENTS.md no longer instructs maintainers to rename existing test files on their next edit.
Vendored tinybus revision
vendor/tinybus
The subproject reference changed to a new commit. Its contents are not available in this diff.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 25290

This PR changes test-file resolution but does not introduce the reported cache race. No PR-specific merge risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to 25290

The change affects 3 systems.

Changed systems: crates, src, AGENTS.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — crates (service) was modified; 6 changed files map to changed impact.
  • observed — src (service) was modified; 3 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 instruction to rename pre-existing test.rs and <module>_test.rs files on their next edit, retain the module name, and add a #[path] attribute.
  • observed — Modified behavior in crates/tinydocs-bus/src/error/mod.rs: The test module now uses mod_tests.rs as its source file through an explicit path attribute.
  • observed — Modified behavior in crates/tinydocs-bus/src/spec/document/mod.rs: Added an explicit path for the test module, replacing the default module-file lookup with mod_tests.rs.
  • observed — Modified behavior in crates/tinydocs-bus/src/spec/image/mod.rs: The test module now loads from mod_tests.rs via an explicit path attribute.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 9 files. (1 skipped: 1 …
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: renaming legacy Rust test files to the *_tests.rs convention.
✨ Finishing Touches
📝 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 checked each module path,
And found mod_tests along the trail.
The old rename note hopped away,
A tinybus pointer changed its place,
Then carrots marked the end of day.

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

@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/tinydocs-bus/src/error/mod.rs, crates/tinydocs-bus/src/spec/document/mod.rs, crates/tinydocs-bus/src/spec/image/mod.rs, crates/tinydocs-bus/src/spec/presentation/mod.rs, crates/tinydocs-module/src/outputs/mod.rs, crates/tinydocs-module/src/service/mod.rs, src/docx/mod.rs, src/pdf/mod.rs and 4 more.

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

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Oct 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25290eb964

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vendor/tinybus
@@ -1 +1 @@
Subproject commit dc8c92f58b5dcb8b8af4a5b3a81aafe3333fa1e4
Subproject commit df6f990cec3b130db12d6cd0c8e24f11c30b28e6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove the unrelated TinyBus gitlink update

This test-only commit also moves the pinned TinyBus revision from dc8c92f to df6f990. Because Cargo.toml patches all three TinyBus crates to this vendored path, the pointer change alters the compiled dependency despite the commit claiming no runtime behavior changes; revert it here and update the gitlink in a separately reviewed dependency commit.

AGENTS.md reference: AGENTS.md:L157-L160

Useful? React with 👍 / 👎.

Comment thread src/docx/mod.rs
Comment on lines +181 to 182
#[path = "mod_tests.rs"]
mod test;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Rename the test module identifiers too

After this patch removes the legacy exception that permitted keeping the old module name, all nine declarations still use mod test (or pub(crate) mod test) rather than the required mod tests. Rename these identifiers and update the presentation test's crate::spec::image::test reference so the newly renamed files actually follow the repository's declared test-module convention.

AGENTS.md reference: AGENTS.md:L280-L289

Useful? React with 👍 / 👎.

@senamakel
senamakel merged commit 64cd5ff into main Oct 2, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant