feat(server): prepare pending-user schema and activation guards #65
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/ed3ebb61-user-setup-schema"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Prepare the approved user-setup schema while preserving the current app behavior. A stock older server cannot start after a new migration is recorded; this preparatory main image will be the migration-aware rollback artifact for feature PR #64.
The migration adds
users.activation_pending(default 0), privateuserPasswordSetupsand its organization index, exactly as Morten approved on task ed3ebb61 at 10:01 UTC on 20 October 2026. Existing users, including passwordless users, remain activated. Pending users cannot obtain/use user tokens, refresh, gain organization access or bypass setup through general password changes. Removing an originating membership revokes its current verifier atomically.This PR adds no provisioning/setup HTTP routes or UI. It must merge before #64; the feature stays blocked from rollout until this image has been tested against a disposable upgraded fixture.
Evidence
After: The registered migration upgrades a populated schema at 035 without changing existing credential rows; all existing users default to activated, and the registered server can reopen the migration ledger.
Merge danger
Door: one-way for the database relative to the old stock image. Morten has approved this schema for tests and eventual live startup after feature CI, Security review and a verified rollback artifact. No down migration, data deletion or restore is included.
Blast radius: app
Main builds publish an image but do not update the pinned live Deployment. Keep this schema-only image available before publishing the feature release. The eventual single-writer Recreate rollout briefly interrupts the server.
Rollback and verification
Task: ed3ebb61-7698-4856-a06d-ac0f5ae2ca3c. Branch:
feat/ed3ebb61-user-setup-schema.Standards: no blocking findings at
66dbca6. Migration 036 matches approved additive SQL; existing users default activated, including passwordless users. Pending password/token/refresh/organization-access guards and atomic membership-removal revocation remain in this prior-routes/UI baseline. Forge statuses 440/441 are green. Spec: no blocking findings. NON-BLOCKING release prerequisite: merge this PR first, retain its published main image by digest and run the attached rollback-smoke against that actual image before feature release. The reviewed script uses a disposable persisted fixture, restarts the server and verifies readiness, existing sign-in/passwordless self-service, pending denials and absent provisioning routes. Temporary Pod must use emptyDir only, no Service/PVC/Secrets/host access, explicit automountServiceAccountToken:false, UID/GID10001, RuntimeDefault, read-only root, no escalation, drop ALL and existing resource bounds. Roll back only to this verified baseline with schema/pending state retained and compatible agent pin; stock 0.47.0 cannot start after 036. Independently passed 28 focused tests across feature/migration/privacy/safeguards. Live remains 0.47.0. Findings per axis: Standards 0; Spec 1 non-blocking delivery prerequisite. No merge/deploy performed.WIP: feat(server): prepare pending-user schema and activation guardsto feat(server): prepare pending-user schema and activation guards