Skip to content

Branch coverage push — ratchet threshold back to 80 #520

Description

@JustAGhosT

Background

PR #520 lowered branch coverage threshold from 80% to 65% as a pragmatic unblock for dev (failing CI since 2026-04-26 / PR #503) and four downstream PRs. The lowering is transitional, not a target. This issue tracks the per-module work to ratchet branches back to 80%.

Current branch coverage by module (dev baseline, 2026-05-10)

Module Branch % Functions % Largest gap
sync-guard.mjs 5% 33.3% ✅ closed by PR #519 (→ 95%)
retort-config-wizard.mjs 26.7% 40% interactive prompt branches
init.mjs 36.9% 27.1% preset selection + flag combos
cost-tracker.mjs 39.5% 68.8% formatter switches, threshold checks
check.mjs 39.7% 85.7% handler runner branches
orchestrator.mjs 42.3% 68.3% phase transition branches
expansion-analyzer.mjs 52.2% 86.5% scoring branches
discover.mjs 52.2% 70% tech-stack detection branches
var-builders.mjs 58.4% 93.6% partly closed by PR #519
synchronize.mjs 65.6% 71.4% partly closed by PR #519

Plan — ratchet vitest.config.mjs branches threshold one level at a time

Phase Threshold Trigger Modules to fix
0 (now) 65 After #520 merges — (baseline)
1 70 After cost-tracker + check cost-tracker.mjs, check.mjs
2 73 After init + orchestrator init.mjs, orchestrator.mjs
3 76 After discover + expansion-analyzer discover.mjs, expansion-analyzer.mjs
4 78 After retort-config-wizard retort-config-wizard.mjs
5 80 After miscellaneous gap-fillers remaining drag

Each phase: 1 PR per module, then 1 PR bumping the threshold.

Acceptance criteria

  • Branch coverage threshold restored to 80 in vitest.config.mjs
  • No module under 70% branches in coverage report
  • CI green on dev for 2+ weeks at 80% gate

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    qualityCode quality and static analysis

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions