test: raise line/branch coverage across library, adapters, and persistence#43
Merged
wolpert merged 2 commits intoJun 9, 2026
Merged
Conversation
…tence Adds targeted unit and integration tests across every published module to close JaCoCo line/branch gaps surfaced by the per-module reports. No production code changed — tests only. Highlights: - refresh-tokens: was 0 tests with a silently-SKIPPED coverage gate (no execution data) — now driven via RefreshTokenScenarios plus service, handler, record, config, and deletion-listener tests; gate now enforced. - jwt: cover PkAuthJwtValidator malformed/missing-claim/wrong-shape branches via hand-built raw JWTs, plus JwtClaims and TokenTtlPolicy. - core: registration happy-path (persistRegistration) and evaluateAttestation decisions via mocked WebAuthn4J RegistrationData; in-memory rate limiter/window counter; SPI carrier records; persistence exceptions. - micronaut / spring / dropwizard: authenticated admin-endpoint paths and the config-builder factory/auto-config validation+defaulting branches. - persistence (jdbi + dynamodb): repository mutation/bulk paths not exercised by the shared scenarios — credential update/delete, user-lookup register/findView, backup-code replaceAll, otp deleteByUserHandle, refresh deleteExpiredBefore. Also fixes two latent issues found along the way: - refresh-tokens coverage verification was vacuously skipped (no tests). - Spring admin integration suite did not reset the shared in-memory ceremony rate limiter between tests, tripping the per-IP limit as cases were added; added a @beforeeach reset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
wolpert
enabled auto-merge (rebase)
June 9, 2026 13:55
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.
Summary
Adds targeted unit and integration tests across every published module to close JaCoCo line/branch coverage gaps. No production code changed — tests only. Every touched module's
./gradlew check(spotless + coverage verify) passes.Coverage results
What was added
RefreshTokenScenariosplus service, handler, record, config, TTL-policy, and deletion-listener tests; the 70% gate is now actually enforced.PkAuthJwtValidatormalformed / missing-claim / wrong-shape branches via hand-built signed JWTs, plusJwtClaimsandTokenTtlPolicy.persistRegistration) andevaluateAttestationdecisions via a mocked WebAuthn4JRegistrationDatachain; in-memory rate limiter / window counter; SPI carrier records; persistence exceptions.updateSignCount/updateLabel/delete/deleteByUserHandle, user-lookupregister/findViewByHandle, backup-codereplaceAll, OTPdeleteByUserHandle, refreshdeleteExpiredBefore. All against real Postgres / DynamoDB Local via Testcontainers.Latent issues fixed along the way
@BeforeEachreset.Remaining (out of scope)
The residual uncovered code is concentrated in per-repo
wrap(...)SDK/JDBI exception-handler catch blocks, which require induced backend failures (fault injection) to reach.🤖 Generated with Claude Code