Raise repository test coverage above 70% - #204
Merged
Merged
Conversation
Sensitive Change Detection (shadow mode)This PR modifies control-plane files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds deterministic auth and command tests, raising repository coverage above 70% and enforcing a 70.8% CI floor.
Changes:
- Expands OAuth, credential-storage, calendar, box, todo, and timetrack tests.
- Adds injectable auth/keyring adapters for deterministic testing.
- Adds coverage reporting, enforcement, CI integration, and documentation.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/test.yml |
Enforces coverage in CI. |
.gitignore |
Ignores coverage artifacts. |
Makefile |
Adds coverage and cleanup targets. |
README.md |
Documents coverage usage. |
scripts/check-coverage.sh |
Enforces the coverage floor. |
scripts/coverage-summary.sh |
Generates coverage summaries. |
internal/auth/auth.go |
Adds injectable OAuth callback dependencies. |
internal/auth/auth_test.go |
Expands manager and callback tests. |
internal/auth/oauth_test.go |
Tests OAuth requests and PKCE behavior. |
internal/auth/store.go |
Adds an injectable keyring abstraction. |
internal/auth/store_test.go |
Expands storage and migration tests. |
internal/cmd/auth_commands_test.go |
Tests auth and doctor commands. |
internal/cmd/box_test.go |
Expands box command coverage. |
internal/cmd/calendar_commands_test.go |
Tests calendar, todo, and timetrack commands. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
httptestserversmake coveragetarget, concise package/function summaries, and an exact 70.8% CI statement-coverage floorBasecamp card: https://app.basecamp.com/2914079/buckets/48521764/card_tables/cards/10222264778
Coverage
Cross-package command:
GOWORK=off go test ./... \ -coverpkg=./... \ -covermode=atomic \ -coverprofile=coverage.outd4dd05c)internal/authinternal/cmdinternal/configinternal/outputinternal/tuiSmall injectable adapters for the OAuth callback listener/waiter and system keyring preserve the existing defaults while allowing deterministic tests.
Behaviors covered
--all, empty state, styled table rendering, truncation, and API failuresValidation
GOWORK=off make coverage— 71.468% locally; 71.454% in CI (5,184 / 7,255), floor 70.800%GOWORK=off make test— passGOWORK=off make lint— passGOWORK=off make check— passGOWORK=off make race-test— passGOWORK=off go test -race -count=1 ./internal/auth ./internal/cmd— passgit diff --check— passNext phase
Highest-risk remaining gaps include browser-launch failure handling, habit mutations,
fetchNextBoxPage, mutation metadata formatting, and remaining zero-coverage command walkers. The scheduled HTML scraper was intentionally left untouched.