Harden Recoup MCP tools for OpenAI review
Merged
SI
5d ago+656+656+012345678901234567890123456789-137-137-012345678901234567890123456789
Summary
- Social refresh now previews the maximum credit charge. The execution call requires an unexpired account-bound Redis quote. Redis claims it once and serializes MCP refreshes for the account through the available-credit check and dispatch. Pricing and charging for successfully started profiles still use the existing scrape handler.
- Scrape status and results are scoped to the connected account's recorded artist refresh batches. MCP returns public platform links and aggregate counts in place of raw provider data and omits the Apify dataset ID.
- Saved post lookups describe their existing artist access check and use of stored data. Catalog matching checks catalog access at the tool handler, sends the stated fields to the AI provider, and processes up to 1,000 tracks per call. Larger searches can pass the returned
nextPageasstart_page. Catalog matching does not debit Recoup credits. - Add display titles and update the tool descriptions and OAuth annotations to reflect these behaviors.
Evidence
- Before the changes, the added quote-only, scrape ownership and catalog continuation cases failed.
- After the changes, 333 OAuth tests and 118 focused tool, route, billing and extension tests passed on Node 22 before the review follow-up. Six OAuth tests skipped. Pinned MCP skills build, extension build, OAuth typecheck, lint and diff checks passed.
- Full API suite before the review follow-up passed 10,537 tests, with 79 skipped. The review follow-up passed 53 focused tests and the production typecheck.
- Before the publisher rescan, smoke-test the deployed build with the review account. Preview and approve one refresh, verify that replay cannot dispatch it again, retrieve the run and saved posts, and test continued catalog matching. Use a different account to verify that it cannot read the run.
Merge Danger
Door Two-way. API change with no migration. The paid quote flow uses the existing REDIS_URL configuration. Verify Redis on the target deployment before invoking a paid refresh.
Blast radius MCP social refresh, scrape results and catalog matching. Callers need to handle the new approval preview, reduced scrape result fields and catalog pagination. Historical scrape runs without ownership records cannot be read through MCP. REST social scrape pricing and execution are covered by existing regression tests.
The OpenAI draft has not been submitted. Rescan after the API changes are deployed and the reviewer account smoke tests pass.