Skip to content

[P2] Add end-to-end coverage of forwarding and successful token exchange and refresh #56

Closed

Description

@michielbdejong

Recorded during review of main at a1eb305ccfa2f3fc8ddede4875765cf1b099bd2b. This issue records a finding only; no implementation changes were made or requested.

Finding

Coverage is strongest around helpers and browser handoff security. No end-to-end tests exercise the complete forwarding handler or successful provider token exchange/refresh. The HTTP fixture test exercises upstream_request, not the full authenticated forwarding flow.

Review verification: all 64 default tests and six network-backed pinned-catalog tests passed; formatting and Clippy passed. Three PostgreSQL tests were not run locally; CI is configured to run them with --include-ignored. The first default test run encountered sandbox denial when binding localhost; rerunning with localhost access passed. No numeric line/branch coverage percentage was measured.

Missing cases include traversal, redirects, oversized/slow responses, refresh-token rotation, credential consumption on failures, and database recovery.

Evidence

Desired outcome

Use local provider fixtures and an isolated PostgreSQL instance to exercise complete success and failure paths, including one-use credential rotation. Keep tests independent of live user credentials.

Activity

  1. michielbdejong commented on Sep 16, 2026

    @michielbdejong
    ContributorAuthor

    Fixed in #73 — added an end-to-end test of forward() through the real router: an expired credential is refreshed at a mocked token endpoint, the refreshed token is used against a mocked provider API, the response (with its ETag/Link headers) is forwarded, and the one-time connection code is rotated and verified.


    Generated by Claude Code

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions