feat: classify authentication failure scopes#42
Conversation
✅ Deploy Preview for rdlabo-ionic-angular-library ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| credential: 'credential', | ||
| } as const; | ||
|
|
||
| export type AuthFailureScope = (typeof AUTH_FAILURE_SCOPES)[keyof typeof AUTH_FAILURE_SCOPES]; |
There was a problem hiding this comment.
🟡 公開型にドキュメントコメントが付いていない
公開APIとして公開される型 AuthFailureScope(projects/kit/src/lib/http/auth-failure.ts:13)にJSDocコメントが付いていないため、リポジトリの必須ルールに違反しています。
Impact: ライブラリ利用者向けのAPIドキュメントが欠落します。
リポジトリ規約違反の内訳
AGENTS.mdの「Every public class, function, and type must have a JSDoc comment.」および同一リポジトリの既存慣習(projects/kit/src/lib/auth/auth-access.service.ts:5-6 の KitAuthAccessMode などは全てJSDoc付き)に反し、export type AuthFailureScope にJSDocがありません。public-api.ts 経由で公開されます。
| export type AuthFailureScope = (typeof AUTH_FAILURE_SCOPES)[keyof typeof AUTH_FAILURE_SCOPES]; | |
| /** Lifecycle scope of an authentication failure, parsed from the response body. */ | |
| export type AuthFailureScope = (typeof AUTH_FAILURE_SCOPES)[keyof typeof AUTH_FAILURE_SCOPES]; |
Was this helpful? React with 👍 or 👎 to provide feedback.
|
|
||
| export type AuthFailureScope = (typeof AUTH_FAILURE_SCOPES)[keyof typeof AUTH_FAILURE_SCOPES]; | ||
|
|
||
| export const AUTH_IDENTITY_INVALID_CODE = 'AUTH_IDENTITY_INVALID'; |
There was a problem hiding this comment.
🟡 公開定数にドキュメントコメントが付いていない
公開APIとして公開される定数 AUTH_IDENTITY_INVALID_CODE(projects/kit/src/lib/http/auth-failure.ts:15)にJSDocコメントが付いていないため、リポジトリの必須ルールおよび既存慣習に違反しています。
Impact: ライブラリ利用者向けのAPIドキュメントが欠落します。
リポジトリ規約違反の内訳
同ファイルの AUTH_FAILURE_SCOPES(projects/kit/src/lib/http/auth-failure.ts:7)や auth-access.service.ts:57-58 の公開定数はいずれもJSDoc付きであり、公開定数にドキュメントを付ける慣習が確立しています。AUTH_IDENTITY_INVALID_CODE のみ欠落しています。
| export const AUTH_IDENTITY_INVALID_CODE = 'AUTH_IDENTITY_INVALID'; | |
| /** Body `code` that must accompany an `identity` scope to revoke global access. */ | |
| export const AUTH_IDENTITY_INVALID_CODE = 'AUTH_IDENTITY_INVALID'; |
Was this helpful? React with 👍 or 👎 to provide feedback.
|
|
||
| export const AUTH_IDENTITY_INVALID_CODE = 'AUTH_IDENTITY_INVALID'; | ||
|
|
||
| export interface AuthFailureBody { |
There was a problem hiding this comment.
🟡 公開インターフェースにドキュメントコメントが付いていない
公開APIとして公開されるインターフェース AuthFailureBody(projects/kit/src/lib/http/auth-failure.ts:17)にJSDocコメントが付いていないため、リポジトリの必須ルールに違反しています。
Impact: ライブラリ利用者向けのAPIドキュメントが欠落します。
リポジトリ規約違反の内訳
AGENTS.mdの「Every public class, function, and type must have a JSDoc comment.」に反し、export interface AuthFailureBody にJSDocがありません。auth-access.service.ts:8-9,40-41 の公開インターフェースは全てJSDoc付きです。
| export interface AuthFailureBody { | |
| /** Shape of an authentication failure response body carrying an explicit scope. */ | |
| export interface AuthFailureBody { |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Validation
Note: the repository-wide npm test also tries to build the demo before its sibling libraries and exits on unresolved demo path aliases; the kit project test passes independently.