Skip to content

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

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 11 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; 11 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

  • Documentation
    • Updated testing guidance to remove the recommendation to rename existing test files when modifying them.
  • Tests
    • Standardized how test files are organized and referenced across project areas. No user-facing behavior or product functionality 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>
@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:48.803930Z b5efe58 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: 140e775a-1cc3-4c81-ad44-c30d069dbaf4

📥 Commits

Reviewing files that changed from the base of the PR and between 9f674d2 and b5efe58.

📒 Files selected for processing (23)
  • AGENTS.md
  • crates/tinychannels-bus/src/adapters/mod.rs
  • crates/tinychannels-bus/src/adapters/mod_tests.rs
  • crates/tinychannels-bus/src/channel/mod.rs
  • crates/tinychannels-bus/src/channel/mod_tests.rs
  • crates/tinychannels-bus/src/delivery/segment.rs
  • crates/tinychannels-bus/src/delivery/segment_tests.rs
  • crates/tinychannels-bus/src/security/mod.rs
  • crates/tinychannels-bus/src/security/mod_tests.rs
  • crates/tinychannels-bus/src/text/mod.rs
  • crates/tinychannels-bus/src/text/mod_tests.rs
  • src/approvals/mod.rs
  • src/approvals/mod_tests.rs
  • src/delivery/mod.rs
  • src/delivery/mod_tests.rs
  • src/delivery/progressive/mod.rs
  • src/delivery/progressive/mod_tests.rs
  • src/harness/mod.rs
  • src/harness/mod_tests.rs
  • src/relay/mod.rs
  • src/relay/mod_tests.rs
  • src/remote/mod.rs
  • src/remote/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-only module declarations now select explicit test source paths in the bus crate and the main crate. The testing guidelines no longer instruct contributors to rename existing test files when they next touch them.

Changes

Test Module Paths

Layer / File(s) Summary
Test module source paths
AGENTS.md, crates/tinychannels-bus/src/{adapters,channel,delivery/segment,security,text}..., src/{approvals,delivery,delivery/progressive,harness,relay,remote}/mod.rs
Test module declarations now select mod_tests.rs or segment_tests.rs. The testing guidelines remove the instruction to rename existing test files when next touched.

Priority: ⬇️ Low

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

Change: Other

Merge Risk: ⚪ Minimal · up to b5efe

This change reorganizes test source filenames without changing production behavior. The listed paths match their renamed test files, leaving no concrete merge-blocking risk; routine CI should run the deferred checks.

Architecture Summary

Architecture risk: 🔵 Low · up to b5efe

The change affects 3 systems.

Changed systems: src, crates, AGENTS.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 6 changed files map to changed impact.
  • observed — crates (service) was modified; 5 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 existing test.rs and <module>_test.rs files, keep their mod name, and add a #[path] attribute when next touched.
  • observed — Modified behavior in crates/tinychannels-bus/src/adapters/mod.rs: Added a test-only path attribute directing the test module to mod_tests.rs.
  • observed — Modified behavior in crates/tinychannels-bus/src/channel/mod.rs: The test module is now explicitly sourced from mod_tests.rs.
  • observed — Modified behavior in crates/tinychannels-bus/src/delivery/segment.rs: The test module now loads from segment_tests.rs instead of segment_test.rs.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 11 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 clearly and concisely describes the primary change: renaming legacy test.rs and *_test.rs files to *_tests.rs.
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 file’s name,
And points the module path the same.
mod_tests.rs now joins the flow,
While segment_tests.rs takes its bow.
The old rename note hops away,
And tests keep finding where they stay.

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

@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: b5efe5881c3d
Updated: 1790882381 (Unix time)

Review snapshot

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

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/tinychannels-bus/src/adapters/mod.rs, crates/tinychannels-bus/src/channel/mod.rs, crates/tinychannels-bus/src/delivery/segment.rs, crates/tinychannels-bus/src/security/mod.rs, crates/tinychannels-bus/src/text/mod.rs, src/approvals/mod.rs, src/delivery/mod.rs, src/delivery/progressive/mod.rs, src/harness/mod.rs, src/relay/mod.rs, src/remote/mod.rs, tinysweeper/description, tinysweeper/tests

Before merge

  • Complete the critique review for crates/tinychannels-bus/src/adapters/mod.rs, crates/tinychannels-bus/src/channel/mod.rs, crates/tinychannels-bus/src/delivery/segment.rs, crates/tinychannels-bus/src/security/mod.rs, crates/tinychannels-bus/src/text/mod.rs, src/approvals/mod.rs, src/delivery/mod.rs, src/delivery/progressive/mod.rs, src/harness/mod.rs, src/relay/mod.rs, src/remote/mod.rs.
  • Complete the security review for crates/tinychannels-bus/src/adapters/mod.rs, crates/tinychannels-bus/src/channel/mod.rs, crates/tinychannels-bus/src/delivery/segment.rs, crates/tinychannels-bus/src/security/mod.rs, crates/tinychannels-bus/src/text/mod.rs, src/approvals/mod.rs, src/delivery/mod.rs, src/delivery/progressive/mod.rs, src/harness/mod.rs, src/relay/mod.rs, src/remote/mod.rs.
  • Complete the tests review for tinysweeper/tests.
  • Complete the description review for tinysweeper/description.

