Repository navigation
Launch Phase 5 docs sweep: accounts, suspension, deletion, and the retired rules - #841
Conversation
…tired rules Bring the accounts-and-auth spec, the security model's auth section and Manual chapter 9 up to date with launch Phase 5 (#795): the verify, onboard, act gate; Turnstile; suspension; the account deletion engine and what it keeps; the NSFW opt-in withdrawn; the soft delete and reinstatement retired. Glossary, decisions, migrations and testing gotchas, two memory notes, and the regenerated in-app help. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR
… the payload Manual chapters 2, 10 and 11; membership-entitlements, admin-console, community-and-engagement, the meme studio doc, the roadmap and the retention matrix; glossary pointers; security-model cross-links; manual durations restated as intent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR
…erified Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR
… inventory row updated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR
…ne in Phase 5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codex Review SummaryThis 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. |
Astra — round 1Assessed at Oracle met at this head: no The harvest captures the main change correctly: suspension blocks an account, while deletion follows a separate process. I recommend one documentation correction batch. Four claims would give David or a future agent the wrong understanding of what happens. The corrections below preserve the approved behavior; they do not require a new product decision. D1 — Correct the guarantee that billing stops at the instant deletion is requested. The manual says subscriptions are cancelled “at the same moment, so nothing bills again.” Direct inspection shows that acceptance commits first, then starts billing cancellation without awaiting completion; failures are recorded for retry. See acceptance and the asynchronous kick. The bounded problem is presenting a requested external operation as an accomplished guarantee. A reader could believe a successful deletion request proves cancellation succeeded. The technical spec’s retry explanation does not repair that promise for someone reading the manual alone. Recommend explaining that cancellation starts immediately and is retried if it fails. This follows the approved plan’s S14 recovery design. Success means the manual and current-state summaries distinguish acceptance from successful cancellation, without suggesting cancellation waits for the cooling-off period. D2 — Limit the visibility claims to personal media and preserve the accepted cache limitation. The same manual paragraph, and the account spec, say the person’s content becomes hidden immediately. But The manual also says only the owner can see Recently deleted content, without acknowledging previously loaded copies. David already accepted that residue in the plan’s answer 5(b), and the existing deletion screens disclose it. Recommend naming the affected personal media explicitly, distinguishing community contributions, and explaining that previously loaded copies can remain visible. Keep the precise cache duration in the technical spec. This is worth correcting because the current prose promises disappearance that a person can directly observe has not occurred. Success means the account-deletion and My content descriptions match S2’s scope and the settled cache decision. D3 — Remove the retention guarantee contradicted by the purge. The retention matrix still promises seven-year retention through anonymization, and its “Legal hold path” says payment records are not dropped. The purge explicitly deletes the account’s membership history; entitlement rows cascade with the user. The newly revised membership documentation correctly describes that removal. These sentences predate this change, but they directly contradict the lifecycle this harvest now documents and references. Someone consulting the matrix could wrongly believe those records remain recoverable. Recommend updating the payment row and operational-control statement to describe the implemented behavior, including the actual dispute hold, and replacing the retired table names. This establishes no new retention policy. Success means the matrix and deletion spec agree about which local records survive. D4 — Correct the Drizzle example and narrow the diagnostic rule. The new memory note demonstrates the problem inside The real content-purger query uses that selected-expression shape. The learning is useful, but its current example would send future debugging toward working queries. Recommend using the actual selected correlated-count shape and narrowing the note’s description and MEMORY entry accordingly. Success is a small Recommend Claude make these prose corrections together, regenerate the affected Help content, and run the existing documentation checks. The supplied clean automatic review does not resolve these directly observed discrepancies. Generated by Claude Code |
Fable — round 1Assessed at Oracle met at this head: yes David's readoutThe write-up of Phase 5 is accurate. I checked the account-lifecycle claims the new text makes — who may do what while unverified, un-onboarded, suspended or leaving; how a sign-in and a suspension are kept from crossing; the deletion engine's stages, timings, locks, what it keeps and what it deletes by who asked; the retired admin "deactivate" — against the code at this head, and every one held. The retired mechanism is gone from the prose everywhere I looked, and each learning landed in the home the documentation contract names. Three small things are worth the one batch this class allows, none of which changes what was built:
Recommendation: write the one batch for these three and merge. Nothing here reaches outside this pull request. Assessment and recommendationsCodex's automatic pass returned nothing, so the concerns below are mine, from reading the diff against the oracle and the checkout. What I inspected directly is marked; nothing here rests on the builder's account (none was supplied). D1 — Two documents quote an admin control by a label the screen does not carryWhere. What the checkout says (direct inspection). The button that opens the hard-delete dialog in Class and worth. A UI label quoted in prose that the UI does not show. The glossary is human-facing: an admin reading it looks for a button that is not there. For a model reader the consequence is concrete too — this repo's E2E convention finds elements by visible name ( Correction. Name the control as the screen does in both sentences — "Delete User", confirmed by "Confirm Hard Delete" — or drop the quoted label and keep the route. Observable: D2 — Inventory rows still describe Phase 5 deliveries as pending, beside a chapter that says they shippedWhere.
What the checkout says (direct inspection). Both B13 and B14 items landed in one Phase 5 commit: Class and worth. Two live statements of one fact that now disagree, in the one file David reads to see what is still owed for launch. The batch's own commit Correction scope. The class is inventory rows and notes whose D3 — The retention matrix's Payments row asserts a lifecycle the engine does not performWhere. What the checkout says (direct inspection). The purge's final transaction ( Class and worth. A human-facing compliance statement the code contradicts, left standing in a file the batch rewrote around it: the Auth, Profile, Social and Uploads rows and the One deletion engine bullet were all brought to the engine's truth; this row and its bullet were not. The contradiction predates the PR, but the sweep made it adjacent and more visible. Lower than D1 and D2 — the matrix has been aspirational in places for a long time — and still a one-row edit while the file is open. Correction. State what the product does: payment-domain rows go with the account at the purge; the financial record of a charge is Stripe's. Whether a seven-year retention obligation requires anything local is a compliance question outside this PR and not a technical fact — carry it as Needs David confirmation on the row, the marker Checked and not raisedListed so the batch knows these were read, not missed; none would change what a reader does.
Limits. I read the plan file at its digest and the quoted oracle; I could not fetch Issue #795's comments from this container, so where the prose cites a David decision I checked it against the plan's David's answers (the Phase 9 comment-delete button, the Phase 14 Terms override, the US pre-tick, under-13 refusal are all there) rather than the issue. I did not run the test suite; claims about what a test does rest on reading the test. Questions and next actionFor Claude. D1 and D2 are supported and bounded; D2's class has two candidate members (B17, B1) to check before the sweep is called complete. D3's prose fix is supported; its Needs David confirmation marker is the right state for the compliance question, not a request to settle it now. For Astra. Nothing disputed that I can see; if Astra reads D3 as out of the phase's scope, I would still write it, since the batch rewrote the rows on either side of it and the manual it contradicts — but it is the one of the three I would drop first. For David. Nothing blocks. The one item surfaced for later is whether any local seven-year retention of payment history is required; the marker holds the question until the compliance phase. Next action: write the one Documentation batch — D1, D2 (with the class check), D3 — and merge on green CI. Recorded gap: none; all three fit the single batch this class allows, and none reaches outside this pull request. Generated by Claude Code |
Generated by Claude Code |
…dden, not all content; matrix payments; UI labels; inventory rows; Drizzle note measured The one Documentation batch for PR #841's Astra and Fable assessments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR
Workstream: #840
What & why
This is the Launch Phase 5 documentation harvest and sweep. It is the docs half of Increment 7, split out in PR #837 — Launch Phase 5, Increment 7a: retire the admin soft delete and set-inactive edit. The docs now describe what Phase 5 built: the verify, onboard, act gate; Turnstile; suspension; the account deletion engine and what it keeps; the withdrawn NSFW opt-in; and the retirement of the soft delete and reinstatement. Every other doc that still described the retired rules has been swept.
Parent workstream: Issue #795 — Launch Phase 5 — Account and identity. This PR is docs only and changes no product code. The in-app help modules under
artifacts/overhype-me/src/generated/help/are regenerated from the edited Manual chapters, ascheck:help-contentrequires.Routed (the
/documentharvest):docs/ai-context/accounts-and-auth.md— the account states and the gate (GATE_EXCEPTIONS, Express-style matching), Turnstile,captcha_verified→ 0122. It has a new Account lifecycle: suspension and deletion section (suspension's two layers andcreateSignInSession, the engine's stages, billing fences, the purge and what it keeps by who asked, the callers, the never-onboarded cleanup, and the My content restore window). Also a new Age, audience and the NSFW opt-in section, and updated session revocation paths and the files list.docs/ai-context/security-model.md(auth section) — the gate as a trust boundary, anonymous auth routes reading their target's state, the session created under a share lock, the last-admin rule for suspension and deletion, re-authenticated deletion, and the unverified provider claim.docs/manual/9-accounts-and-auth.md— rewritten for Phase 5.docs/ai-context/glossary.md— Onboarding, Email verification and Remove rewritten. Suspend, Account deletion and Former member added. Deactivate and Reinstate marked retired, with their anchors kept.docs/ai-context/decisions.md— three entries: what deletion keeps (2026-11-02); joining and leaving (2026-10-30); suspension and the engine replace deactivation, and the NSFW opt-in is withdrawn (2026-10-30).docs/engineering/migrations-and-backfills.md— CHECK in the dump-and-restore form, aNOT NULL DEFAULTcolumn classified"drop"in the legacy fixture, no marking default on a column a publish may add first, andinformation_schemascoped topublic.docs/tests/TESTING.md— the local orval and codegen restore, the production-mode launcher in a cloud container, and four troubleshooting rows..agents/memory/— two notes: a Drizzle correlated subquery binds the outer column to itself; and two CodeQL alerts that a test file trips.Not routed, and why: the fleet-level gotchas from the harvest notes ("making a field mutable exposes every early read", "chain a commit after tests with
&&", "check-uat-formatneeds both Setup and Regression") belong in KITT-synced files (known-failure-patterns.md,running-long-test-suites.md,uat-doc-format.md), which a consumer does not edit. A stale code comment inartifacts/api-server/src/lib/membershipRefresh.ts(line 7, "admin soft-delete, reinstatement") is product code and outside this PR. It is recorded as next on Issue #795.Approved-plan oracle
Oracle source: Issue #795, its harvest-notes comments for PRs #798, #801, #815, #820, #833, #834, #835 and #836 and the "Handoff — 2026-11-02" comment; the plan
docs/plans/PLAN_PHASE5_ACCOUNT_IDENTITY.mdonmain(sha25652a059b6fccc0836d2c5293fdf0680e0376524bcc4d293113bffb73cdfa844af). Documentation class.The decisions the prose records, quoted:
is_active=false) becomes suspension; deletion is its own state machine. One state machine for leaving, one flag for being removed." (plan, settled decisions)users.is_active = falseany more (verified bygit grepat54f5b2f)." (Handoff — 2026-11-02)createSignInSession(lib/auth.ts). It readssuspended_atFOR SHARE and inserts the session in one transaction, so it serializes withsuspendAccount's FOR UPDATE plus revoke." — "Two layers. Each sign-in door refuses a suspended account, and the gate refuses every write by a session it still holds except logout. Reads by a held session are the approved design" — "Recovery is closed while suspended. Forgot-password silently issues nothing … Reset refuses before claiming" — "Recorded gap: a stored-field write that lands in the instant a suspension commits" (harvest notes, PR Launch Phase 5, Increment 6a: account suspension #835)reactions.user_idnull), and comments, submissions and links are credited to a former member. An admin removal deletes them as the abuse case." — "Every kept contribution carries a "former member" marker, never a bare null." (harvest notes, PR Launch Phase 5, Increment 5b: leaving and staying from the screens, and what deletion keeps #833)lib/accountDeletion.ts) owns every account-deletion transition. Its stages advance by compare-and-set, fenced to the request's generation" — "Lock order is population lock → owner content lock … → user row." (harvest notes, PR Launch Phase 5, Increment 5a: an account can leave cleanly — the deletion engine #820)false. The classifier keeps its parameter for when adult content ships, and the column stays until a contract step." — "beta_overlay… is a declared exception in the "every grid key is consulted" test rather than aFEATURE_KEYSentry" (harvest notes, PR Launch Phase 5, Increment 6b: NSFW readiness, and the NSFW opt-in withdrawn #836)captcha_verified… Increment 7 drops it" (plan S23); 7b is migration 0122, "only after David's next publish" (Handoff — 2026-11-02)IN (...)CHECK is not a fixed point of Postgres's deparse … a new varchar CHECK must be written in the restored form" — "A new NOT NULL DEFAULT column … Classify the columndrop" — "The local orval is older than CI's … hand-edit only the affected generated lines" (harvest notes, PR Launch Phase 5, Increment 6b: NSFW readiness, and the NSFW opt-in withdrawn #836)In scope: routing correctness against
documentation-workflow.md; factual accuracy against the merged diffs and the code at54f5b2f; contradiction or duplication with existing docs. Out of scope: prose style, structure preferences, completeness beyond the phase's actual learnings.Prose sweep record
Spec as swept (pass 2, as amended after pass 1):
captcha_verified, and the NSFW opt-in. It is replaced by suspension, the deletion engine, the gate, onboarding with Turnstile, and the withdrawn opt-in.docs/ai-context/accounts-and-auth.md#account-lifecycle-suspension-and-deletion.facts.is_activeand fact deactivation; subscription, engine and feature active states; meme soft-delete and Recently deleted; fact takedown; historical records (dated decisions, plans, retired, UAT/Replit run records); the NSFW classifier and quarantine; live per-action Turnstile;users.is_activeas still read.Scope and inventory:
scripts/sweep-scope.mjsover the payload plusdocs/ai-context,docs/manual,docs/engineering,docs/tests/*.md,docs/*.mdandreplit.md: 266 files, 4 workers per pass, two passes, plus one re-run (all six files read in full) over batches 2–4's files. Batch 5 only annotated four table rows in a file that re-run had just read in full. Read in full:accounts-and-auth.md,security-model.md, Manual chapters 9, 10 and 11,glossary.mdandmembership-entitlements.md. Every other file was swept, with hits read in context.Fixed (batches 1–5):
docs/manual/10-payments-and-membership.md— reinstatement as the designed exception, the deletion and history passage, and the "deactivate then reinstate" billing repair (shapes b, d, m).docs/ai-context/membership-entitlements.md— the reinstatement exception, the lock-order example, the soft-delete billing paragraph, and the reinstatement mechanics (a, b, d, m).docs/ai-context/glossary.md— the Membership tier and Reactivate entries (b, m).docs/manual/2-content-lifecycle.md— onboarding as a step before the first submission that admins and Legendary skip (f, e).docs/manual/11-admin-console.mdanddocs/ai-context/admin-console.md— the deactivate and reinstate pointers (a, b, l).docs/ai-context/community-and-engagement.md— the "no live path nulls a comment author" claim (j).docs/ai-context/meme-and-video-studio.md— the hard-delete cleanup paragraph and the files pointer (d, l).docs/ai-context/current-roadmap.md— the lockout guard's "deactivation" (h).docs/data-lifecycle-retention-matrix.md— the two-phase soft → hard rows (a, c, d, k).docs/ai-context/security-model.md— cross-links to the home.docs/tests/TESTING.md— the seeded accounts are onboarded, not only verified (e).docs/engineering/migrations-and-backfills.md— "data deletion is two-phase (soft → hard)" (k).docs/ai-context/legal-safety-moderation.md— evidence survives every deletion, not only an admin hard delete (d, k).docs/ai-context/launch-feature-inventory.md— the Users, B10, B11, B24 and J8 decision rows marked done in Phase 5, each citing the home (a, b, c, e, f; batch 5, after the re-run reader found the siblings of the first annotated row left bare).Declined, with the exclusion that applies:
known-failure-patterns.md(PR feat(moderation): NCMEC phase 3 — isSubmittable + classifyWaitingState #349 and Derive membership from entitlements, don't assign it per-event #287 examples) andlaunch-feature-inventory.md's dated "Verified 2026-10-05" note — dated history (5), or KITT-synced.glossary.mdLegendary "no CAPTCHAs",product-brief.md,replit.mdandoverhype-designSKILL — the live per-action captcha (7).launch-definition.mdandarchitecture-map.mdTurnstile lines — agree with the home; scope lists.ai-context— a Manual cites its sibling chapter.#account-creation, the section that states the gate.manual/3-moderation.mdevidence lines — agree (NCMEC rows survive with the person nulled).Decisions taken on my recommendation
documentation-workflow.md's ad-hoc harvest rule. Undo: close Launch Phase 5 docs sweep — accounts, suspension, deletion, and the retired rules #840 and point theWorkstream:line at Launch Phase 5 — Account and identity #795.docs/ai-context/. Undo: mark the lines<!-- tuning-ok -->and restore the figures.Latitude granted to me: none.
Verification
node scripts/check-docs-accuracy.mjs→✓ docs-accuracy: 164 files, all relative links resolve and all cited repo paths exist.node scripts/check-manual-tuning-language.mjs→✓ manual tuning-language: 13 file(s), no values or magnitude stand-ins outside docs/ai-context/.pnpm --filter @workspace/overhype-me run check:help-content→generate:help --check: up to date (16 files).54f5b2f's source: the routes, the eligibility order,GATE_EXCEPTIONS,createSignInSession, the purge's keep/delete branches, the cancellable statuses,FRESH_SIGN_IN_MS, the rate limit, and the classifier callers.Post-merge verification (live environment)
none needed (docs only; the regenerated help is checked by CI's
check:help-content)Checklist
pnpm run check:docspasses.Build gate reproduced when relevantn/a (docs and generated help only)General fix, not one examplen/aShip the surfacen/aAsync shows statusn/aHuman decisions preservedn/aMigration safetyn/aGenerated by Claude Code