Repository navigation
Description
Parent epic: #2093
Priority
P0 — First shared Sites and external Widgets release.
User journey
A customer-owned site on independent hosting integrates Recoup → fan connects and uses the player → owner sees scoped usage/cost → the same journey works inside Recoup Sites.
Acceptance criteria
- Use an independently hosted app with its own registered origin, rather than another route in Recoup. No Site creation or Recoup hosting may be required for the external integration.
- Exercise connection, player, disconnect, no-music recovery, approved provider capabilities, and mobile behavior through the released embed/SDK.
- Show API/MCP management parity, tenant isolation, idempotent billing, spending-limit enforcement, and an auditable receipt for any paid operation.
- Verify Recoup Sites uses the identical primitive implementation without private shortcuts; document version compatibility and rollback.
- Publish reproducible sample code and a test receipt identifying which builder/host, browsers, provider mode, and deployed versions actually passed. Do not claim universal builder support.
Blocking dependencies
These are completion prerequisites, mirrored in GitHub’s blocked-by links. Design and contract work may start earlier. Other coordination references are not blockers.
Validation
Gate the campaign-expansion milestone on this end-to-end receipt. Distinguish local/demo success from independently verified deployed behavior.
Delivery conventions
API owns business logic and billing; HTTP and MCP share it. Chat/embeds/SDKs are clients. Database changes use the database repository PR workflow. Update marketing-owned docs and generated indexes. Use Vercel Workflows for new durable background work. No automatic publication or unbounded customer spending.
Shared callback acceptance test
- Add a second independently hosted customer domain through authorized Recoup configuration only. Complete Spotify connection on both without adding customer-domain callbacks in Spotify.
- Verify popup completion and full-page return on a phone, including blocked popups, unavailable opener messaging, and restricted third-party cookies.
- Confirm each browser returns to its registered application, no customer receives another application's session, and replayed or substituted return requests fail.
- Record any builder/embed limitations and the supported hosted fallback; do not claim support for untested hosts. Use [Widgets] Extract Spotify Sign-in and Webplayer backed by shared Fans services #2107's shared callback implementation in both external applications and Recoup Sites.
Approved category and ownership
Acceptance requires the identical Fans API and Widgets in both environments, not merely similar-looking components. Verify standalone sign-in/player installation without Site or campaign creation. Preserve the shared callback and two-domain tests.
Parent epic #2093 defines Sites, Fans, and Widgets. Use those names in public documentation and MCP descriptions. Preserve existing functional requirements, dependencies, and authorization/billing boundaries.
Pro usage policy acceptance
In both Sites and the independent app, verify included-allowance exhaustion, a successful automatic usage-block purchase, failed payment, spending-ceiling enforcement, duplicate purchase notifications, and recovery. Also test direct-file delivery and shared-customer usage across applications. Record the bounded cost exposure from delayed measurements; scaled release requires the viral-site and many-assets cost tests in #2105.
Council-approved billing release scenarios
- An artist passes 100,000 included monthly Sites sessions; one authorized prepaid purchase occurs, capacity is granted only after payment, and remaining capacity/spend are visible. Block price/size are launch settings, not fixed at 100,000.
- A concurrent traffic burst and duplicate/late payment notifications produce exactly one intended top-up without exceeding the bounded exposure allowance. Suspicious traffic cannot continuously trigger purchases.
- Failed payment or a reached ceiling leaves a cached artwork/listening-link page available, pauses new expensive sessions and gives existing games only the bounded Recoup-service finish window. Already-loaded local gameplay may continue; new Recoup service requests remain limited. Recovery restores the correct state.
- An external host remains usable; its Recoup-backed returning-user sign-in, recovery and disconnect survive campaign exhaustion under separate abuse limits. Test defined new-registration behavior too.
- Refreshes, authentication redirects and repeated player mounts do not double-charge a recognized session. Test unrelated domains with blocked cookies; state recognition limits honestly. Passive Widget display is not billed as meaningful use.
- Included capacity is used before carried-forward purchased capacity across monthly reset; no unnecessary purchase happens while funded capacity remains. Validate the documented cancellation/reactivation policy.
- Usage aggregates across an organization's Sites, and unrelated clients stay separate. Public widget credentials cannot change spending ceilings or purchase authority.
- Complete-session cost samples include sign-in, Spotify playback/game activity, hosted audio/replay and external Widgets. Exercise direct media links and runaway event sources against their separate limits. Do not claim full-session costs from HTML byte size alone.
Additional first-release acceptance journeys — P0
- On an independently hosted app, Recoup sign-in creates/establishes a host account through verified login proof, not a connection-status event. Separately test an existing Google/email host account linking Spotify while retaining its user ID, purchases and progress.
- Reject forged host IDs, wrong-application/environment proof, expired/replayed exchanges and conflicting account links. Verify host logout and Spotify disconnect are distinct and do not erase fan progress or points.
- Test deliberately hostile generated code against the trusted runtime: it cannot read fan/customer credentials, impersonate trusted widget actions, authorize purchases/awards, or escape the documented frame, navigation, network and message permissions. Test malformed/replayed messages and excessive event requests. Define concrete allowed permissions before this gate; current isolation is not assumed sufficient.
- Verify both an existing migrated Site and a new Site use the shared implementation. Exercise migration rerun, rollback, old URLs, consent/export scope, reconnect behavior and legacy-media enforcement from [Widgets] Ship hosted embeds and SDK for Spotify Sign-in and Webplayer #2108.
- At exhaustion, verify future Recoup service requests are bounded even if already-loaded game code continues locally. Essential identity access remains governed by its separate controls.
- Show distinct AI-credit and infrastructure-capacity records; no infrastructure operation also consumes AI credits under the approved policy. Complete all [Sites] Meter Sites operations with credit reservations and spending limits #2105 milestones before claiming paid-release readiness.
Game-quality testing remains P1 in #2094. Runtime isolation is required here for P0 and does not wait on that ticket. Paid overages remain disabled until approved lifecycle rules, quantities/rates and complete-session economics are available; a capped, explicitly non-billing pilot is not paid-release evidence.
Design integration checks within the P0 release journey
- In Recoup Sites and the independently hosted app, apply the same supported theme contract and verify sign-in/player states look coherent with their host while retaining provider attribution and clear identity.
- Capture phone and desktop evidence for disconnected, connecting, connected, playback-error and no-music paths. Long titles, safe areas and player placement must not clip or cover essential host/game controls; verify keyboard/touch usability and reduced-motion behavior.
- Keep evidence tied to tested versions and record the device/viewport. This validates shared Widget integration; it does not claim every generated design passes creative review. Full automated visual critique, reusable generation foundations and repairs remain P1 in [Sites] Automatically test generated Sites experiences and repair failures #2094 with no new P0 blocking dependency.
Activity
[-][Sites] Prove the same Recoup primitives work in Sites and an external app[/-][+][Widgets] Verify the same Fans API and Widgets in Sites and an external app[/+]