Skip to content

test: ratchet coverage floor to 89 - #387

Merged
Sinity merged 1 commit into
masterfrom
feature/test/coverage-ratchet-89p5
Apr 23, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/test/coverage-ratchet-89p5

Conversation

@Sinity

@Sinity Sinity commented Apr 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Raise the repository coverage floor from 88% to 89% after a broader direct
runtime test tranche that pushes the measured suite to 89.46% total coverage.

Problem

Issue #197 tracks the return from the temporary 80% floor back to an honest 90%.
After #386 the gate measured 88.24%, which was enough to justify 88 but not 89.
The next raise needed to do more than scrape the next integer: it needed to
cover the remaining active operator surface with headroom, especially showcase
QA workflow/control seams, sync/read wrappers, and runtime helper modules that
still distorted the floor despite being part of normal usage.

Solution

This tranche broadened the target package map before touching code and then
added owning-module runtime tests across the remaining operator-facing surface:

  • showcase QA workflow, stage dispatch, catalog loading, invariants, reporting,
    and runner support
  • sync conversation/product query wrappers and repository product/raw reads
  • product registry dispatch and facade product seams
  • CLI/MCP operator helpers and plain-console rendering support
  • version/runtime metadata helpers and a small remaining root/runtime tail

The floor in pyproject.toml now moves from 88 to 89 only after the full
coverage gate cleared with margin.

Ref #197

Verification

  • pytest -q tests/unit/showcase/test_catalog_loader_runtime.py tests/unit/showcase/test_invariants_runtime.py tests/unit/showcase/test_operator_reporting_runtime.py tests/unit/showcase/test_qa_runner_stages_runtime.py tests/unit/showcase/test_qa_workflow_runtime.py tests/unit/showcase/test_showcase_runner_support_runtime.py
    • 50 passed
  • pytest -q tests/unit/core/test_product_registry_runtime.py tests/unit/core/test_sync_surface_runtime.py tests/unit/core/test_version_runtime.py tests/unit/storage/test_repository_product_runtime.py
    • 26 passed
  • pytest -q tests/unit/cli/test_operator_support_runtime.py tests/unit/mcp/test_server_runtime.py
    • 18 passed
  • pytest -q tests/unit/ui/test_facade_console_runtime.py tests/unit/core/test_version_runtime.py tests/unit/mcp/test_server_runtime.py tests/unit/showcase/test_operator_reporting_runtime.py
    • 20 passed
  • devtools coverage-gate
    • 5583 passed in 311.67s
    • TOTAL ... 89.46%
  • devtools verify --quick
    • verify: all checks passed

Summary by CodeRabbit

  • Tests

    • Added comprehensive runtime test suites covering operator support, product registry, sync surface, versioning, MCP server, showcase catalog, invariants, operator reporting, QA workflows, and repository operations.
  • Chores

    • Increased code coverage threshold to 89%.

Problem
The repository floor was still pinned at 88 after #386, and the next
raise needed more than a token point scrape. The remaining debt sat in
showcase QA workflow/control surfaces, sync/read wrappers, registry
helpers, version/runtime seams, and a few operator utility modules that
still mattered to normal use.

What changed
This tranche adds direct owning-module runtime tests across those
surfaces and raises `fail_under` from 88 to 89 once the full gate
measured 89.46%. The new tests cover showcase QA orchestration,
serialized catalog/invariant/reporting helpers, sync and repository
wrapper seams, product registry dispatch, MCP/operator utility helpers,
plain-console rendering, Drive source client wiring, and version/git
metadata error paths.

Ref #197
@coderabbitai

coderabbitai Bot commented Apr 23, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f54c8516-11c8-40a6-9d07-c3f6f4635868

📥 Commits

Reviewing files that changed from the base of the PR and between 81ea1aa and 18aa976.

📒 Files selected for processing (14)
  • pyproject.toml
  • tests/unit/cli/test_operator_support_runtime.py
  • tests/unit/core/test_product_registry_runtime.py
  • tests/unit/core/test_sync_surface_runtime.py
  • tests/unit/core/test_version_runtime.py
  • tests/unit/mcp/test_server_runtime.py
  • tests/unit/showcase/test_catalog_loader_runtime.py
  • tests/unit/showcase/test_invariants_runtime.py
  • tests/unit/showcase/test_operator_reporting_runtime.py
  • tests/unit/showcase/test_qa_runner_stages_runtime.py
  • tests/unit/showcase/test_qa_workflow_runtime.py
  • tests/unit/showcase/test_showcase_runner_support_runtime.py
  • tests/unit/storage/test_repository_product_runtime.py
  • tests/unit/ui/test_facade_console_runtime.py

