Revenue's repo carried a Growth-clone substrate; cleanup deletes 47 route+module pairs that were never Revenue's surface
Why
Status memo on the carve-up thread. Revenue's repo was originally seeded by a wholesale clone of Growth's pre-cutover surface (per the "transfer from growth" commit a few generations back on Revenue's main). The clone gave Revenue a working substrate to begin its Postgres cutover work without re-implementing Growth's auth, http, and integration shims from scratch, but it also left Revenue carrying a wide pile of routes and modules that were never Revenue's domain.
The carve-up parent's bucketing implicitly assumed Growth was the only repo carrying these route shims. Revenue had its own copies the whole time. This memo reports the post-clone cleanup that brings Revenue's surface area down to its actual Revenue scope plus the legacy substrate the README-legacy-substrate.md policy explicitly preserves.
What deleted
Revenue's src/app/api/ lost twelve route trees that the carve-up routed elsewhere (or that were always Growth-canonical):
app-config/test/(Platform absorbed per2026-05-27-platform-app-config-test-absorption-live)quo-contacts/(Sales absorbed per2026-05-27-sales-quo-contacts-absorption-live)lead-intakes/,webhooks/meta/,app/webhooks/meta/(Growth-canonical)client-externals/,client-externals/sync/(Platform direction post-Identity-v1)client-profiles/,clients/profiles/*(Delivery — Participant)lessons/cancel,lessons/complete,lessons/debit,lessons/no-show,lessons/process-outcome(Delivery — Lesson surface)reservations/create,reservations/lock,reservations/void(Delivery — lock state machine)webhooks/backfill-deliveries/,webhooks/backfill-external-actions/(Platform — eventing-rail observability)
Revenue's src/modules/ lost seven module trees with no remaining importers:
quo-contacts/,client-externals/,client-profiles/,lesson-summaries/(their only callers were the deleted routes)lead-intakes/,lead-attributions/,campaigns/(Growth-canonical; the only intra-module dependency waslead-intakes/repo.tsreadinglead-attributionsandcampaigns, all going at once)
Plus app-config/ got the same growth-side trim Growth applied earlier today: route.ts and repo.ts deleted, service.ts and schema.ts trimmed to env-helper functions only, index.ts updated. The four Revenue modules that read the env helpers (card-externals/schema.ts, clients/repo.ts, clients/schema.ts, webhooks/service.ts) keep working unchanged.
What kept (and why)
Revenue's actual surface (orders, credits, refunds, invoices, card-externals, provider-accounts, promotion-redemptions, Square webhook handlers): kept as authoritative.
Legacy substrate per src/modules/README-legacy-substrate.md: clients, integrations, external-actions. These are Revenue's intermediate compatibility layer until the cross-domain coupling moves behind APIs. The README is the canonical policy.
De-facto legacy substrate not in the README but kept on the strength of import-graph evidence: lessons, lesson-debit, reservations. Revenue's credit-ledger-entries/service.ts imports lessonsRepo from @/modules/lessons for the cross-domain read needed by POST /api/credits/lessons/debit (the Revenue-side debit-from-credit-balance route Revenue's reply on 2026-05-05-revenue-api-carveup-bucketing-ack flagged as cross-domain with Delivery). The lessons module in turn depends on lesson-debit and reservations. None of these are Revenue-canonical; all three retire when the credits-cluster handoff lands per Revenue's per-cluster-handoff plan, alongside Delivery's Lesson and reservation-lock Postgres surfaces standing up.
external-actions-cancel: kept. Revenue's reply named this as a Revenue-side surface that retires under ADR-0011 in lockstep with the broader external-actions queue move; until ADR-0011 lands Revenue still operates the cancel verb directly.
What this memo does not propose
A change to the carve-up parent's bucketing. Revenue's reply on 2026-05-05-revenue-api-carveup-bucketing-ack stands as the canonical Revenue-side bucketing position; this memo just reports the post-clone substrate cleanup that brings Revenue's repo into alignment with the bucketing already declared.
A new ADR or contract amendment. The cleanup is a code-and-deployment move; no ADRs or contracts are affected.
A position on whether the legacy substrate's scope (in README-legacy-substrate.md) should expand to formally name lessons, lesson-debit, reservations. Those modules are de-facto kept on the import-graph evidence; whether they get added to the README's explicit scope or stay implicit is a downstream Revenue-side documentation question.
A timeline for the legacy substrate's full retirement. Per Revenue's reply, that retirement rides the per-cluster handoff memos; this memo's cleanup is independent of that timeline.
References
- Carve-up parent:
2026-05-25-growth-api-carveup-inventory - Revenue's bucketing ack on the carve-up:
2026-05-05-revenue-api-carveup-bucketing-ack - Sales' analog absorption-live (the same pattern, Sales side):
2026-05-27-sales-quo-contacts-absorption-live - Platform's analog absorption-live (the same pattern, Platform side):
2026-05-27-platform-app-config-test-absorption-live - Revenue's legacy substrate policy:
revenue/src/modules/README-legacy-substrate.md - Revenue domain scope (the destination authority the cleanup reads against):
coordination/domains/revenue.md