CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

feat: AI fallback hardening + verified go-live gaps update #4085

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/solid-block-specs-copy-vtOdHmainopened Jun 7, 2026
ccantynzcommented Jun 7, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/46


Summary

Follow-on launch-hardening that landed after PR #45 merged. Two commits:

  • AI fallback hardeningtranslate / voice (draft + adjust) / voice-clone now degrade gracefully when ANTHROPIC_API_KEY is absent or the Claude call fails, instead of throwing a 500. Enforces the Bible rule "all AI calls must have fallback behaviour." Matches the existing fallback pattern in ai-writing.ts.
  • Dunning testsapps/api/tests/dunning.test.ts covers the failed-payment recovery state machine (active → past_due → active/downgraded).
  • Preflight / load-test polish — final touches to scripts/preflight.ts and load-tests/.
  • GO_LIVE_GAPS.md update — marks G1–G5/G8–G10 done, adds bundle/perf gaps P1–P5 from the static audit.

Verification (local)

  • bun run lint — 0 errors (31 pre-existing console warnings)
  • bun run typecheck — 37/37 packages
  • bun run test — 61/61 (3× clean, no flakiness)

Audit corrections

  • AI-fallback gaps were real → fixed here.
  • The audit's "Outlook token refresh missing" was a false positiverefreshMicrosoftToken already exists and is correctly wired in sync/engine.ts (refreshes on expiry, persists rotated tokens). No change needed.

Not in scope (tracked in GO_LIVE_GAPS.md)

  • P1–P5 bundle/perf work (Framer Motion on landing, three.js/yjs eager deps, bundle-size CI gate) — next tranche.
  • G6 status-page live uptime wiring.

https://claude.ai/code/session_01CQjWseikSJdamHS8W6Kygz


Generated by Claude Code

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts