Agency partnerships
An agency manages several client brands from one workspace: it funds campaigns from an agency wallet, pays on a brand's behalf, sees cross-client reports and signs contracts for the brand.
13,500API tests passing on the release branchDesign
- A partnership collection links an agency workspace to brand workspaces with Owner, Campaign Manager and Member roles.
- In design review I found the complexity hiding in one inclusion list that carried four stacked decisions. I replaced it with an exclusion list and removed a link cache, which cut a whole class of invalidation bugs.
- Payer attribution goes through one service, so financial visibility is keyed to the paying agency in one place.
- Contract terms are a versioned enum in the shared SDK. A legal change is an enum bump, and every signer is re-prompted automatically.
Hard problems
- Agency owners could not sign contracts. A billing-profile filter stripped data from any seat without a financial permission, and the agency role had none. A recorded end-to-end walkthrough caught it before customers did.
- Contracts voided on every autosave. The compaction step dropped an empty array, the API shallow-merged the object, and a void hook fired on each save. I found it from the audit diff during demo prep.
- I shipped a hardening fix to master without the unfinished feature on the same stacked branch, using a merge-base parent plus a
merge -s ourscommit so the diff showed only the right delta.
Verification
A 39-case multi-tenant QA pass with two agencies sharing one brand found 12 issues, all fixed before launch. 115 live test cases and 49 of 49 e2e tests. Rolled out behind a feature flag, then enabled for everyone in November 2026.