feat(internal-admin): brand reassignment #31

Merged
root merged 2 commits from dev into main 2026-05-18 10:35:45 +03:00
Owner

Phase F. POST /internal/admin/subscriptions/:id/brands replaces the userBrands set, validates count against plan.

Phase F. POST /internal/admin/subscriptions/:id/brands replaces the userBrands set, validates count against plan.
root added 2 commits 2026-05-18 10:35:44 +03:00
PCAT auth pool warm-up always started with e-acca.com, which doesn't
load through the new DataImpulse rotating proxy — page.goto sits on
the 30s navigation timeout and only then falls through to the next
candidate. The remaining sites (alkatalog, auto-komplekt, autotrade,
…) reach the upstream widget in 3-10s through the same proxy, so an
on-demand acquireSession() that lands during a cold start spends 30s
blocked on the dead first hop before any retry can succeed.

Move e-acca to the end of the list. New cold-pool capture finishes
in ~4s on the first reachable site (alkatalog) instead of 30s+9s.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat(internal-admin): brand reassignment — Phase F
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
b7a5b6996b
POST /internal/admin/subscriptions/:id/brands  { brandIds[], reason, founderId }

- Only operates on active or trial subscriptions.
- Refuses Full plan (brandCount=0) — that tier auto-grants all brands.
- brandIds.length must exactly match plan.brandCount, no duplicates.
- Each brand ID must exist and be active.
- Replaces the user_brands rows for the subscription atomically (delete
  + insert; same-row contention is microseconds, panel calls are serial
  per founder).
- Logs the old → new brand sets for auditability.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
root merged commit 2fe8828555 into main 2026-05-18 10:35:45 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: root/sase.tr#31