- Shipped
- September 6, 2026 at 2:58 AM UTC
- Author
- Kamo
- Commit
- b0acada
RegisterFlow already read `?discount=` for visitors who reached the form without passing through the marketing middleware — a code pasted into an ad, an email or a QR code, or a cross-apex hop the cookie could not follow. It was wasted: SecurityService publishes the attribution event only when the body carries a visitor guid, and these visitors have none, so the code was collected, sent, and discarded with nothing logged. resolveMarketingTracking() fixes that at the root rather than by loosening the gate. The guid is the identity spine — every conversion, now and weeks from now, is keyed on it — so the right answer is for the visitor to HAVE one. Minting it here is the same act the marketing middleware performs at its own door, and writing it to the shared apex means a visitor who later returns to the marketing site is recognised as the same person (its middleware keeps an existing kdsc_vid rather than replacing it). Nothing is ever minted without a code, so a visitor who never followed a partner link still leaves this site uncookied — which is what keeps these cookies strictly necessary rather than analytics. Also collapses applyHandoff's second apex rule onto this one. It took the last two labels, which is right for register.acme.com and wrong for register.acme.co.uk: that yields Domain=.co.uk, a public suffix, and the browser drops the entire Set-Cookie silently — so on a multi-label tenant the advert uid was never carried at all. guard:tracking checks the apex rule against the marketing site's, with no new dependencies (Node type stripping). Two repos, two deploys, no shared import, and a drift fails nothing — it just stops paying somebody.