Phase C: multi-shop org model #2

Merged
parley merged 3 commits from finish/phase-c-org into develop 2026-08-08 20:55:44 +00:00
Owner

Summary

  • Multi-shop tenancy: shop slugs, optional parent organization, membership is_active, dual-shop seed (inno / shop-b / dual@test.com)
  • Explicit shop context via X-Alloy-Shop-Id / X-Alloy-Shop-Slug (multi-membership without header → 409); /auth/me returns memberships without requiring a shop
  • Per-shop ProShop config (shop_proshop_configs + /settings/proshop) with fail-closed client factory; scheduler loads per shop
  • Admin: invite existing email adds membership; POST /users/{id}/eject is shop-local (not global deactivate)
  • Spec + plan under docs/specs/2026-08-01-phase-c-org/

Evidence

  • VERIFY: docs/plans/2026-08-01-phase-c-org/VERIFY.md
  • Local: ruff clean; pytest -m "not postgres" 213 passed; pytest -m postgres 5 passed
  • Migration: 005_phase_c_org

Test plan

  • CI backend unit green
  • CI postgres green
  • After merge: alembic upgrade head + seed_users.py --seed on local/staging
  • Merge style: merge commit to develop (not squash)
## Summary - Multi-shop tenancy: shop slugs, optional parent organization, membership `is_active`, dual-shop seed (`inno` / `shop-b` / `dual@test.com`) - Explicit shop context via `X-Alloy-Shop-Id` / `X-Alloy-Shop-Slug` (multi-membership without header → 409); `/auth/me` returns memberships without requiring a shop - Per-shop ProShop config (`shop_proshop_configs` + `/settings/proshop`) with fail-closed client factory; scheduler loads per shop - Admin: invite existing email adds membership; `POST /users/{id}/eject` is shop-local (not global deactivate) - Spec + plan under `docs/specs/2026-08-01-phase-c-org/` ## Evidence - VERIFY: `docs/plans/2026-08-01-phase-c-org/VERIFY.md` - Local: ruff clean; `pytest -m "not postgres"` **213 passed**; `pytest -m postgres` **5 passed** - Migration: `005_phase_c_org` ## Test plan - [ ] CI backend unit green - [ ] CI postgres green - [ ] After merge: `alembic upgrade head` + `seed_users.py --seed` on local/staging - [ ] Merge style: **merge commit** to `develop` (not squash)
feat(tenancy): Phase C multi-shop org model
Some checks failed
CI / Backend (Postgres RLS) (pull_request) Has been cancelled
CI / Backend (ruff + pytest) (pull_request) Has been cancelled
ccf9611766
Signed-off spec + plan, then implementation: shop slugs, optional org,
membership is_active, explicit shop headers (409 when multi), /auth/me
memberships, per-shop ProShop config with fail-closed client, scheduler
per-shop load, invite-existing and shop eject, dual-shop seed.

Evidence: docs/plans/2026-08-01-phase-c-org/VERIFY.md (213 unit, 5 postgres).
parley referenced this pull request from a commit 2026-08-02 05:30:45 +00:00
docs: HANDOFF Phase C PR #2 link
Some checks failed
CI / Backend (ruff + pytest) (pull_request) Failing after 10s
CI / Backend (Postgres RLS) (pull_request) Successful in 27s
ab8749aeb2
fix(ci): clear ruff E501/SIM114 in seed scripts
All checks were successful
CI / Backend (ruff + pytest) (pull_request) Successful in 1m29s
CI / Backend (Postgres RLS) (pull_request) Successful in 27s
2cfa60abcb
Phase C PR CI failed at ruff before pytest; wrap the long seed error
string and collapse duplicate slug-assignment branches.
parley merged commit fc73315727 into develop 2026-08-08 20:55:44 +00:00
parley deleted branch finish/phase-c-org 2026-08-08 20:55:44 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
numencore/alloy!2
No description provided.