Skip to content

test(coverage/plans): drive plans to ≥95% (was 82.5%)#26

Merged
mastermanas805 merged 1 commit into
masterfrom
coverage/plans-95
May 21, 2026
Merged

test(coverage/plans): drive plans to ≥95% (was 82.5%)#26
mastermanas805 merged 1 commit into
masterfrom
coverage/plans-95

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Summary

  • Adds plans/plans_coverage_test.go with white-box tests in package plans to reach branches the public Registry.Get anonymous fallback hides from black-box callers.
  • Covers parse() empty-plans guard, ValidatePromotion expiry / skip-non-matching-code paths, TeamMemberLimit per-tier defaults (team/pro/growth/default), QueueCountLimit zero-fallback, VaultEnvsAllowed nil-slice branch, and every accessor's defensive if p == nil branch.
  • Module line coverage: 82.5% → 99.3% (only the unreachable Default() panic branch remains).

Test plan

  • go test ./plans -coverprofile=/tmp/plans-cov.out passes
  • go tool cover -func=/tmp/plans-cov.out reports 99.3% total
  • All previously-covered functions remain at 100%; previously-uncovered branches now reach 100% except the intentional Default() panic guard

🤖 Generated with Claude Code

Cover defensive nil-plan branches, parse() empty-plans guard,
ValidatePromotion expiry/skip paths, TeamMemberLimit tier defaults,
and QueueCountLimit zero-fallback. White-box tests in package plans
build Registry directly to reach branches Get()'s anonymous fallback
hides from black-box callers. Module coverage: 82.5% → 99.3%.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 merged commit 3f87988 into master May 21, 2026
9 checks passed
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