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.
Problem
Raised by Copilot on the v2.9.0 milestone-merge PR (#2536).
clients/web/src/test/core/auth/storage-browser.test.ts:180passes a partial token fixture as{ refresh_token: "rt-only", token_type: "Bearer" } as unknown as OAuthTokens, with no justification comment. AGENTS.md requires everyas unknown asto carry an inline reason for why it is safe and why no better option exists. Here a singleas OAuthTokensis 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.