From ac2aa85b7eb48facc548655fe4c0557f5702c893 Mon Sep 17 00:00:00 2001 From: Keysat Date: Fri, 12 Jun 2026 21:35:13 -0500 Subject: [PATCH] =?UTF-8?q?Note=20product=E2=86=92profile=20write-path=20g?= =?UTF-8?q?ap=20and=20scope=20the=20picker;=20record=20red-test=20+=20FK?= =?UTF-8?q?=20decisions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ff05561..8fa8b23 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -108,13 +108,37 @@ Operator-specific memories at `~/.claude/projects/-Users-macpro-Projects-licensi *every* paid purchase) was fixed in daemon `31f4670`; `:53` (version bump `8c4bacc`) built, installed to prod, and published to the registry on 2026-06-13. The live purchase path works again. -- **Next, in priority order**: (1) resolve the 3 red tests — delete the dead - `payment_provider_preference_round_trip`, decide the mock-injection seam for the - two `paid_purchase_*` (see `docs/guides/testing.md`); - (2) build the 4 deferred UIs + add `unlimited_merchant_profiles` to master - Pro/Patron policies; (3) re-register the master Zaprite webhook; (4) optional: - run formatters as a standalone commit. +- **GAP — multi-profile is non-functional end-to-end**: nothing in the shipped + app writes `products.merchant_profile_id` (the INSERT in + `create_product_with_currency` omits it; `update_product_with_currency` has no + field for it; the `Product` struct in `models.rs` doesn't even carry it). So + every product created post-migration stays on the default profile, and a Pro + operator can create extra profiles + attach providers but cannot route any + product's sales to them. The data model + resolver fully support it; only the + product→profile **write path** is missing. **This is the gating piece for + multi-profile** — see the scoped slice below. +- **Next, in priority order**: + (1) **Product→merchant-profile picker** (gating piece above). Slice: + add `merchant_profile_id: Option` to the `Product` model + its SELECT + column mapping in `repo.rs`; add a `set_product_merchant_profile` follow-up + writer mirroring `set_product_entitlements_catalog`; add the field to + `CreateProductReq`/`UpdateProductReq` (`api/admin.rs`) applied as a post-create/ + update follow-up; add a profile `