api hardening

This commit is contained in:
2026-03-16 10:46:05 +00:00
parent 598e4a6077
commit 023a8e9e6d
8 changed files with 378 additions and 24 deletions
@@ -683,6 +683,34 @@ Status key: `[x] done`, `[ ] pending`
- `tests/phase19/service-behaviour.test.cjs`
- Re-run phase6phase19 baseline tests and lint after rollback.
### Phase 20 endpoint consistency slice snapshot (2026-03-14)
Status key: `[x] done`, `[ ] pending`
1. `[x]` Apply small consistency-only endpoint hardening in selected handlers
- `pages/api/endpoint/getbasicdnssearch_api.js`
- `pages/api/endpoint/getbasicdnsurlsearch_api.js`
- `pages/api/endpoint/getbasicsearchdetailspaged_api.js`
2. `[x]` Standardize negative-path required input handling
- early 400 for missing/empty `searchString` in `getbasicdnsurlsearch_api`
- early 400 for missing required params in `getbasicsearchdetailspaged_api`
3. `[x]` Remove noisy sensitive-path logging
- removed direct query logging in `getbasicdnssearch_api`
4. `[x]` Add focused tests
- `tests/phase20/service-behaviour.test.cjs` (5/5)
5. `[x]` Execute validation bundle
- phase6 parity + phase6phase20 behavioural suites pass
- lint warnings only (pre-existing)
### Phase 20 rollback notes
- Revert files in this slice:
- `pages/api/endpoint/getbasicdnssearch_api.js`
- `pages/api/endpoint/getbasicdnsurlsearch_api.js`
- `pages/api/endpoint/getbasicsearchdetailspaged_api.js`
- `tests/phase20/service-behaviour.test.cjs`
- Re-run phase6phase20 baseline tests and lint after rollback.
## Safe execution mode for migration chunks (required)
To reduce terminal hangs during bulk migration work, run refactor chunks in **safe stepwise mode** instead of long chained commands.