TASK22168 bundle C endpoint login/account consistency extension

This commit is contained in:
2026-03-19 12:27:17 +00:00
parent f9c9687cfe
commit 26b889d182
9 changed files with 525 additions and 112 deletions
+49
View File
@@ -1602,3 +1602,52 @@ Validation:
Follow-ups:
- Next coherent endpoint slice can target login-adjacent handler drift (`getlogin_api`) and/or another compact account endpoint group using the same phase21 contract pattern.
---
### CL-043: TASK22168 Bundle C extension — login/portal/account adjacency sweep (phase21)
date: 2026-03-19
author: Cline
scope: `pages/api/endpoint/{getlogin_api,getportallogin_api,getportalloginproxy_api,getpersonalaccount_api}.js`, `tests/phase21/endpoint-handler-contract.test.cjs`
type: change
rationale: User requested a larger same-branch bundle while preserving low-risk contract-consistency scope in endpoint account/login adjacency handlers.
impact: Structured 400 negative-path envelopes and cleanup consistency across additional login/account handlers with success payload contract stability preserved.
status: completed
Summary:
- Continued on branch: `TASK22168-endpoint-account-contract-consistency`.
- Extended endpoint contract-consistency pattern to additional handlers:
- `getlogin_api.js`
- removed dead imports/noisy logging
- standardized required input errors (`EMAIL_ADDRESS_REQUIRED`, `PASSWORD_REQUIRED`)
- standardized catch path (`LOGIN_FETCH_FAILED`)
- `getportallogin_api.js`
- removed dead imports
- standardized missing hash and invalid hash paths (`HASH_REQUIRED`, `INVALID_HASH`)
- standardized catch path (`PORTAL_LOGIN_FETCH_FAILED`)
- `getportalloginproxy_api.js`
- removed dead imports/legacy conditional noise
- standardized required input error (`EMAIL_ADDRESS_REQUIRED`)
- standardized catch path (`PORTAL_LOGIN_PROXY_FETCH_FAILED`)
- `getpersonalaccount_api.js`
- removed dead imports/noisy logging
- standardized required input error (`CONTACT_ID_REQUIRED`)
- standardized catch path (`PERSONAL_ACCOUNT_FETCH_FAILED`)
- Phase21 endpoint suite expansion:
- `tests/phase21/endpoint-handler-contract.test.cjs`
- expanded from 7 to 18 tests to cover Bundle C handlers and success-parity checks for adjacent account endpoints.
Validation:
- `node tests/phase21/api-contract-slice1.test.cjs` -> pass
- helper: 4/4
- file-handler: 11/11
- email-handler: 12/12
- endpoint-handler: 18/18
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps` warnings)
Follow-ups:
- Next slice can target additional endpoint proxy groups only if needed, but current account/login consistency scope is now a meaningful bundle on TASK22168.