AUTH-PROFILE-001: recover missing member profiles safely - #132
Merged
Conversation
✅ Deploy Preview for luminous-fox-7c393f ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
EXACT-HEAD REVIEW / HOSTED EVIDENCE at 2026-07-13T08:50:52Z for
No source/check blocker remains. The PR stays draft because deployment safety is a separate blocker: current automation is frontend-first and Firebase authority is absent. #135, #133, and #136 now represent the owner release-model decision, short-lived deployment identity, and exact staged/backend-first release. Do not merge #132 until those gates make the required release order possible. |
daliu
force-pushed
the
codex/issue-118-profile-bootstrap
branch
from
July 13, 2026 10:01
c982bcd to
1228558
Compare
daliu
marked this pull request as ready for review
July 13, 2026 10:05
This was referenced Jul 13, 2026
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.
Outcome
Prepare the safe fix for signed-in accounts that have no
members/{uid}profile after the Firebase cutover. The server now creates one pending profile at most once, and the account page keeps editing hidden unless setup and the normal Firestore read both succeed.This source pull request completed its rebased hosted review. #135 is now merged: merging this source runs CI only and publishes neither the website nor Firebase. Issue #118 stays open until the protected staging and live evidence is complete.
What changed
ensureMemberProfilewith an empty request body.Security invariants
role: unverified; recovery does not grant or remove actual access.setCustomUserClaims; only the explicit role-grant workflow may change authority.Local verification
Node
v20.20.2, npm10.8.2, Java 17, rebased head6381907a6e243335094cb25122ef773943f7f19d:npm --prefix functions run lint— passed.npm --prefix functions run test:run -- --runInBand— 36 passed; the emulator-only test was intentionally skipped.npm --prefix functions test— 5 suites / 37 tests passed against demo-only Auth and Firestore emulators.CI=true npm test -- --watchAll=false --runInBand— 6 suites / 62 tests passed.npm run test:rules— 4 suites / 298 tests passed against the demo-only Firestore emulator.npm run test:spa-navigation— 10/10 passed.--max-warnings=0— passed.CI=true DISABLE_ESLINT_PLUGIN=true npx --no-install react-scripts build— compiled successfully.git diff --checkand relative Markdown target checks — passed.29241330054passed Frontend/build, Functions, and Rules; the Netlify preview also passed.\n- Two independent read-only reviews approved the authorization, concurrency, claim preservation, error redaction, officer procedure, and exact backend-first release order.Existing React Router future-flag and stale Browserslist warnings remain unchanged. No dependency or lockfile changed.
Required release order — provider blocker
#135 merged through #138 as
9eafab1217aff7058c42240aaba72d7b93f8ed24. A normal merge now runs CI only; it cannot publish this frontend or mutate Firebase. Post-merge staging and synthetic production probes also proved that missing configuration or cloud authority ends red before authentication, Firebase mutation, or Pages publication.That makes the source merge safe. It does not make profile recovery live. The remaining order is:
createMemberOnSignUpandensureMemberProfileto isolated staging.runmprc.comthrough the separately protected WEB-001/Netlify path.Compatibility and rollback
Officer impact: A member will get a plain retry/sign-out path instead of a raw permission error. Officers must not create profiles, delete accounts, or grant roles as a repair.
Officer documentation:
docs/officers/EVENTS_SHOP_MEMBERS.md,docs/officers/EMERGENCY_AND_RECOVERY.md, anddocs/officers/SYSTEM_MAPS.md; engineering context inSYSTEM_DESIGN.md,SECURITY.md, andOPERATIONS_RUNBOOK.md.Deployment evidence: Source only. A merge of this PR will run CI and publish nothing. Firebase Rules/Functions not deployed; website not published from this branch;
runmprc.combehavior not verified; outside-provider configuration not changed or verified. The draft PR/preview and green checks are source evidence only.Tracks #118. Do not close #118 from source merge alone.