3 Commits
Author SHA1 Message Date
Juan Denis 97a96d963b Give common API errors stable codes and service wording
Toasts showed backend prose verbatim, with no code to translate
against and "application" where the UI says "service". Not-found,
missing-field, permission, conflict and agent-offline errors now come
from factories in app/exceptions.py that pair one fixed message with
a dotted code (not_found.<resource>, validation.required,
permission.denied, conflict.exists, agent.offline), so the client can
translate them.

The shared app-loading helpers and the apps, domains, servers,
databases and backups routes raise those errors instead of hand
shaping bodies, which drops the hand-shaped body count from 1132 to
850. Five routes picked an HTTP status by comparing error text; they
now key off a result code or a sentinel so rewording can't change a
status. Five broad excepts that echoed str(exc) now log the crash and
return the request id instead.
2026-10-04 18:59:25 -04:00
Juan DenisandClaude Fable 5 b07b988261 test(one-doors): route_rules fixture, create_app ratchet, authz one-liners (plan 77 G3/G4)
G3: session-scoped route_rules serves url_map checks without booting a
second app (each boot re-exposes the plan-64 state-leak classes);
test_fixture_scope_guard freezes the 13 remaining direct create_app
callers as a shrinking baseline (config_checkpoint_alias migrated as
proof). G4: assert_requires_auth/assert_admin_only promoted into
tests/factories.py; test_raw_infra_authz delegates to the shared shape.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 05:46:25 -04:00
Juan DenisandClaude Opus 4.8 d87e69b44f refactor(unify): §8 Phase B4 — surface DeploymentSnapshot as "Config Checkpoint"
Recorded §8 decision: a deployment config snapshot is shown as a "Config
Checkpoint" in the UI to end the overloaded "snapshot" wording. Distinct from
data-protection backups and from WordPress DB snapshots, which are untouched.

Backend:
- snapshots blueprint serves every route under /apps/:id/config-checkpoints
  in addition to /apps/:id/snapshots (dual @route — both resolve to one view).

Frontend:
- DeployTab section "Deployment Timeline" → "Config Checkpoints" with reworded
  hint; ConfigDiffModal + DeploymentTimeline empty/peer copy use "checkpoint".
- api/snapshots.js gains getConfigCheckpoint(s)/Diff/restore aliases.
- ProtectionStatusCard: "Snapshots run on the configured schedule" → "Backups"
  (that card describes backups, not config checkpoints).

Verified: 2 alias tests + existing config-snapshot suite pass; frontend build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 14:24:13 -04:00