Repository navigation
Description
Context
The coverage floor was dropped from 90% to 80% in #174 to unblock
other work. It then climbed back in measured, justified steps:
- 83% in test: add coherence proofs, verification gates, and schema bootstrap alignment #187
- 84% and 85% once enforcement became single-sourced
- 86% in test: ratchet coverage floor to 86 #384 after schema/lib semantic coverage and gate hardening
- 87% in test: ratchet coverage floor to 87 #385 after direct coverage over CLI operator/rendering/workflow
helpers that had been effectively blind - 88% in test: ratchet coverage floor to 88 #386 after direct runtime coverage over the remaining
CLI/query control-plane helpers plus root entrypoint and logging
seams - 89% in test: ratchet coverage floor to 89 #387 after a broader operator-surface tranche that covered the
remaining showcase QA workflow/control seams, sync/read wrappers,
registry/runtime helpers, and MCP/UI operator support with measurable
headroom
Current verified state after #387
devtools coverage-gateis the single coverage entrypoint for humans
and CI.- The gate reads
fail_underfrompyproject.toml; there is no stale CI
override anymore. - The full default gate passes under instrumentation at 89.46% total
coverage. - The committed floor is now 89%.
- The gate remains stable enough to run the full suite locally without
the earlier Hypothesis false-failure path.
Strengthened execution scope
This remains a semantic-coverage ratchet, not a generic percentage
chase. Every raise must make an operational package area materially more
trustworthy.
The remaining climb should not be framed as "get to 90 and stop." 90%
is only the next checkpoint. The real target is the highest honest
floor justified by a coherent tranche of direct owning-module tests. If
a strong package slice supports 91% or more, ratchet there. Do not
artificially stop at 90 just because the old number was round.
The next tranche should therefore aim to clear well past 90 with
headroom, ideally nearer 91% than 90.0, by closing the remaining
active-path debt in the run/proof/operator surface instead of scattering
small bookkeeping tests.
Next tranche: remaining run/proof/operator execution surface
The final large package should retire the remaining low direct coverage
in the active execution and verification path, especially:
- run and preparation orchestration
- proof rendering and proof diffing/reporting
- remaining command/operator surfaces that still carry branch-heavy
control logic - smaller runtime/root helpers that still distort the floor despite being
part of ordinary usage
Primary targets therefore include, but are not limited to:
polylogue/pipeline/run_stages.pypolylogue/pipeline/prepare.pypolylogue/pipeline/run_state.pypolylogue/proof/rendering.pypolylogue/proof/diffing.pypolylogue/cli/check_rendering_plain.pypolylogue/cli/commands/run.pypolylogue/cli/commands/products.pypolylogue/cli/machine_main.py
This tranche should not be called done unless those helpers are covered
directly at the owning-module level rather than only incidentally
through broader command tests.
Package map for the remaining climb
The major remaining debt is now concentrated in:
- run/pipeline orchestration paths
- proof rendering and diff/report semantics
- branch-heavy operator and command helpers
- a shrinking runtime/root support tail that still matters to users or
agents after the entrypoint, logging, wrapper, and showcase work
Execution rule
Prefer coherent ratchet boundaries over ceremonial one-point raises. If
a strong tranche clears 90, 91, or higher cleanly with margin, raise to
the highest honest floor supported by the measured full suite. Do not
create an artificially capped PR just because an old milestone was 90%.
Plan
Incremental raises tied to specific package slices:
| Target | Trigger | Status |
|---|---|---|
| 84% | Coverage gate is single-sourced and stable under instrumentation | done |
| 85% | First schema/lib semantic coverage tranche justifies the ratchet | done |
| 86% | Schema/lib tranche + gate hardening support the measured raise | done |
| 87% | CLI operator/rendering/workflow blind spots are retired enough for the full gate to clear comfortably | done |
| 88% | Remaining CLI/query helpers plus root entrypoint/logging seams justify the next measured raise even though 89 is not yet honest | done |
| 89% | The broader active operator surface clears with measurable headroom after direct tests over showcase, sync, wrappers, and operator helpers | done |
| 90%+ | The remaining run/proof/operator surface is covered directly enough to justify the highest honest floor the measured suite supports | next |
Each raise should land as one or more focused PRs that tell a coherent
package story. If a slice improves the groundwork but does not yet reach
90+, it references this issue instead of closing it.
Acceptance criteria
- Coverage enforcement is single-sourced from committed configuration and
used by CI. - The local coverage gate remains discoverable through
devtools. - The current coverage gate remains stable enough to run under full
instrumentation without false-failure health checks. - The floor is raised above 89% only when the measured suite supports it.
- The next tranche is backed by direct tests over the remaining active
run, proof, and operator helpers, not only broader command tests. - The ratchet moves to the highest honest floor supported by the full
measured suite, not just the next round number. - The issue remains open until the floor is restored to a level that is
honestly supported by comprehensive active-path coverage without
excluding modules from measurement and without leaving active
control-plane helpers effectively untested.
Activity
Sinity commentedon Apr 23, 2026
Scratch log, 2026-04-23:
pytest --cov=polylogue --cov-report=term-missing:skip-covered --cov-fail-under=83 -q --ignore=tests/integration.HealthCheck.too_slowonly under coverage instrumentation. That is a gate reliability issue, not a product regression.--cov-fail-under=80even thoughpyproject.tomlsays 83, so the first execution slice should make the coverage gate single-sourced and then ratchet to the measured safe floor.Sinity commentedon Apr 23, 2026
Execution log for PR #382:
feature/test/coverage-ratchet-gate.test: stabilize coverage-gated source teststest: add single-source coverage gateRef #197, notCloses #197, because it installs the trustworthy coverage-ratchet path and raises the floor to 84%; chore: restore test coverage floor toward 90% #197 should remain open until the floor reaches 90%.pytest -q tests/unit/devtools/test_coverage_gate.py tests/unit/devtools/test_command_catalog.py tests/unit/devtools/test_devtools_main.py tests/unit/sources/test_parsers_props.py-> 51 passed.pytest -q tests/unit/sources/test_source_laws.py::test_detect_provider_recognizes_generated_payloads tests/integration/test_mcp.py::TestMCPRealRepositoryPaths::test_search_uses_real_repository_and_filter_stack-> 2 passed.devtools coverage-gate --ignore-integration-> 5175 passed, required coverage 84% reached, total coverage 84.83%.devtools coverage-gate-> 5355 passed, required coverage 84% reached, total coverage 85.60%.devtools verify --quick-> all checks passed.devtools verify --quick-> all checks passed.test: add single-source coverage gate (#382)
Sinity commentedon Apr 23, 2026
PR #382 merged as 427c487. The coverage floor is now 84%, CI uses the shared devtools coverage gate, and #197 remains open for the remaining 90% ratchet work.
test: cover schema and query semantic helpers (#383)
Sinity commentedon Apr 23, 2026
Starting the next #197 tranche on
feature/test/coverage-ratchet-87.Execution target for this slice:
I’m treating this as a package-sized semantic coverage pass, not a cosmetic ratchet. I’ll log the measured gate result before deciding the exact new
fail_undervalue.Sinity commentedon Apr 23, 2026
Executed the next #197 tranche on
feature/test/coverage-ratchet-87and opened PR #384:#384
What landed in this slice:
open --print-pathintegration assertions now tolerate the expected optional progress stderr instead of treating it as a failuredevtools.render_cli_referenceexport fix surfaced bydevtools verify --quickMeasured result:
devtools coverage-gate5411 passed in 257.11s (0:04:17)Required test coverage of 86% reached. Total coverage: 86.77%devtools verify --quickpassedDecision note:
test: ratchet coverage floor to 86 (#384)
Sinity commentedon Apr 23, 2026
Merged via PR #384 as
bef537b5onmaster.The issue stays open for the next justified ratchet beyond 86.
Sinity commentedon Apr 23, 2026
Starting the next
#197tranche onfeature/test/coverage-ratchet-87-cli-site.Execution tactic for this slice:
Initial target set:
polylogue/cli/products_rendering.pypolylogue/cli/products_workflow.pypolylogue/cli/run_display_workflow.pypolylogue/cli/run_watch_workflow.pypolylogue/cli/schema_command_support.pypolylogue/cli/schema_rendering_explain.pypolylogue/cli/schema_rendering_results.pypolylogue/cli/query_verbs.pySinity commentedon Apr 23, 2026
Executed the strengthened 87% CLI-operator tranche on
feature/test/coverage-ratchet-87-cli-siteand opened PR #385:#385
What this slice did:
Targeted module movement from the full gate:
polylogue/cli/products_rendering.py: 100%polylogue/cli/products_workflow.py: 100%polylogue/cli/query_verbs.py: 100%polylogue/cli/run_watch_workflow.py: 100%polylogue/cli/run_display_workflow.py: 92%polylogue/cli/schema_command_support.py: 96%polylogue/cli/schema_rendering_explain.py: 92%polylogue/cli/schema_rendering_results.py: 87%Measured result:
devtools coverage-gate5434 passed in 262.51s (0:04:22)Required test coverage of 87% reached. Total coverage: 87.33%devtools verify --quickpassedDecision note:
test: ratchet coverage floor to 87 (#385)
6 remaining items
Sinity commentedon Apr 23, 2026
Starting the post-88 tranche now. I expanded the issue scope first: the next raise is no longer just leftover CLI query cleanup, it is a broader active-operator-surface pass over showcase QA workflow/catalog/invariants, sync/read wrappers, and the remaining meaningful query/helper seams. Target is a measured total closer to 89.5% than to 89.0% before ratcheting the floor to 89.
Sinity commentedon Apr 23, 2026
Execution update on
feature/test/coverage-ratchet-89p5/18aa9768:devtools coverage-gatenow measures 89.46% total coverage (5583 passed)devtools verify --quickpasses after the new tests and type/lint cleanupfail_underfrom88to89Next step is PR + merge;
#197stays open because this justifies 89 cleanly, not 90.test: ratchet coverage floor to 89 (#387)
Sinity commentedon Apr 23, 2026
Merged in #387 as
2badf030(test: ratchet coverage floor to 89 (#387)).Measured result for this tranche:
devtools coverage-gate->5583 passed in 311.67s, total coverage89.46%devtools verify --quick-> passedThis lands the strengthened 89% tranche with real headroom instead of an edge-skim.
#197stays open for the final 90% raise.Sinity commentedon Apr 23, 2026
Execution update for the final ratchet tranche:
cli.machine_maincli.check_rendering_plaincli.commands.productscli.commands.runproof.diffingproof.renderingpipeline.preparepipeline.observerspipeline.run_stagespipeline.run_statetest_fts5.pyandtest_unified_semantic_laws.pywith the repo’s existingHealthCheck.too_slowpolicyfail_underto 90PR: #389
Verification actually run:
pytest -q tests/unit/cli/test_check_rendering_plain_runtime.py tests/unit/cli/test_machine_main_runtime.py tests/unit/cli/test_products_command_runtime.py tests/unit/cli/test_run_command_runtime.py tests/unit/pipeline/test_prepare_runtime.py tests/unit/pipeline/test_run_stages_runtime.py tests/unit/pipeline/test_run_state_runtime.py tests/unit/pipeline/test_observers_runtime.py tests/unit/proof/test_diffing_runtime.py tests/unit/proof/test_rendering_runtime.py->60 passed in 12.42spytest -q tests/unit/storage/test_fts5.py::test_escape_fts5_match_text_safe tests/unit/sources/test_unified_semantic_laws.py::test_typed_content_blocks_extract_without_crash->2 passed in 10.27sdevtools coverage-gate->5643 passed in 289.45s,Total coverage: 90.14%devtools verify --quick-> passedtest: ratchet coverage floor to 90 (#389)
Sinity commentedon Apr 23, 2026
Merged via PR #389.
3101c308b5eb94f687917c714fe48565f8251eb0master:test: ratchet coverage floor to 90 (#389)devtools coverage-gate->5643 passed in 289.45s,Total coverage: 90.14%devtools verify --quick-> passedThis closes the 89 -> 90 restoration track. The floor is now back at 90 with direct active-path coverage over the remaining run/proof/operator helpers, but not enough measured headroom to justify 91 yet.
test: add single-source coverage gate (#382)
test: cover schema and query semantic helpers (#383)
test: ratchet coverage floor to 86 (#384)
test: ratchet coverage floor to 87 (#385)
test: ratchet coverage floor to 88 (#386)
test: ratchet coverage floor to 89 (#387)
test: ratchet coverage floor to 90 (#389)