test(cli): cover GitHub token verification at the HTTP boundary
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github, typescript
- Domain
- api, authentication, testing
Research direction
Start at GhTokenAdapter.verifyToken and the HTTP-client port it uses. Add isolated tests for successful, rejected, malformed, and non-success GitHub responses, confirming the expected login or documented authentication error without exposing the supplied token; use only the port fake or mock, never GitHub or a host CLI.
Written by the indexing model from the issue text.
Description
Context
The July audit grouped global command orchestration, plugin restore and authentication coverage in one issue. PR #795 replaces that command topology and already adds focused coverage for the surviving flows:
statusis retired and update is split by AI/IDE scope.doctor,statusand restore behavior have dedicated tests, including the empty-project health regression.AuthProviderAdaptercovers stored-token and external-provider login/status paths.
The remaining uncovered boundary is GhTokenAdapter.verifyToken: it turns a GitHub HTTP response into an authenticated login or an authentication failure.
Target
Add isolated tests for GhTokenAdapter using its HTTP-client port. Do not call GitHub and do not invoke a host CLI.
Acceptance criteria
- A successful mocked GitHub user response returns the expected login.
- A rejected, malformed, or non-success response becomes the documented authentication error.
- The request carries the supplied token only in the authorization mechanism required by the adapter; neither assertion failures nor errors expose it.
- Tests use the HTTP port fake/mock, never a live GitHub request.
Boundary
Do not duplicate AuthProviderAdapter coverage, restore E2E scenarios, or the retired *AllUseCase topology. This is one HTTP-adapter contract.
- Dominant language
- TypeScript
- Stars
- 481
- Forks
- 45
- Avg merge
- 14h 27m
- Merged PRs (30d)
- 111
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ai-driven-dev/framework
-
refactor(aidd-orchestrator): the check zone says when to stop, and reviews its axes in one round Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ai-driven-dev/framework#887 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ai-driven-dev/framework#873 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ai-driven-dev/framework#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ai-driven-dev/framework#625 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
ai-driven-dev/framework#911 ·
All issues in ai-driven-dev/framework
Similar issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100