Repository navigation
docs: 本人の退会(#318)が入ったのに残っていた「退会・削除の入口が無い」記述を直す - #570
Merged
Merged
Conversation
ランブック §7.1 の「セルフサービスの削除 API は未実装」、§11.2 の 「セルフサービスの削除 API は存在しない」、§11.7 の「退会の経路そのものが 存在しない」、仕様書 §13 の「退会が実装されていない」は、2026-10-30 の #318 / #349 で本人の退会が入って以来正しくない。 元の記述は記録として残したまま、いまの挙動を書き足す。退会は CloseAccountUseCase が status を suspended にして全セッションを失効させ、 account.closed を記録するだけで、deleted_at は立てず個人情報も残す。 データは運用者が purge(purge-user.mjs)か管理画面の物理削除を 実行するまで残る。§7.1 手順 8 の SQL は deleted_at を条件にしているので、 退会しただけの人には何日経っても当たらないことも明記する。
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
何を変えたか
2026-10-30 の #318 / #349 で本人の退会(ダッシュボードの「退会する」→
DELETE /account/api/me→IdentityRPC.closeAccount→CloseAccountUseCase)が入ったのに、「退会や削除の入口が無い」という記述が残っていた。元の文は消さずに「以前ここには…と書いてあった」として残し、いまの挙動を書き足した。コードは変えていない。PATCH /api/meすら 501」を訂正した。退会がやること(statusをactiveからsuspendedにする、全セッションを失効させて Cookie を落とす、account.closedをpersonalDataRetained: true付きで記録する、5 分以内の再認証を求める)と、やらないこと(deleted_atを立てない、個人情報・Passkey を残す、OAuth の同意やトークンを明示的には失効させない、NFC に触れない)を書いた。データが残るのは運用者が purge(purge-user.mjs、§11.6)か管理画面の物理削除(§11.2、feat(auth-worker,admin-worker): 利用者の行を物理削除する経路と管理画面を足す(運用者判断 2026-11-08) #554)を実行するまでであることも書いた。deleted_atを条件にしているので、退会しただけの人には何日経っても当たらないことを明記した。purge を実行するとdeleted_atが立つので、その 30 日後からは当たる。suspended/deleted_atは NULL / 理由はaccount.closedで読む)。脅威モデルには #318 と矛盾する記述は見つからなかった(
退会/セルフサービス/CloseAccount/DELETE /meで grep した)。確認したこと
origin/main のコードと突き合わせた。
apps/auth-worker/src/application/use-cases/close-account.use-case.ts: 再認証を確かめ、closeAccountで状態を変え、revokeAllForUserでセッションを失効させ、account.closedを記録する。DrizzleUserRepository.closeAccount:set({ status: "suspended" })、条件はstatus = 'active'。deleted_atには触れない。apps/dashboard-worker/src/presentation/http/app.ts:PATCH /api/me(表示名・ユーザー名)とDELETE /api/me(退会と Cookie の破棄)がある。apps/dashboard-worker/src/presentation/http/ui/client/messages.ts:CLOSE_ACCOUNT_COPYが「退会しました」で、データが残り再登録できないことを案内している。purge-user.sql.ts:deleted_at = coalesce(deleted_at, now)、条件はstatus <> 'deleted'。チェックの結果:
pnpm lint: 通過pnpm check:threat-model-refs: 問題なしpnpm check:deadlines: 期限到来なしpnpm check:issue-refs: 問題なしprettier --check docs/runbook.md docs/u18-identity-spec.md: 通過