Skip to content

test(cli): cover GitHub token verification at the HTTP boundary #467

Closed

Description

@blafourcade

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:

  • status is retired and update is split by AI/IDE scope.
  • doctor, status and restore behavior have dedicated tests, including the empty-project health regression.
  • AuthProviderAdapter covers 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.

Activity

  1. added theissue type on Jul 22, 2026
  2. changed the title [-]test(cli): the four *AllUseCase orchestrators are the least-tested, most-used code in the project[/-] [+]test(cli): cover GitHub token verification at the HTTP boundary[/+] on Sep 9, 2026
  3. blafourcade commented on Sep 9, 2026

    @blafourcade
    ContributorAuthor

    Backlog refinement: the original omnibus audit is superseded by #795’s command topology and focused tests. #467 now owns only the missing GitHub-token HTTP boundary contract; status remains Todo, without milestone.

  4. moved this from Todo to In Progress in AIDD Roadmapon Oct 12, 2026
  5. moved this from In Progress to In review in AIDD Roadmapon Oct 12, 2026
  6. moved this from In review to Done in AIDD Roadmapon Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    High

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions