mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 18:28:29 +01:00
#508 removed the Stripe rail. Four living docs kept describing it, and one of them is named in CLAUDE.md as an SSOT — so the wrong answer was the documented answer. - `development/cloud-local-workflows.md` listed `Stripe billing | STRIPE_*` in the env-gated feature table. Replaced with the rail that exists: `ORANGECAT_PAY_URL_{PERSONAL,PRO,TEAM}`, names checked against lib/oc-pay.ts. - `sustainability-gates.md` Gate 3 argued from a `quantity: 1` hardcode in `src/app/api/stripe/checkout/route.ts`. The gate did not go stale, it HARDENED: that route is gone and the BTC rail is a static per-plan URL with no quantity concept, so there is no seat number left in the purchase path to correct. Per-seat Team is now a build, not a config change. - `oc-rail-monetization-scope.md` claimed the Stripe webhook "already calls" updateUserBilling and that /pricing has an isStripeReady() seam to reuse. The write survives (via /api/orangecat/entitlement, plus scripts/grant-plan.ts); the seam does not — the BTC CTA is the default case now, not one to add. - `development/user-flow-audit.md` asserted `/api/stripe/portal` returns 503. It returns 404. CH01-CH04 and the CH04 runbook tested four deleted endpoints; retired with a pointer to what replaced them. `scripts/grant-plan.ts` said it performs "the SAME write the Stripe webhook does" — updated to name the entitlement route instead. Two findings that were not about Stripe: `docs/self-improvement-plan.md` enumerated three `insertPromptHistory` call sites. There are four — `api/control/tab-inject` was missing — and all three line numbers had drifted (270→397, 452→514, 80→138). Following that list would have shipped the runId linking with one dispatch path still unlinked. Line numbers dropped in favour of "grep the symbol"; same for `src/auth.ts:234` in the OC scope doc, which now points at line 268's unrelated code. `src/config/demo.ts` still denied `/api/checkout` under its "money" heading long after #508 deleted that route — a deny rule for a route on no disk, which made the billing section of the sandbox policy look staffed. demo-sandbox.ts already had the reverse check for DEMO_SAFE_FAMILIES ("a family listed as safe that no longer exists is dead reassurance"); the denied lists had no equivalent, which is why that entry survived. Added the mirror check — it caught `/api/checkout` on its first run — and mutation-proved it with a fake prefix. 262 assertions. Also measured and did NOT gate: doc path references (314) and `pnpm run` commands (77) both came back clean once false positives were removed, and the dominant pattern is prose naming a file precisely to record its REMOVAL, which grep cannot tell from rot. A gate there would fire on the correct docs and stay silent on the wrong ones. CLAUDE.md's own four flagged paths were all correct, and all 22 routes in its Views table exist. verify green (13 steps, exit 0). Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P Co-authored-by: Claude Opus 5 <noreply@anthropic.com>