Files
ServerKit/backend
Juan DenisandClaude Fable 5 6dfbc0df38 test(contract): pin frontend API paths to real backend routes
Nothing verified that the ~1200 URL literals in
frontend/src/services/api/*.js resolve to rules in the backend url map,
so a backend route rename surfaced as a dead button found by a user.
New test statically extracts every this.request() literal (mirror of
test_socket_contract.py's cross-language pattern) and asserts each
matches an /api/v1 rule from the session app's route_rules; paths under
a builtin extension's plugin.json url_prefix are excused only while
that manifest still declares the prefix, and a second test keeps the
allowlist from rotting.

First run caught 78 unresolved paths. Extension-owned families
(email/ftp/cloud/status/tunnels) were excused; the rest were dead
frontend code calling routes that no longer exist, removed here:
- 11 workflow wrappers in apps.js (the workflow engine left the
  backend in v1.7.33; zero callers remained)
- notification catalog/org-defaults wrappers (routes never existed;
  zero callers)
- 6 WordPress standalone lifecycle wrappers (no routes, no callers;
  the live status probe stays, allowlisted as extension-provided)

Frontend suite still green after the deletions (141/141, lint clean).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-27 04:33:57 -04:00
..