Repository navigation
Launch Phase 5, Increment 7b: remove captcha_verified and nsfw_mode_enabled from the model (the drop follows the next publish) - #845
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
…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
…bled (0122) The contract step the plan held until Increment 3's release was published (published 2026-11-03 from 61a2d8b). Migration 0122 drops the two users columns nothing reads or writes: captcha_verified (retired by Increment 3) and nsfw_mode_enabled (the opt-in withdrawn by Increment 6b). It reports how many rows held true before each drop and is a no-op when the columns are already gone. The schema, the legacy fixture allowlist, the snapshot exemptions and the NSFW readiness test follow; the accounts spec now says the columns are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR
…to claude/wizardly-gauss-t27yhk
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: beeb0347e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Astra — round 1Assessed at Oracle met at this head: no The cleanup is appropriate, but the published application still requests these columns when signing people in. Dropping them now would break sign-in on instances still serving that release, and reverting the code would not restore service. I recommend publishing the application’s remaining dependency removals first, then dropping the columns in a subsequent release. This completes the already agreed two-release approach. Finding Direct inspection confirms that The failure class is implicit database dependencies surviving the removal of explicit business-logic uses. Removing both fields from the shared ORM declaration addresses that class at its source. This head makes that removal alongside the destructive migration, so it protects the new application but leaves the published application incompatible. The consequence follows the documented operating model: old instances serve while the shared database changes, and code rollback leaves those changes in place. Replit can also apply the deletions before the new server boots. See the migration policy. Idempotent drops and passing tests against the new code do not establish compatibility with the published code. The additional release and bounded test/documentation adjustments are proportionate to preventing a sign-in outage that code rollback alone cannot repair. Although the general migration policy allows same-release contraction before Seed, S23 and this step’s oracle explicitly require prior published compatibility. That settled requirement governs here; no new product decision is needed. I recommend this correction scope:
Success should demonstrate that the compatibility release supports local and OAuth sign-in/account creation with the columns retained and after their removal. Include generated selections, returned rows and inserts in that verification; a search for explicit field references alone misses this mechanism. Existing focused checks can supply the evidence. Remaining investigation and next action: Claude should confirm whether 0122 has reached Replit’s dev database. The PR reports a local test migration, which does not establish dev’s state. Because publishing copies dev’s schema changes, the compatibility publish must retain both columns there too. I have not inspected live deployment state. Recommend preparing the compatibility release now, resolving that narrow deployment-state question before publication, and retaining the column drop as the subsequent contract step under the existing review and publish process. Generated by Claude Code |
Fable — round 1Assessed at Oracle met at this head: no David's readoutThis change deletes the two retired account columns, and the deletion itself is written carefully. What is not met is the one condition the plan put on it: the drop may only run once the version of the site you have already published no longer touches those columns. The published version's code never mentions them, which is what everyone checked — but the database layer it uses still lists them, so every time that version loads an account row (signing in with a password, signing in with Google or Apple, creating an account, handling a Stripe event) it asks the database for those columns by name. Drop them while that version is still serving, and those requests fail until the new version has fully taken over; and if you ever went back to the older version, they would keep failing until another migration put the columns back. I reproduced the behaviour against the installed database library rather than taking the reviewer's word for it. Nobody is downstream of that yet — Seed has not begun — and the rules do allow a drop in the same release before Seed. But the plan you approved chose to practise the safe order anyway, and the change says it did while in fact not doing so. The safe order costs little here: ship this change without the drop (the code stops listing the columns), and run the drop in a small follow-up after your next publish, whenever that is. No extra publish is needed for it, and nothing needs deciding by you. If you would rather spend the pre-launch latitude and drop in one go, that is your call to make, since the plan said otherwise; my recommendation is the two-step order. Assessment and recommendations
|
Generated by Claude Code |
…after the next publish Codex (PR #845, round 1) found that the published release still declares both columns in the Drizzle model, which names every declared column in a full-row select, an insert and a returning(); dropping them now would break sign-in, sign-up and Stripe webhooks on instances still serving it. Both assessors recommended the split. This release removes the fields from the model only. Migration 0122 moves to a follow-up PR after the next publish. The parity test exempts exactly the two columns until 0122 drops them; the NSFW readiness test reads the column by raw SQL while it exists; the migrations guide now says the ORM declaration counts as a use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR
|
Round 2 context. Head Generated by Claude Code |
|
@codex review Generated by Claude Code |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…nd nsfw_mode_enabled (#847) The contract step of the expand-then-contract pair begun in PR #845. That release (main at 1231526), the first whose Drizzle model declares neither column, is now the published one, so 0122 drops both users columns. It reports how many rows held true in each before dropping, and is idempotent. The parity test's pending-drop exemption and the column-present branch of the NSFW test go with it; the accounts spec and decisions log move to past tense. Claude-Session: https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR Co-authored-by: Claude <noreply@anthropic.com>
Workstream: #795
What & why
The second-to-last step of Issue #795 — Launch Phase 5 — Account and identity: the expand-then-contract transition for two retired
userscolumns.captcha_verifiedhas been unused since Increment 3 (PR #801).nsfw_mode_enabledbelongs to the NSFW opt-in that Increment 6b (PR #836) withdrew.Round 1 changed the shape of this PR. It first carried migration 0122, which drops both columns. Codex found that the published release still declares both columns in its Drizzle model. Drizzle names every declared column in a full-row
select(), aninsertand areturning(), so dropping them while that release serves breaks password and OAuth sign-in, sign-up and Stripe webhooks, and a code rollback would not repair it. Both assessors recommended splitting the step. So this PR:lib/db/src/schema/auth.ts) and from the legacy fixture allowlist (the loader inserts only allowlisted columns);lib/db/migrations/changes, and both columns stay, with their defaults;UNDECLARED_PENDING_DROPinlib/db/src/baseline.test.ts) until the drop lands;phase5.nsfwReadinesswhile it exists;accounts-and-auth.md, and adds tomigrations-and-backfills.mdthe rule that caught this: the ORM declaration is a use.The drop (0122) is a follow-up PR, opened once David has published a release built from this one; its migration comment names that release's SHA.
Approved-plan oracle
Oracle source:
docs/plans/PLAN_PHASE5_ACCOUNT_IDENTITY.md, sha25652a059b6fccc0836d2c5293fdf0680e0376524bcc4d293113bffb73cdfa844af(as amended in PR #833); the 7a/7b split recorded on Issue #795.Settled decisions this step enacts (verbatim):
captcha_verified— the middleware, the session blob fallback, the OAuth and local-auth row reads, the bypass logic, which moves toonboarding_completed_at— while the column still exists; Increment 7 drops it (migrations-and-backfills.md, Expand, then contract; Astra, round 1, C10)."nsfwModeEnabledis removed from the profile PATCH body and the admin editor, and its consumers … passfalse; the column stays until a contract step."migrations-and-backfills.md: "Drop a table or column … only once the release currently published neither reads nor writes what is removed."Must not change: no read or write of either column anywhere; the classifier's parameter, which every caller passes as
false; every other users column.Decisions taken on my recommendation
beeb034).a1fe81f.truerows it discards rather than copying them (for the follow-up)./simplifynot run: a field removal and its follow-on changes.Latitude granted to me: none.
Verification (head
a1fe81f)usersqueries (Fable's list, in the review-action comment) are all covered by removing the declaration.git grep -n -E "captchaVerified|nsfwModeEnabled"overlib/db/srcandartifacts/*/srcreturns nothing outside tests and the classifier's own parameter.routes.localAuth50/50,routes.google.callback12/12,routes.apple.callback6/6 andpasswordHardening10/10, in both states.phase5.nsfwReadiness5/5 ·legacyFixtureAllowlist19/19 ·phase3.productionAdopt19/19 ·lib/db50/50 (parity included) ·check-migration-snapshots✓ (122 entries) ·pnpm run typecheckclean ·check:docs✓.Post-merge verification (live environment)
information_schema.columnsstill returns bothcaptcha_verifiedandnsfw_mode_enabledforpublic.users(the interim state). The site loads, and/api/healthzanswers ok.usersfrom this PR. If it offers to drop either column, that means dev's schema drifted; cancel and tell me.Checklist
check:docspasses.Build gate reproduced when relevantn/ausersin the published release, covered at the declaration.Ship the surfacen/a (no behaviour)Async shows statusn/aHuman decisions preservedn/a🤖 Generated with Claude Code
https://claude.ai/code/session_01UMMrrtY1Cuk3a8j8vPnwGR