TASK22269: delegate fileClient signed get/post to signedRequestClient

This commit is contained in:
2026-03-25 13:47:46 +00:00
parent 7470975d0e
commit 85cc7d165e
3 changed files with 49 additions and 41 deletions
+31
View File
@@ -2801,3 +2801,34 @@ Validation:
Follow-ups:
- Next bounded signed GET candidate in portal service is `sendRepCompleteMessage` (single signed URL + GET request path).
---
### CL-078: TASK22269 Slice B1.3 — fileClient signed helper delegation bundle
date: 2026-03-25
author: Cline
scope: `actions/clients/fileClient.js`, `tests/phase22/file-client-behaviour.test.cjs`
type: change
rationale: Continue grouped signed-request consolidation by reducing duplicate signing logic in `fileClient` and delegating signed GET/POST operations to shared `signedRequestClient` helpers.
impact: Centralizes signed method execution behavior in one helper layer and lowers drift risk across file-service call paths.
status: completed
Summary:
- Updated `actions/clients/fileClient.js`:
- replaced direct `buildHashedQueryUrl + requestJson` logic in:
- `getSignedFileJson` -> now delegates to `getSignedJson`
- `postSignedFileJson` -> now delegates to `postSignedJson`
- retained `downloadFileBlob` and `getFileJson` behavior unchanged.
- Updated `tests/phase22/file-client-behaviour.test.cjs` to assert delegation contracts for `getSignedJson` and `postSignedJson` rather than direct signing internals.
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:
- 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.