📝 Walkthrough

Walkthrough

Comprehensive runtime test suite addition across 13 test modules covering CLI, core products, sync/async bridge, version handling, MCP server, showcase catalog/invariants/QA workflows, storage repositories, and facade console. Coverage threshold increased from 88 to 89 percent in pyproject.toml.

Changes

Cohort / File(s) Summary
Coverage Configuration
pyproject.toml
Increased [tool.coverage.report].fail_under threshold from 88 to 89.
CLI Runtime Tests
tests/unit/cli/test_operator_support_runtime.py
Added tests validating MCP command transport handling, service initialization, unsupported transport rejection, and drive source client construction with mocked dependencies.
Core Runtime Tests
tests/unit/core/test_product_registry_runtime.py, test_sync_surface_runtime.py, test_version_runtime.py
Added comprehensive runtime test suites for product registry operations (formatting, queries, rendering), sync/async bridging (conversation/product mixins), and version resolution (Git detection, build info, lazy exports).
MCP Server Runtime Tests
tests/unit/mcp/test_server_runtime.py
Added tests validating repository-based accessors, backend selection, archive instantiation, FastMCP server construction, and stdio transport handling with caching behavior.
Showcase Runtime Tests
tests/unit/showcase/test_catalog_loader_runtime.py, test_invariants_runtime.py, test_operator_reporting_runtime.py, test_qa_runner_stages_runtime.py, test_qa_workflow_runtime.py, test_showcase_runner_support_runtime.py
Added extensive tests covering catalog loading (validators, assertions, exercises), invariant checking (JSON/exit code/stderr validation, error aggregation), QA reporting (VHS capture, report generation/serialization), QA runner stages (extra exercises, proof generation), QA workflow orchestration (runtime preparation, audit/ingest stages, full session execution), and showcase runner support (exercise selection, workspace seeding, output validation).
Storage Runtime Tests
tests/unit/storage/test_repository_product_runtime.py
Added tests validating hydration helpers, async read methods with query builder verification, and raw repository mutation/query operations with streaming behavior.
UI Runtime Tests
tests/unit/ui/test_facade_console_runtime.py
Added tests validating plain-text rendering (Text objects, markup stripping, table content) and console printing with mixed input types.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related issues

  • Issue #197: The pyproject.toml coverage threshold increase from 88 to 89 directly implements the coverage-floor raise discussed in this issue.

Possibly related PRs

  • PR #384: Both modify the same coverage configuration key ([tool.coverage.report].fail_under in pyproject.toml) and add extensive runtime tests.
  • PR #187: Both adjust the [tool.coverage.report].fail_under threshold in pyproject.toml.
  • PR #383: Both modify the same pyproject.toml coverage setting ([tool.coverage.report].fail_under).

Suggested labels

type:test, area:qa, area:storage, area:cli, area:pipeline, area:docs

Poem

🐰 A rabbit hops through test suites new,
With mocks and patches shining through!
From CLI hops to storage deep,
Runtime checks our promise keep.
Coverage blooms at eighty-nine—
These tests make polylogue divine! 🎪

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/test/coverage-ratchet-89p5

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.

@Sinity
Sinity merged commit 2badf03 into master Apr 23, 2026
11 of 12 checks passed
@Sinity
Sinity deleted the feature/test/coverage-ratchet-89p5 branch April 23, 2026 15:35
@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

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

@Sinity
Sinity requested a review from Copilot May 1, 2026 01:54
@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:15
Sinity added a commit that referenced this pull request May 7, 2026
Problem
The coverage floor still sat at 88 after #386. The next raise needed to
cover more than a few leftover helpers: the remaining active operator
surface still had thin direct coverage in showcase QA workflow/control
seams, sync and read wrappers, registry/runtime helpers, and small MCP/UI
operator modules.

What changed
This tranche broadened #197 before implementation and then added direct
runtime tests across showcase QA workflow/catalog/invariants/reporting,
sync conversation and product wrappers, repository product/raw reads,
product registry and facade-product seams, CLI/MCP operator helpers,
plain-console rendering, and version/runtime metadata paths. Once the
full gate measured 89.46% total coverage, `fail_under` moved from 88 to
89.

Verification
- `devtools coverage-gate` -> `5583 passed in 311.67s`, `TOTAL ... 89.46%`
- `devtools verify --quick` -> `verify: all checks passed`

Ref #197
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