Repository navigation
refactor: remove households and onboarding - #647
Merged
Merged
Conversation
Menlo runs one household, so the Household aggregate, HouseholdId, the onboarding context and the /api/households endpoints are gone. Budgets are now unique per year and shared by every member. User provisioning moves to a Users namespace, returns a Result and survives concurrent first requests. An endpoint filter on the /api group provisions a missing User from the claims, or returns 403 USER_NOT_PROVISIONED when the claims cannot make one. One migration deletes household-scoped rows, then drops the household columns and the households and onboarding tables. Users are kept. Back up prod before deploying. Includes the lock file and migration reformat from dotnet format. Implements #646 Closes #627 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaJ6skre16twz7vgrM6xTH
Sign-in now goes straight to the app. The onboarding page, route, guard and service, the household API service and the householdId and onboarding fields are removed, so /onboarding 404s like any unknown route. An e2e test checks a signed-in member lands on home. Implements #646 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaJ6skre16twz7vgrM6xTH
Adds household and household member to the glossary, folds user provisioning and GET /auth/user into the authentication reference, and removes the onboarding API reference. Updates the budget, persistence, testing and architecture docs for budgets shared per year and the /api user-record rule. Implements #646 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaJ6skre16twz7vgrM6xTH
Removing the household check split a combined condition, which left the delete and update category handlers just under the 70% line coverage guardrail. These tests cover the not-found paths. Relates to #646 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaJ6skre16twz7vgrM6xTH
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
The API coverage baseline reported LoggerMessages.cs as missing, because source-generated partial methods have no executable lines in the report. The check skips files marked [ExcludeFromCodeCoverage]. Relates to #646 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaJ6skre16twz7vgrM6xTH
Adds unit tests for the /api user-record filter: no external id, blank email, provisioning returning an error, a database failure that must surface as a 500, and the email as display name fallback. Also tests that sign-in throws when the claims cannot make a user. Relates to #646 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KaJ6skre16twz7vgrM6xTH
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.
Summary
Menlo runs one household, so this removes the
Householdaggregate,HouseholdId, the onboarding flow and the/api/householdsendpoints. Budgets are unique per year and shared by every member. An endpoint filter on the/apigroup makes sure each signed-in caller has aUserrecord, provisioning one from the claims, or returning403 USER_NOT_PROVISIONEDwhen the claims can't make one.Before merging: take a manual
pg_dumpof prod. The migration deletes budgets, budget categories, budget items, canonical categories and onboarding states, then drops the household columns and tables. Users are kept.Downrecreates empty tables only.Acceptance criteria
HouseholdIdin the domain, schema or API (only migration history and UI copy mention "household")Userrecord and no onboarding step (OIDC events test,GET /auth/userhas noonboardingfield)Userrow is missing can still use/apiand the row is created, including two concurrent first callsGET /api/householdsreturns 404)GLOSSARY.mddefines household and household member; auth, persistence, budget, testing and architecture docs updatede2e/home-landing.spec.ts) was added but not run hereVerification
dotnet test: all pass.dotnet formatis clean.pnpm lintandpnpm testpass; docs link check passes.LoggerMessages.cs) as MISSING.Notes
Menlo.AppHost/packages.lock.jsonand adotnet formatreformat of theAddOnboardingStatemigration, committed as-is on request. Worth a look before merge, since the lock file changedlinux-x64entries towin-x64./apicall now does one extra user lookup (accepted in the spec).Closes #646
Closes #627
🤖 Generated with Claude Code
https://claude.ai/code/session_01KaJ6skre16twz7vgrM6xTH