Repository navigation
Launch Phase 5, Increment 7c: migration 0122 drops captcha_verified and nsfw_mode_enabled - #847
Merged
Merged
Conversation
…nd nsfw_mode_enabled 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. 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. |
17 tasks done
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.
Workstream: #795
What & why
The last step of Issue #795 — Launch Phase 5 — Account and identity: the contract half of the expand-then-contract pair begun in PR #845 — Launch Phase 5, Increment 7b: remove captcha_verified and nsfw_mode_enabled from the model. That release (
mainat1231526) is the first whose Drizzle model declares neither column, and it is now the published one. David published on 2026-11-03.get_publish_statusreportssuccess. The Repl's checkout is1231526plus Replit's empty "Published your App" deployment commit (0fd06116,git show --statempty).grep -cof either column in itslib/db/src/schema/auth.tsprints0. Production still holds both columns.lib/db/migrations/0122_drop_captcha_and_nsfw_opt_in.sqlfirst reports, for each column that still exists, how many rows heldtrue. Then it runsDROP COLUMN IF EXISTSon both. It is idempotent: a second run, or a run after Replit's publish has already dropped them, changes nothing. Its comment names1231526as the compatible published release.UNDECLARED_PENDING_DROPfrom the parity test, so model and database must agree again with no exceptions.phase5.nsfwReadinessnow asserts that the column is gone.accounts-and-auth.mdanddecisions.mdmove to the past tense.Approved-plan oracle
Oracle source:
docs/plans/PLAN_PHASE5_ACCOUNT_IDENTITY.md, sha25652a059b6fccc0836d2c5293fdf0680e0376524bcc4d293113bffb73cdfa844af(as amended in PR #833). The 7a/7b split and the 7b/7c resequencing are 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." It also says The ORM declaration is a use.Must not change: every other
userscolumn; the classifier's parameter, which every caller passes asfalse; no code reads or writes either column.Decisions taken on my recommendation
truerows it discards rather than copying them (decided in PR Launch Phase 5, Increment 7b: remove captcha_verified and nsfw_mode_enabled from the model (the drop follows the next publish) #845, carried out here).captcha_verifiedis superseded by onboarding.nsfw_mode_enabledrecords a choice the product withdrew, and adult content will build onadult_verified_atand the audience columns. Undo: add a copy into an archive table before the drop.main(0fd06116) is realigned at this PR's close-out sync, not moved to a branch. It has no file changes, so a PR would carry an empty diff. Undo: none needed, because the commit object stays in the Repl's reflog./simplifynot run: a migration and its follow-on edits.Latitude granted to me: none.
Verification (head
42df2bf)scripts/setup-test-db.shrebuilt the test database through 0122. Afterwardsinformation_schema.columnsreturns neither column forusers.artifacts/api-serverfull suite, 4 shards:result=pass, 0not ok.lib/db50/50, parity test included with no exemption.check-migration-snapshots✓ (123 entries).pnpm run typecheckclean.Post-merge verification (live environment)
[0122]NOTICE counts.information_schema.columnsreturns neither column forpublic.users./api/healthzanswers ok.users.captcha_verifiedandusers.nsfw_mode_enabledand nothing else. If it offers any other change, cancel and tell me.Checklist
Build gate reproduced when relevantn/aShip the surfacen/a (no behaviour)Async shows statusn/aHuman decisions preservedn/aIF EXISTS, counts reported before the drop; runs only after a compatible release is published.Generated by Claude Code