## [2026-06-08T07:35:32.227Z]
New pure helper module implementing the coverage-tier partitioning algorithm for the coverage-modes feature. The three exported functions — normalizeRoot (strips slashes, maps / to empty string for whole-repo matching), matchesRoot (prefix-safe directory matching), and partitionByCoverageTier (longest-match-wins, excluded wins equal-length ties) — encode the core invariant that the default CoverageConfig of { required: ['/'], excluded: [] } must behave identically to the pre-existing whole-repo required-coverage behaviour. These functions are pure (no I/O, no side effects) and are re-exported by check.ts so existing callers are unaffected. The module is isolated here so check.ts stays within the 40,000-character reviewer budget.
## [2026-06-08T08:23:58.914Z]
Extended check-coverage-tiers.ts with two coverage-issue builder functions previously living in check.ts. buildCoverageIssue was moved here to keep check.ts under the 40,000-char node budget; it builds the unmapped-files error issue for the required tier. buildCoverageAdvisoryIssue is a new function that builds the uncovered-advisory warning for the middle tier — files that are tracked but outside any coverage.required root. Both functions use a type-only import of CheckIssue from check.ts (erased at runtime, no circular runtime dependency) and are re-exported from check.ts to preserve the public API.
## [2026-06-08T08:36:13.495Z]
Removed the dead second parameter totalGitFiles from buildCoverageAdvisoryIssue. The parameter was accepted but immediately discarded via 'void totalGitFiles'. The function signature is now buildCoverageAdvisoryIssue(uncoveredFiles: string[]) — callers no longer pass the total file count, which was never used by this function.
## [2026-06-08T09:59:43.623Z]
Added internal double-slash collapse to normalizeRoot (Fix 3): roots like 'services//nested' produced by user config or programmatic construction would never match single-slash git-tracked paths. The fix adds .replace(/\/{2,}/g, '/') after the leading and trailing slash stripping, ensuring any run of two or more slashes in the middle of a root collapses to a single slash.
## [2026-06-08T16:05:31.488Z]
Coverage roots (the required and excluded tiers) now accept the same forms as a node mapping entry — an exact path, a directory prefix, or a glob — by matching through the shared matcher. A team can now exclude generated files anywhere by pattern, or scope the blocking tier to a glob, instead of being limited to directory prefixes. The whole-repo root and the longest-match precedence (excluded wins an equal-length tie) are unchanged.
