Repository navigation
[Reconciliation][P2] Reconcile credit-shortfall recovery across research, content and catalog skills #350
Description
Parent workstream: #322
Epic: #318
Priority: P2 · Audit findings: SP-04
Customer story and completed published-example repair — October 20, 2026
Customer: an artist or manager whose research task stops for billing. “Show the correct next step, and let me decide what to do. Do not retry or buy credits automatically.”
Skills #211 merged as b6fa3655f274fdb4096c1fd52e1c47630c3b6d25. Credit shortfalls preserve billingUrl; separate payment-method gates preserve checkoutUrl. Missing/malformed expected links produce controlled account-billing guidance without substituting a different operation's link. Both shipped examples stop without following links, creating sessions, changing accounts or buying credits. Source acceptance records 35 example tests and all five Skills gates passing.
Automatic release 2026.1020.33 published at 08:20:41 UTC from that actual merge. All three downloaded ZIP checksums match the release manifest. Customer/full/workspace contain 40/120/40 skills; customer/workspace exclude internal skills. Every changed shipped research guide and estimator helper is byte-identical to approved source, as are the generated Claude directory's files/version/source metadata.
Seven focused methods execute the actual extracted customer guide/helper with synthetic responses and stubbed shell/HTTP calls. They pass shortfall/card-setup distinction, wrong-link exclusion, missing/malformed links, non-object errors, controlled stopping and successful read behavior. No real payment/provider request is made. This completes the published-example/source-fixture correction; installed-host, directory approval and live-account acceptance remain separate under #361.
Outcome and problem
The API's insufficient_credits response now contains billingUrl, and one shared research reference was updated, but multiple skill bodies and other shared references still require checkoutUrl. Agents following them cannot present the returned recovery destination. A separate payment-method gate legitimately still uses checkoutUrl, so a blind replacement would create another mismatch.
Scope and ownership
- Owning repository: recoupable/skills; update maintained recoupable/recoup-research-plugin copies or its explicit legacy support guidance.
- Correct current research weekly-brief, talent, contact, playlist and web skill bodies; content-asset-pack; canonical content-api and copies; release-plan-rollout; and catalog estimate/review references.
- Map recovery by actual error/operation: insufficient_credits billingUrl versus payment-method checkoutUrl versus explicit credits-session response.
- Add response-fixture checks for recovery instructions so canonical references and skill-level summaries cannot contradict.
Planning is tracked in Mono. Implementation and release PRs belong in the owning repositories under their current branch rules.
Acceptance criteria
- All active insufficient_credits instructions read and present the returned billingUrl; no missing checkoutUrl field is treated as a disconnected account.
- Payment-method and explicit checkout-session guidance keeps its real contract and is distinguished by error/operation.
- Agents report a credit shortfall without automatic retry, account switching, session creation or purchase.
- Representative fixtures cover insufficient credits, payment-method-required and malformed/missing recovery links, with no Stripe or provider calls.
- Canonical and vendored references match, affected standalone support status is explicit, and all five Skills gates pass.
Evidence and existing work
Baseline: October 10, 2026 audit of July 10–October 10 merges. Recheck current source and existing tracker comments before implementation. Source findings do not establish authenticated production behavior.
- Source evidence 1
- Source evidence 2
- Source evidence 3
- Source evidence 4
- Source evidence 5
- Source evidence 6
Related existing work:
- fix(credits): stop minting a Checkout Session on every credit-gated 402 api#836 — merged billingUrl credit-shortfall contract.
- fix(research): 402 envelope carries billingUrl, not checkoutUrl skills#115 — partial research-reference correction already merged.
Continue or reconcile the linked implementation work; this ticket owns the stated audit correction and does not replace the original feature tracker.
Execution status — October 11, 2026
Released billingUrl recovery and stop-without-retry/purchase behavior in canonical/vendored research, creative, catalog and release guidance through Skills #183, Content #2, Research #5, Marketing #149 and Docs #372. Historical measurement card setup correctly retains checkoutUrl; subscription Checkout returns url.
Five Skills gates and fourteen mocked workflow regressions passed: shortfalls surface recovery links, rate limits defer, transient retries are bounded and optional enrichment preserves gaps. Skills package 2026.1011.7 and Content 0.3.1 / Research 0.2.1 are published/pinned; downloaded selected guides match source. Canonical credits guidance returns 200.
Hosting work remains deferred by Sidney. October 12 readback now confirms the retained host publishes Research availability, its Markdown, research search Markdown and both LLM catalogs at HTTP 200, without research-provider branding. The human GET https://docs.recoupable.dev/mcp still returns 405; /mcp.md and the canonical Marketing human guide return 200. The October 11 restored-page 404s are historical rather than the current state of these checked pages. Final route/host compatibility and complete publication verification remain open.
Historical follow-up: fresh installed-host and actual-account behavior remain unverified under #361. Published-file fixture acceptance is completed by the October 20 release receipt above. No payment operation was used.
Activity
sswiftdrtv commentedon Oct 20, 2026
The missing #350 recovery fixture slice is implemented in Skills #211 at
d3c539e227f5241764d190cbb5488dda5ff15248, based on current main3e4a1dde2fec9c65131824b0ab52684560d9ec00.The shipped research helper now preserves the existing payment-method
checkoutUrlrather than losing it behind a credits-only message. Both research and catalog examples selectbillingUrlonly forinsufficient_credits, do not substitute the other flow's link, and stop with an account-billing instruction if the expected link is absent or basically malformed. All five registered copies are synchronized.Seven new test methods execute the real examples with synthetic responses, covering credit shortfall, payment-method setup, missing/malformed links and successful reads. 35 combined example tests and all five Skills gates pass locally. Existing CI now discovers the new suite; its validation job passes on this exact head. Both independent source-review axes pass; review receipt. Cubic is neutral, CodeRabbit is pending, and no unresolved inline threads are present at this checkpoint.
Next owner/prerequisite: coordinator makes the merge decision after final exact-head review/check disposition; Skills release then establishes the actual package version/artifact. Installed-client/live-account recovery remains separate. This does not close the full ticket, and no Stripe/provider request, session, purchase, charge or customer write occurred. The source fix does not depend on the blocked valuation permission proposal or hosted Context writes.
sswiftdrtv commentedon Oct 20, 2026
Corrected Skills #211 head is
ff9f31e13de5e510466846858982ae1ddc32dac3. The later hostless-URL P2 superseded the earlier d3c539e acceptance; it was reproduced with executable tests and repaired with parsed HTTPS hostname/port checks in both examples and all five copies. All 35 focused tests and five repository gates pass again. Both independent corrected-head reviews pass: recoupable/skills#211 (comment)Fresh exact-head validation workflow and CodeRabbit pass; Cubic is neutral. The only inline finding is resolved and no other unresolved threads were present at the final audit. Worktree is clean/pushed. Coordinator owns the exact-head merge decision; automatic package publication/readback and installed/live recovery remain distinct. No network/payment/customer operation was performed by the examples.
sswiftdrtv commentedon Oct 20, 2026
Independent isolated-install regression follow-up is complete: Skills #212 merged as
31a20b5f9990fc47d700eff04f35ee898179616cat 08:36:16 UTC. The actual merge tree is identical to reviewed headb6f3f81a790977b2fc599da052360be82966f688; both branch and merged-main validation jobs pass. The separate automatic release job is still running at this observation; Docs retains publication ownership.All five shipped research guides and the packaged estimator pass 35 positive methods from a foreign working directory. CI also removes the make-video guide and estimator individually and requires failure rather than source-checkout fallback. 13 package tests, 35 source-example tests, all five Skills gates and two independent Standards/Spec reviews pass. Both review bots were rate-limited, not extra review evidence.
The current harness independently passes against Docs' already-downloaded customer archive
2026.1020.33(sourceb6fa3655f274fdb4096c1fd52e1c47630c3b6d25, SHA-25642013b071bd0511294a0ec8dbff67ca4557f3238d68c778fd5577ea3e6de5ba4). Missing-guide and changed-estimator-link probes reject as expected; restored payload bytes pass again. We reused Docs' artifact rather than downloading it again.This strengthens regression coverage for completed #350. It proves isolated extracted-file execution with synthetic responses, not named-client discovery, live authentication, purchase or an actual depleted-balance account journey. Those remaining acceptance boundaries stay in #361. No host configuration change or production/payment/provider operation occurred.