TASK22269: group migrate remaining account/portal signed GET flows
This commit is contained in:
@@ -2832,3 +2832,42 @@ Validation:
|
||||
Follow-ups:
|
||||
|
||||
- Candidate map now indicates remaining explicit signed request composition is primarily in account/portal signed GET edge paths (`getPortalLogin`, `sendRepCompleteMessage`, and signed suffix append flow in `sendCaseCompleteMessage`) for future bounded slices.
|
||||
|
||||
---
|
||||
|
||||
### CL-079: TASK22269 Slice B1.4 — signed GET consolidation bundle (portal + account)
|
||||
|
||||
date: 2026-03-25
|
||||
author: Cline
|
||||
scope: `actions/clients/signedRequestClient.js`, `actions/services/{portalDirectService,accountDirectService}.js`, `tests/{serviceHarness,phase22/portal-service-behaviour,phase7/service-behaviour}.cjs`
|
||||
type: change
|
||||
rationale: Continue grouped signed-request migration by consolidating remaining direct signed-GET composition paths onto shared signed helper primitives while preserving route behavior contracts.
|
||||
impact: Reduces residual signing duplication and standardizes signed URL creation across portal/account service read/message flows.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- Enhanced `signedRequestClient`:
|
||||
- added `buildSignedUrl(queryUrl, { baseUrl? })` helper for signed URL generation reuse
|
||||
- updated internal signed request execution to use `buildSignedUrl`
|
||||
- Migrated account signed GET candidate:
|
||||
- `accountDirectService.getPortalLogin` now uses `getSignedJson(queryUrl, { baseUrl: BASE_URL })`
|
||||
- preserved existing error semantics (`consoleLogger` + `JSON.stringify(error)`)
|
||||
- Migrated portal signed GET candidates:
|
||||
- `portalDirectService.sendRepCompleteMessage` now uses `buildSignedUrl(hashQueryPath)`
|
||||
- `portalDirectService.sendCaseCompleteMessage` now uses `buildSignedUrl(hashQueryPath)` + existing signed suffix append behavior
|
||||
- preserved existing request method/URL shape and catch-path behavior
|
||||
- Updated test harness and suites:
|
||||
- `tests/serviceHarness.cjs` now provides defaults for `buildSignedUrl`, `getSignedJson`, `postSignedJson`
|
||||
- `tests/phase22/portal-service-behaviour.test.cjs` includes assertion for `sendRepCompleteMessage` signed-helper delegation
|
||||
- `tests/phase7/service-behaviour.test.cjs` account portal-login expectations aligned to request-config path used by shared signed helper
|
||||
|
||||
Validation:
|
||||
|
||||
- `npm run lint` -> pass with warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors)
|
||||
- `node tests/phase22/index.test.cjs` -> pass
|
||||
- `node tests/phase7/service-behaviour.test.cjs` -> pass (13/13)
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- Remaining special-case signed pattern is now primarily the signed-suffix append composition in `sendCaseCompleteMessage` (already using shared `buildSignedUrl`), with broader module migrations to be planned in future bounded slices.
|
||||
|
||||
Reference in New Issue
Block a user