Skip to content

Unjustified 'as unknown as OAuthTokens' in storage-browser.test.ts #2538

Description

@cliffhall

Problem

Raised by Copilot on the v2.9.0 milestone-merge PR (#2536).

clients/web/src/test/core/auth/storage-browser.test.ts:180 passes a partial token fixture as { refresh_token: "rt-only", token_type: "Bearer" } as unknown as OAuthTokens, with no justification comment. AGENTS.md requires every as unknown as to carry an inline reason for why it is safe and why no better option exists. Here a single as OAuthTokens is enough, because the literal is a subset of the type. Introduced in b560321 (#2481 work).

Expected

A single as OAuthTokens, or a justification comment if the double cast turns out to be necessary.

Activity

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

    choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior changev2Issues and PRs for v2

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions