test: strengthen mutation coverage for github.ts and doctor.ts (#96, #98)#109
Merged
Conversation
github.ts: add behavioral tests for header/URL construction, pagination boundaries, malformed-payload validation, runner deletion semantics, queued-job runner-group matching, GHCR parsing/lookup, and token-fetch metric emission. Mutation score 61.89% -> 84.14% (covered 72.05% -> 88.22%). doctor.ts: add exact summary/detail/pluralization assertions, skip and failure-surface checks, Lume artifact handling, missing host-field detail, and pool-slot metric emission. Mutation score 54.09% -> 65.97% (covered 59.12% -> 69.54%). Remaining survivors are concentrated in the duplicated string-literal summaries of the parallel linux-docker doctor path and defensive type-guard internals in poolSlotMetricsForCheck; these are low-value formatting mutants and are intentionally deferred. Both files remain well above the Stryker break threshold of 50. Closes #96 Closes #98 https://claude.ai/code/session_01QxQ71Yrf2Cn6zVfM4LY7AR
pheidon
approved these changes
May 15, 2026
3 tasks
jmcte
pushed a commit
that referenced
this pull request
May 16, 2026
#108 merged main after #109 landed without the env-isolation fix, so its doctor.test.ts missing-env/missing-host assertions failed on the self-hosted runner (GITHUB_PAT is exported there). Wrap those cases in withEnv to clear the relevant variables, matching the existing missing-env test pattern. Mirrors PR #110. https://claude.ai/code/session_01QxQ71Yrf2Cn6zVfM4LY7AR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #98, closes #96.
Summary
Strengthens Stryker mutation coverage for the two weakest configured targets by adding focused, fully-mocked behavioral tests (no live GitHub/Synology credentials, no network).
github.ts(#98) — 61.89% → 84.14% (covered 72.05% → 88.22%)?/&separator).unknownplane, including on request failure.doctor.ts(#96) — 54.09% → 65.97% (covered 59.12% → 69.54%)Remaining survivors (documented, intentionally deferred)
Concentrated in the duplicated string-literal summaries of the parallel
linux-dockerdoctor path (mirrors the now-locked-down synology path) and defensive type-guard internals inpoolSlotMetricsForCheck. These are low-value formatting mutants. Both files remain well above the Stryker break threshold (50).Test plan
pnpm test -- test/github.test.tspasses (53 tests)pnpm test -- test/doctor.test.tspasses (15 tests)pnpm testfull suite green (45 files / 247 tests),pnpm lintclean (Node 24.14.1)pnpm exec stryker run --mutate src/lib/github.ts→ 84.14%pnpm exec stryker run --mutate src/lib/doctor.ts→ 65.97%https://claude.ai/code/session_01QxQ71Yrf2Cn6zVfM4LY7AR
Generated by Claude Code