test: prohibit legacy safe and audit aliases

This commit is contained in:
2026-07-27 14:16:39 +08:00
parent 7a35bfe58c
commit 068b4e0ed9
4 changed files with 42 additions and 1 deletions

View File

@@ -41,3 +41,12 @@ Result: **failed as expected** (exit code 1; 6 passing, 1 failing).
## Handoff
The red baseline is intentional. The next task should rename production resource contracts, backend routes, and frontend definitions without preserving the historical public names.
## Review Follow-up
The RED tests now also reject legacy `saf_*` and `aud_*` resource contracts, routes, and frontend definitions. This prevents a dual-registration implementation from satisfying only the new-name assertions. Frontend static coverage now checks all seven renamed resources, and the filtered route suite requires both `GET` and `POST` for the append-only safe-event disposal history endpoint.
Focused verification was rerun after these additions:
- Backend: the filtered suite remains RED (exit code 1), reporting both absent `safe_*`/`audit_*` routes and currently registered legacy `saf_*`/`aud_*` routes.
- Frontend: the focused suite remains RED (exit code 1; 6 passing, 1 failing), first reporting the missing `define('safe_rule', '/safety/safe_rule'...)` declaration. Once the new declarations exist, the anti-alias assertions will also reject any retained legacy definitions.