Skip to content

test(module): restore resolve.rs per-file coverage floor (fixes red main CI) - #113

Merged
senamakel merged 2 commits into
mainfrom
release-train-green
Oct 26, 2026
Merged

senamakel merged 2 commits into
mainfrom
release-train-green

Conversation

@senamakel

@senamakel senamakel commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Main CI fails in the coverage job: crates/tinybus/src/module/resolve.rs sits at 89.89% line coverage against the 90% per-file floor. Adds tests for setup_outcome and LoadError::into_message. Clippy -D warnings and rustdoc -D warnings are clean.

Summary by CodeRabbit

  • Tests
    • Added coverage for how module states are reported, including successful readiness and non-serving states.
    • Added checks for user-facing messages associated with failed, loading, and disabled modules. These tests help ensure that status and error messages remain consistent as the application changes.

senamakel and others added 2 commits October 26, 2026 05:09
Add the generated coverage report so the current test coverage can be inspected without rerunning the suite.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…er-file coverage floor

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

tinysweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Reviewed head: fafc8eedf1206330b0fd8027a3a5dd0693672b5e

Verdict: Ready for maintainer review · Priority: none
Coverage: Reviewed 1 of 1 files.
Pull request purpose (title): test(module): restor…

Diagnostics and supporting details

Full summary

Pull request purpose (title): test(module): restore resolve.rs per-file coverage floor (fixes red main CI). Tiny Sweeper completed its review; deterministic results follow.

Review snapshot

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

Completeness: Complete
Test assessment: Test coverage is assessed from changed tests and lane evidence; execution is not claimed without trusted check data.

Features

  • Added — ModuleInfo fixture helper for probe modules: Test-only helper that populates every `ModuleInfo` field, letting the new tests construct module info in an arbitrary state without duplicating literals. (crates/tinybus/src/module/resolve_tests.rs mod resolver {)

Tests

  • unit — Covers `setup_outcome` across all ModuleState branches, checking the exact reason substrings for faulted/refused/not-running/initializing states and success for Ready.: The tests lane (answered) reports the assertions are real and would fail if the messages or branch handling changed, with no production code to regress. Test execution is not confirmed by trusted check evidence. (crates/tinybus/src/module/resolve_tests.rs mod resolver {)
  • unit — Covers `LoadError::into_message` for Failed (exact match), StillLoading (contains 'still loading'), and Disabled (contains '(voice)').: The tests lane (answered) reports the substring assertions would catch message regressions. Test execution is not confirmed by trusted check evidence. (crates/tinybus/src/module/resolve_tests.rs mod resolver {)

Findings

No active actionable findings.

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The critique lane (answered, 1/1 files reviewed) reports the tests match the implementations checked and found no reportable defect.
  • Lane summary: The added tests match the implementations I checked: `setup_outcome` maps Faulted/Failed to "faulted during setup", Rejected/Unresolved to "was refused", Stopped/Disabled to "is not running", Initializing to the SETUP_DEADLINE message, and returns Ok for Ready; `LoadError::into_message` yields "x", contains "still loading", and formats "(voice)". The `ModuleInfo` literal supplies every field the struct declares. One detail remains unsettled: whether `AssertionError`/assert message rendering (`err(ModuleState::Faulted { reason: reason() })` returning `String` via `unwrap_err()`) type-checks, which depends on `setup_outcome`'s error type being `String` — it is, per the lookup. I found no reportable defect. _The code index is behind this pull request (indexed at `3359bc9918b5`), so retrieved context may be out of date._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The security lane (answered, 1/1 files reviewed) reports the change is pure test code with no production changes, subprocess/network calls, or untrusted input reaching a sink.
  • Lane summary: The change adds two pure unit tests plus a small `ModuleInfo` fixture helper in a test-only file. No production code, no subprocess or network calls, no untrusted input reaching a sink. One nit worth flagging is that the new tests are appended outside the existing `mod resolver` block, so the fixture helper sits at file scope — but since no findings of substance are needed, I decline to report style. Nothing reportable. _The code index is behind this pull request (indexed at `3359bc9918b5`), so retrieved context may be out of date._

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The tests lane (answered) reports the assertions are concrete and would fail on message or branch-handling regressions; no production code changes, so nothing to regress.
  • Lane summary: This PR only adds two tests to `resolve_tests.rs`, exercising `setup_outcome` and `LoadError::into_message` across their state/message branches with concrete substring assertions. No production code changes, so there is nothing to regress; the assertions are real and would fail if the messages or branch handling changed. _The code index is behind this pull request (indexed at `3359bc9918b5`), so retrieved context may be out of date._

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The commits lane (answered) reports no sensitive content in committed files.
  • Lane summary: No sensitive content in committed files. _The code index is behind this pull request (indexed at `3359bc9918b5`), so retrieved context may be out of date._

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The description lane (answered) reports the added tests match the PR description and follow the repository's test naming rules, with no defects found.
  • Lane summary: The PR only adds two unit tests to resolve_tests.rs covering setup_outcome and LoadError::into_message, which matches the description; the assertions align with the source functions and the test file follows the repository's test naming rules. No defects found. _The code index is behind this pull request (indexed at `3359bc9918b5`), so retrieved context may be out of date._
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.000185
  • Tokens: 97465 input · 2355 output · 0 cached · 116 embedding
  • Updated: 2026-10-26T05:12:16Z
Head State Pass summary
fafc8eedf120 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-10-26T05:12:16Z)

tinysweeper 0.1.2

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T05:12:20.733648Z fafc8ee 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 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 82f653b4-7544-4823-95cb-b31b470483aa
Commits

Reviewing files that changed from the base of the PR and between fb49628 and fafc8ee.

Files selected for processing: 1
  • crates/tinybus/src/module/resolve_tests.rs

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

This change adds tests for setup_outcome across module states and for the messages returned by selected LoadError variants.

Changes: Resolver outcome tests

Layer / File(s) Summary
Setup outcomes and error messages
crates/tinybus/src/module/resolve_tests.rs
Tests state-specific setup errors and confirms that Ready succeeds. Also checks messages for LoadError::Failed, StillLoading, and Disabled.

Priority: Normal

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

Change: Other

Possibly related PRs

Suggested labels: priority: p3

Merge Risk: Minimal · up to fafc8

The PR adds focused resolver tests and presents no identified merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed 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 identifies the added module tests and their purpose: restoring the per-file coverage floor for resolve.rs and fixing main CI.
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.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks each state in turn,
“Ready” gets a pass, errors return.
Failed carries its message clear,
Still loading and disabled appear.
Tests keep each outcome in view,
And hop along to catch what’s new.

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. Approving.

Diagnostics

Total spend: $0.0002

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Oct 26, 2026
@senamakel
senamakel merged commit 7197cc2 into main Oct 26, 2026
20 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