Skip to content

feat(test): raise repository coverage gate to 90 percent#46

Merged
akiojin merged 4 commits into
developfrom
feature/test-coverage-improvement
Feb 27, 2026
Merged

feat(test): raise repository coverage gate to 90 percent#46
akiojin merged 4 commits into
developfrom
feature/test-coverage-improvement

Conversation

@akiojin

@akiojin akiojin commented Feb 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Added and stabilized Rust tests across CLI, daemon, and LSP modules to raise line coverage above 90% so regressions are caught earlier.
  • Updated CI coverage enforcement and development docs so local commands and required checks stay consistent.
  • Hardened flaky socket-based tests and shared test environment state handling to make cargo llvm-cov runs deterministic.

Changes

  • src/main.rs: extracted run_with_cli and added broad command-path tests, including text/json output branches and batch/instance flows.
  • src/unityd.rs and src/lspd.rs: expanded daemon request/stream tests and stabilized unix socket helper behavior for reliable coverage execution.
  • src/lsp.rs, src/local_tools.rs, src/lsp_manager.rs, src/transport.rs, src/instances.rs: added coverage-focused unit tests for parsing, helpers, request shaping, and error/fallback branches.
  • src/test_env.rs: added a shared env-var lock used by test modules to avoid cross-test environment races.
  • .github/workflows/test.yml: enforced Rust coverage gate with cargo llvm-cov --all-targets --summary-only --fail-under-lines 90.
  • docs/development.md and .github/workflows/README.md: updated documented coverage commands and CI check descriptions.
  • lsp/Server.Tests.csproj: added coverage package reference for C# test coverage enforcement.

Testing

  • cargo test --all-targets — passes (130 passed, 0 failed).
  • cargo llvm-cov --all-targets --summary-only — passes with total line coverage 90.13%.
  • cargo llvm-cov --all-targets --summary-only --fail-under-lines 90 — passes (90.02%).

Related Issues / Links

  • None

Checklist

  • Tests added/updated
  • Lint/format passed (cargo clippy, cargo fmt, svelte-check) — cargo fmt passed; cargo clippy/svelte-check not run in this task.
  • Documentation updated (if user-facing change)
  • Migration/backfill plan included (if schema/data change) — N/A: no schema/data changes.
  • CHANGELOG impact considered (breaking change flagged in commit) — no breaking change.

Context

  • This branch’s main goal was to raise automated test coverage to the 90% target and make the coverage gate reproducible in CI and local runs.

Notes

  • C# coverage command is wired in CI, but local dotnet execution was not performed in this environment.

@coderabbitai

coderabbitai Bot commented Feb 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/test-coverage-improvement

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.

@akiojin
akiojin merged commit fee7732 into develop Feb 27, 2026
17 checks passed
@akiojin
akiojin deleted the feature/test-coverage-improvement branch February 27, 2026 04:04
akiojin added a commit that referenced this pull request Mar 3, 2026
feat(test): raise repository coverage gate to 90 percent
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.

1 participant