Problem
doctor-all-use-case.ts (13.3% line coverage), restore-all-use-case.ts (15.2%), status-all-use-case.ts (18.3%), and update-all-use-case.ts (31.8%) are the sole code path for the plain aidd doctor/restore/status/update commands — verified: commands/doctor.ts:17, restore.ts:18, status.ts:17, update.ts:17 call them unconditionally, not behind an opt-in flag.
What's missing
Each fans out across ai/ide/plugin categories with per-category error isolation, but only the trivial empty-project happy path is e2e-tested (tests/e2e/command-matrix-help.e2e.test.ts:230-246). No test exercises actual multi-category drift, partial failure, or RestoreAllUseCase.execute's interactive/force branches (restore-all-use-case.ts:42).
A related gap in the same audit: src/infrastructure/adapters/auth-provider-adapter.ts (61.4% lines, 42.85% functions) — login(), authenticated status(), and verifyConfig are never exercised against the real adapter (existing unit tests use a fake CredentialStore). gh-token-adapter.ts:8's verifyToken, which calls the real GitHub API, has no test for either its success or failure path.
Also: tests/e2e/command-matrix-plugin.e2e.test.ts:179-188 is titled "ai restore exits 0 and restores plugin files when a tracked file is deleted" but never deletes a file, and its assertion (/Restor|Nothing to restore/) matches either outcome — it cannot fail even if plugin restore is completely broken.
Fix
- Add integration tests seeding real drift/failures in one category for each
*AllUseCase, asserting the aggregate result and per-category error isolation.
- Add an integration test for
AuthProviderAdapter.login/status against a mocked HTTP layer (success + invalid-token cases), and a unit test for GhTokenAdapter.verifyToken's both branches.
- Fix the plugin-restore e2e test to actually delete a file first and assert the specific outcome.
Acceptance criteria
Found by a tests audit of cli/ — full report: cli/aidd_docs/tasks/2026_07/2026_07_22_audit/tests.md.
Problem
doctor-all-use-case.ts(13.3% line coverage),restore-all-use-case.ts(15.2%),status-all-use-case.ts(18.3%), andupdate-all-use-case.ts(31.8%) are the sole code path for the plainaidd doctor/restore/status/updatecommands — verified:commands/doctor.ts:17,restore.ts:18,status.ts:17,update.ts:17call them unconditionally, not behind an opt-in flag.What's missing
Each fans out across ai/ide/plugin categories with per-category error isolation, but only the trivial empty-project happy path is e2e-tested (
tests/e2e/command-matrix-help.e2e.test.ts:230-246). No test exercises actual multi-category drift, partial failure, orRestoreAllUseCase.execute'sinteractive/forcebranches (restore-all-use-case.ts:42).A related gap in the same audit:
src/infrastructure/adapters/auth-provider-adapter.ts(61.4% lines, 42.85% functions) —login(), authenticatedstatus(), andverifyConfigare never exercised against the real adapter (existing unit tests use a fakeCredentialStore).gh-token-adapter.ts:8'sverifyToken, which calls the real GitHub API, has no test for either its success or failure path.Also:
tests/e2e/command-matrix-plugin.e2e.test.ts:179-188is titled "ai restore exits 0 and restores plugin files when a tracked file is deleted" but never deletes a file, and its assertion (/Restor|Nothing to restore/) matches either outcome — it cannot fail even if plugin restore is completely broken.Fix
*AllUseCase, asserting the aggregate result and per-category error isolation.AuthProviderAdapter.login/statusagainst a mocked HTTP layer (success + invalid-token cases), and a unit test forGhTokenAdapter.verifyToken's both branches.Acceptance criteria
*AllUseCasehas an integration test covering multi-category partial failureAuthProviderAdapter.login/statusandGhTokenAdapter.verifyTokenare covered for both success and failureFound by a tests audit of
cli/— full report:cli/aidd_docs/tasks/2026_07/2026_07_22_audit/tests.md.