Skip to content

test: ratchet coverage floor to 88 - #386

Merged
Sinity merged 2 commits into
masterfrom
feature/test/coverage-ratchet-88
Apr 23, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/test/coverage-ratchet-88

Conversation

@Sinity

@Sinity Sinity commented Apr 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Raise the repository coverage floor from 87 to 88 after a direct test tranche over CLI control-plane helpers, root entrypoints, and structured logging/runtime seams.

Problem

#197 was still carrying large ownership-level blind spots in the CLI/query control plane and a few root/runtime modules. The previous tranche justified 87, but several operator-facing helpers and entrypoints still had little or no direct coverage, so the next honest ratchet boundary had to be measured rather than assumed.

Solution

Add focused runtime tests for:

  • check workflow option validation and maintenance wiring
  • picker and shell-completion helpers
  • query progress and query helper error/formatting paths
  • tags / neighbors helper surfaces
  • root entrypoints (polylogue.__main__, polylogue.cli.__main__)
  • structured logging proxy/configuration behavior

Then raise tool.coverage.report.fail_under to 88 in pyproject.toml.

This branch intentionally stops at 88. The measured full-suite result is 88.24%, which justifies ratcheting to 88 cleanly but does not honestly justify 89 yet.

Verification

  • pytest -q tests/unit/cli/test_command_aux_runtime.py tests/unit/cli/test_check_support_runtime.py tests/unit/cli/test_query_progress_runtime.py tests/unit/cli/test_query_support_runtime.py tests/unit/test_entrypoints_runtime.py tests/unit/test_logging_runtime.py
  • targeted module probe over the affected CLI helpers -> direct coverage in the high 90s for the intended tranche modules
  • devtools coverage-gate -> 5483 passed, total coverage 88.24%
  • devtools verify --quick

Ref #197

Summary by CodeRabbit

  • Tests

    • Added comprehensive unit test suites for CLI query progress, query support, command auxiliary runtime, and check support workflow functions.
    • Added entrypoint delegation tests and logging runtime validation tests.
  • Chores

    • Increased minimum code coverage threshold to 88% to maintain higher code quality standards.

Sinity added 2 commits April 23, 2026 15:25
Problem

The remaining post-87 coverage debt was concentrated in branch-heavy CLI
support modules and root/runtime seams that still had little or no
direct ownership-level coverage.

What changed

Add focused runtime tests for check workflow validation, picker and shell
completion helpers, query progress and query support helpers, command
rendering paths, root entrypoints, and structured logging delegation.
The new tests target the hard branches directly instead of relying on
incidental command-surface execution.

Ref #197
Problem

The new coverage tranche raises the full measured suite above the old 87
floor, and the repository should record that stricter baseline in the
single source of truth.

What changed

Raise `tool.coverage.report.fail_under` from 87 to 88 in
`pyproject.toml`.

Verification

- `devtools coverage-gate` -> total coverage 88.24%
- `devtools verify --quick`

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: 14bfad23-8a1e-4135-adfe-92f72273669d

📥 Commits

Reviewing files that changed from the base of the PR and between acd5561 and 675aa80.

📒 Files selected for processing (7)
  • pyproject.toml
  • tests/unit/cli/test_check_support_runtime.py
  • tests/unit/cli/test_command_aux_runtime.py
  • tests/unit/cli/test_query_progress_runtime.py
  • tests/unit/cli/test_query_support_runtime.py
  • tests/unit/test_entrypoints_runtime.py
  • tests/unit/test_logging_runtime.py

📝 Walkthrough

Walkthrough

This PR adds 1,331 lines of new unit tests across 6 test modules, covering CLI check/maintenance workflows, query progress/runtime helpers, command auxiliary functions, logging configuration, and module entrypoints. The pyproject.toml coverage threshold is raised from 87 to 88.

Changes

Cohort / File(s) Summary
Configuration
pyproject.toml
Increases coverage fail_under threshold from 87 to 88 in [tool.coverage.report].
CLI Tests
tests/unit/cli/test_check_support_runtime.py, tests/unit/cli/test_command_aux_runtime.py
Adds unit tests for check/maintenance workflows (validation, maintenance targets, formatting helpers, blob store checks, schema verification), and for auxiliary CLI runtime (index selection, filter picking, shell completion, neighbor display).
Query & Progress Tests
tests/unit/cli/test_query_progress_runtime.py, tests/unit/cli/test_query_support_runtime.py
Adds tests for query progress runtime helpers (slow query notices, elapsed formatting, action event state, notice emission) and query support runtime (stream target resolution, mutation modifiers, semantic matching, SQL stats, render output formatting).
Runtime Integration Tests
tests/unit/test_entrypoints_runtime.py, tests/unit/test_logging_runtime.py
Adds tests for module entrypoints delegation to Click main function and logging configuration (stderr proxy forwarding, console/JSON processor pipeline selection).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Suggested labels

area:qa, area:cli

Poem

🐰 Six new test files hop into view,
Coverage climbs from eighty-seven to eighty-eight—hooray!
CLI checks, queries, and logging too,
Each test a carrot planted along the way,
The codebase grows stronger, day by day! 🥕✨

✨ 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-88

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 marked this pull request as ready for review April 23, 2026 13:28
@Sinity
Sinity merged commit 81ea1aa into master Apr 23, 2026
8 of 12 checks passed
@Sinity
Sinity deleted the feature/test/coverage-ratchet-88 branch April 23, 2026 13:28
Sinity added a commit that referenced this pull request Apr 23, 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
@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. 🚀

ℹ️ 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
## Summary

Raise the repository coverage floor from 87 to 88 after a direct test
tranche over CLI control-plane helpers, root entrypoints, and structured
logging/runtime seams.

## Problem

`#197` was still carrying large ownership-level blind spots in the
CLI/query control plane and a few root/runtime modules. The previous
tranche justified 87, but several operator-facing helpers and
entrypoints still had little or no direct coverage, so the next honest
ratchet boundary had to be measured rather than assumed.

## Solution

Add focused runtime tests for:

- check workflow option validation and maintenance wiring
- picker and shell-completion helpers
- query progress and query helper error/formatting paths
- `tags` / `neighbors` helper surfaces
- root entrypoints (`polylogue.__main__`, `polylogue.cli.__main__`)
- structured logging proxy/configuration behavior

Then raise `tool.coverage.report.fail_under` to 88 in `pyproject.toml`.

This branch intentionally stops at 88. The measured full-suite result is
88.24%, which justifies ratcheting to 88 cleanly but does not honestly
justify 89 yet.

## Verification

- `pytest -q tests/unit/cli/test_command_aux_runtime.py
tests/unit/cli/test_check_support_runtime.py
tests/unit/cli/test_query_progress_runtime.py
tests/unit/cli/test_query_support_runtime.py
tests/unit/test_entrypoints_runtime.py
tests/unit/test_logging_runtime.py`
- targeted module probe over the affected CLI helpers -> direct coverage
in the high 90s for the intended tranche modules
- `devtools coverage-gate` -> `5483 passed`, total coverage `88.24%`
- `devtools verify --quick`

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