How this fits together

flowchart LR
  n0["constant_time_eq<br/>changed"]:::changed
  n1["turn"]:::impacted
  n2["try_pair_blocking"]:::impacted
  n3["text_delta_uses_draft_when_editing_supported"]:::impacted
  n4["...s_to_text_when_native_actions_unavailable"]:::impacted
  n5["media_event_projects_media_urls"]:::impacted
  n2 -->|calls| n0
  n3 -->|calls| n1
  n3 -->|tests| n1
  n4 -->|calls| n1
  n4 -->|tests| n1
  n5 -->|calls| n1
  n5 -->|tests| n1
  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/tinychannels-bus/src/adapters/mod.rs, crates/tinychannels-bus/src/channel/mod.rs, crates/tinychannels-bus/src/delivery/segment.rs, crates/tinychannels-bus/src/security/mod.rs, crates/tinychannels-bus/src/text/mod.rs, src/approvals/mod.rs, src/delivery/mod.rs, src/delivery/progressive/mod.rs, src/harness/mod.rs, src/relay/mod.rs, src/remote/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 11 files could not be reviewed: crates/tinychannels-bus/src/adapters/mod.rs, crates/tinychannels-bus/src/channel/mod.rs, crates/tinychannels-bus/src/delivery/segment.rs, crates/tinychannels-bus/src/security/mod.rs, crates/tinychannels-bus/src/text/mod.rs, src/approvals/mod.rs, src/delivery/mod.rs, src/delivery/progressive/mod.rs, src/harness/mod.rs, src/relay/mod.rs, src/remote/mod.rs.

security

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: crates/tinychannels-bus/src/adapters/mod.rs, crates/tinychannels-bus/src/channel/mod.rs, crates/tinychannels-bus/src/delivery/segment.rs, crates/tinychannels-bus/src/security/mod.rs, crates/tinychannels-bus/src/text/mod.rs, src/approvals/mod.rs, src/delivery/mod.rs, src/delivery/progressive/mod.rs, src/harness/mod.rs, src/relay/mod.rs, src/remote/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 11 files could not be reviewed: crates/tinychannels-bus/src/adapters/mod.rs, crates/tinychannels-bus/src/channel/mod.rs, crates/tinychannels-bus/src/delivery/segment.rs, crates/tinychannels-bus/src/security/mod.rs, crates/tinychannels-bus/src/text/mod.rs, src/approvals/mod.rs, src/delivery/mod.rs, src/delivery/progressive/mod.rs, src/harness/mod.rs, src/relay/mod.rs, src/remote/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.000005
  • Tokens: 0 input · 0 output · 0 cached · 543 embedding
Head State Pass summary
b5efe5881c3d incomplete 0 active finding(s), 0 resolved finding(s) (at 1790882381)

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/tinychannels-bus/src/adapters/mod.rs, crates/tinychannels-bus/src/channel/mod.rs, crates/tinychannels-bus/src/delivery/segment.rs, crates/tinychannels-bus/src/security/mod.rs, crates/tinychannels-bus/src/text/mod.rs, src/approvals/mod.rs, src/delivery/mod.rs, src/delivery/progressive/mod.rs and 5 more.

$0.0000 · 0 in / 0 out · 543 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: b5efe5881c

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

pub use local::{LocalChannelAdapter, LocalOutboundSink};

#[cfg(test)]
#[path = "mod_tests.rs"]

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 Add the required parent import to migrated test files

When externalizing these suites, this file—and the migrated src/delivery/mod_tests.rs, src/harness/mod_tests.rs, and src/relay/mod_tests.rs files—omits use super::*; entirely and instead imports the module API through crate paths. The repository explicitly requires sibling unit-test files to start with the parent glob import, so normalize these migrated files as part of the rename.

AGENTS.md reference: AGENTS.md:L140-L142

Useful? React with 👍 / 👎.

Comment thread src/delivery/mod.rs
};

#[cfg(test)]
#[path = "mod_tests.rs"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update documentation paths after renaming the suites

After this rename, docs/spec/tinychannels-migration-remaining-plan.md still points readers to the now-deleted src/delivery/test.rs at line 130 and src/relay/test.rs at line 148. Anyone following the G2 or G4 test-coverage notes now reaches nonexistent files; update both references to their new mod_tests.rs paths.

Useful? React with 👍 / 👎.

@senamakel
senamakel merged commit 3863a8e into main Oct 2, 2026
10 checks passed
@senamakel
senamakel deleted the legacy-test-renames branch October 8, 2026 12:02
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