TASK22168 endpoint account contract consistency slice

This commit is contained in:
2026-03-19 12:11:52 +00:00
parent 54820324f5
commit f9c9687cfe
9 changed files with 529 additions and 86 deletions
+59
View File
@@ -3,11 +3,70 @@
## Current development focus (from recent commits)
- API contract consistency rollout (TASK22102), starting with helper-based response normalization in selected email/admin handlers.
- TASK22109 email API contract parity and phase21 contract coverage expansion.
- Search/case navigation correctness, especially breadcrumb and back-link behavior.
- My Portal "view all" and DNS application path handling.
- Welsh/English email behavior for specific notification templates.
- PDF output formatting and hyperlink behavior.
## TASK22109 completion status (2026-03-18)
- Branch: `TASK22109-email-api-contracts`
- Commits:
- `6610e5c` — email API contract cleanup + initial phase21 email coverage
- `d17f3a1` — expanded email contract coverage and logging hygiene
- `e9cf1cf` — mini-slice tidy + notify negative-path tests
- Scope completed:
- email handler cleanup/hardening in:
- `pages/api/email/getevents.js`
- `pages/api/email/getdocuments.js`
- `pages/api/email/getall.js`
- `pages/api/email/getmailinglist.js`
- `pages/api/email/getcaseref.js`
- `pages/api/email/notify.js`
- expanded phase21 contract tests:
- `tests/phase21/email-handler-contract.test.cjs`
- `tests/phase21/api-contract-slice1.test.cjs`
- `tests/phase21/_shared.cjs`
- Validation snapshot:
- `node tests/phase21/api-contract-slice1.test.cjs` -> pass
- helper 4/4
- file-handler 11/11
- email-handler 12/12
- `npm run lint` -> warnings only (pre-existing)
## TASK22168 endpoint slice status (2026-03-19)
- Branch: `TASK22168-endpoint-account-contract-consistency`
- Scope completed (next coherent low-risk `pages/api/endpoint/**` slice):
- `pages/api/endpoint/getaccounts_api.js`
- `pages/api/endpoint/getemailaccountcheck_api.js`
- `pages/api/endpoint/getpreferredlanguage_api.js`
- `tests/phase21/endpoint-handler-contract.test.cjs`
- `tests/phase21/api-contract-slice1.test.cjs` (runner extended)
- Pattern applied (aligned with TASK22109):
1. removed dead/noisy code in selected handlers (unused imports + noisy/commented debug remnants),
2. standardized structured negative-path envelopes for missing required input and catch/failure paths,
3. preserved success response behavior (`data` pass-through),
4. added focused phase21 endpoint contract tests:
- missing required input
- catch/failure path
- one success contract parity assertion.
- Validation snapshot:
- `node tests/phase21/api-contract-slice1.test.cjs` -> pass
- helper 4/4
- file-handler 11/11
- email-handler 12/12
- endpoint-handler 7/7
- `npm run lint` -> warnings only (pre-existing react-hooks warnings)
## Suggested next work package
- Continue API contract consistency in `pages/api/endpoint/**` with the same pattern used in TASK22109:
1. remove noisy logging/commented dead traces in selected endpoints,
2. add/standardize structured negative-path responses where contract drift exists,
3. add focused phase21 endpoint contract tests for missing required input + catch-path failures.
## Recently changed areas (high signal)
- `components/breadcrumbs.js`