test(webui): keep per-range admin fixtures

This commit is contained in:
2026-11-25 11:52:35 +00:00
parent 4d77623f5d
commit 0bf4e4015c
244 changed files with 29217 additions and 761 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
# Mock admin API fixtures
`fixtures/*.json` are anonymised GET responses captured from a live gateway admin API (`/admin/api/*`) at 2026-11-25T01:01:07Z, trimmed to one fixture per distinct path and query shape (at most 3 scope variants), plus every `400 range too large` response and the empty-rows examples. User names are replaced by `user-NN` and service identities by `service-NN`; hosts, addresses and keys are removed. `manifest.json` maps each fixture file to its `path`, `query` and `status`. `src/lib/mock-leak-scan.spec.ts` fails if a fixture holds a term from `leak-terms.ts`; set `LEAK_SCAN_EXTRA_TERMS` (comma-separated) to add the original names locally. To re-capture, run the GET-only capture and anonymise scripts against a running gateway with an admin key (never print the key), then re-apply the trimming rule and re-run the leak scan.
`fixtures/*.json` are anonymised GET responses captured from a live gateway admin API (`/admin/api/*`) at 2026-11-25T01:01:07Z, trimmed to one fixture per distinct path and query shape, where window and span are part of the shape (at most 2 scope variants, 1 for multi-scope series), plus every `400 range too large` response and the empty-rows examples. User names are replaced by `user-NN` and service identities by `service-NN`; hosts, addresses and keys are removed. `manifest.json` maps each fixture file to its `path`, `query` and `status`. `src/lib/mock-leak-scan.spec.ts` fails if a fixture holds a term from `leak-terms.ts`; set `LEAK_SCAN_EXTRA_TERMS` (comma-separated) to add the original names locally. To re-capture, run the GET-only capture and anonymise scripts against a running gateway with an admin key (never print the key), then run `node webui/mock/tools/trim-fixtures.mjs <capture-dir> webui/mock` (set `MAX_VARIANTS` to change the variant cap) and re-run the leak scan.