Skip to content

test(coverage): batch 5–8 — Rust unit tests toward 80% for 20 modules#607

Merged
senamakel merged 3 commits intotinyhumansai:mainfrom
CodeGhost21:issue-530-rust-test-coverage
Apr 16, 2026
Merged

test(coverage): batch 5–8 — Rust unit tests toward 80% for 20 modules#607
senamakel merged 3 commits intotinyhumansai:mainfrom
CodeGhost21:issue-530-rust-test-coverage

Conversation

@CodeGhost21
Copy link
Copy Markdown
Collaborator

Summary

  • Adds 244 new unit tests across 20 Rust modules to push line coverage from 75.06% → 75.70% overall
  • Moves 20 modules above the 80% line coverage threshold
  • All 3,974 tests pass (up from 3,730 before this PR)

Modules improved:

Module Before After
api/socket 77% 100%
rpc/dispatch 75% 100%
config/schema/channels 77% 100%
composio/gmail/sync 78% 97%
composio/notion/sync 77% 96%
webhooks/router 78% 96%
agent/hooks 78% 92%
config/schema/proxy 76% 90%
local_ai/device 79% 89%
text_input/schemas 73% 89%
agent/harness/interrupt 76% 88%
billing/schemas 79% 87%
screen_intelligence/schemas 78% 81%
about_app/types 71% 80%+
health/schemas 72% 80%+
app_state/schemas 72% 80%+
core/types 53% 80%+
config/schema/identity_cost 74% 80%+
cron/scheduler 79% 80%+

What's tested:

  • Schema catalog integrity (count, namespace, description)
  • Param deserialization (valid, invalid, edge cases)
  • Serde roundtrips (JSON, TOML)
  • Pure helper functions (sanitize, normalize, parse)
  • Error paths and edge cases
  • Webhook router lifecycle (register, unregister, persist, logs)
  • Cron scheduler helpers (one-shot, env assignment, quote stripping, delivery modes)

Test plan

  • cargo test --lib — all 3,974 tests pass
  • cargo fmt --all --check — clean
  • cargo check — clean
  • Pre-push hooks pass (prettier, eslint, tsc, cargo check)

Closes #530 (partial — continues coverage push toward 80% target)

…tinyhumansai#530)

Add 244 new unit tests across 20 modules to push line coverage from
75.06% → 75.70% overall. Modules improved:

- api/socket: 77% → 100%
- rpc/dispatch: 75% → 100%
- config/schema/channels: 77% → 100%
- composio/gmail/sync: 78% → 97%
- composio/notion/sync: 77% → 96%
- webhooks/router: 78% → 96%
- agent/hooks: 78% → 92%
- config/schema/proxy: 76% → 90%
- local_ai/device: 79% → 89%
- text_input/schemas: 73% → 89%
- agent/harness/interrupt: 76% → 88%
- billing/schemas: 79% → 87%
- screen_intelligence/schemas: 78% → 81%
- about_app/types, health/schemas, app_state/schemas,
  core/types, config/schema/identity_cost, cron/scheduler

Tests cover: schema catalog integrity, param deserialization,
serde roundtrips, helper functions, edge cases, error paths.
All 3974 tests pass.
@CodeGhost21 CodeGhost21 force-pushed the issue-530-rust-test-coverage branch from 20c839b to e4d7cc7 Compare April 16, 2026 13:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

Warning

Rate limit exceeded

@CodeGhost21 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 38 minutes and 50 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 38 minutes and 50 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 33cb2ffb-22f6-4fab-a8d7-eff92ffa248b

📥 Commits

Reviewing files that changed from the base of the PR and between a78506f and 8ef518a.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • app/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (25)
  • src/api/socket.rs
  • src/core/types.rs
  • src/openhuman/about_app/types.rs
  • src/openhuman/agent/harness/interrupt.rs
  • src/openhuman/agent/hooks.rs
  • src/openhuman/app_state/schemas.rs
  • src/openhuman/billing/schemas.rs
  • src/openhuman/channels/controllers/schemas.rs
  • src/openhuman/composio/providers/gmail/sync.rs
  • src/openhuman/composio/providers/notion/sync.rs
  • src/openhuman/config/schema/channels.rs
  • src/openhuman/config/schema/identity_cost.rs
  • src/openhuman/config/schema/proxy.rs
  • src/openhuman/cost/tracker.rs
  • src/openhuman/credentials/profiles.rs
  • src/openhuman/cron/scheduler.rs
  • src/openhuman/health/schemas.rs
  • src/openhuman/local_ai/device.rs
  • src/openhuman/memory/conversations/store.rs
  • src/openhuman/screen_intelligence/schemas.rs
  • src/openhuman/text_input/schemas.rs
  • src/openhuman/tools/impl/browser/browser_open.rs
  • src/openhuman/tools/impl/filesystem/update_memory_md.rs
  • src/openhuman/webhooks/router.rs
  • src/rpc/dispatch.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

…als profiles, cost tracker (tinyhumansai#530)

Add 53 new tests across 4 more modules:
- browser_open: IPv4/IPv6 private ranges, host matching, normalize_domain edges
- update_memory_md: empty file, section creation, unknown action, param validation
- credentials/profiles: token expiry, CRUD operations, active profile management
- cost/tracker: budget warnings, monthly exceeded, model stats aggregation

All 4027 tests pass.
…inyhumansai#530)

Add 33 new tests:
- channels/controllers/schemas: per-function input validation, param
  deserialization, helper coverage
- memory/conversations/store: thread lifecycle (create, delete, idempotent),
  multi-thread, empty/nonexistent thread, purge empty store

All 4060 tests pass.
@senamakel senamakel merged commit ea6895f into tinyhumansai:main Apr 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increase Rust unit test coverage to 80% for critical modules

2 participants