TASK22057: phase17 closeout hash/input consistency hardening

This commit is contained in:
2026-03-13 18:43:42 +00:00
parent 36d35f9549
commit daa38d6459
7 changed files with 411 additions and 33 deletions
+44
View File
@@ -1112,3 +1112,47 @@ Validation:
Follow-ups:
- Keep delete calls consistently keyed on case reference across portal/view-all/top-three variants.
---
### CL-031: Phase 17 closeout — remaining sensitive file handler consistency hardening
date: 2026-03-13
author: Cline
scope: `pages/api/file/{generatepdf,generateappealpdf,createappealcompletemessageproxy_api}.js`, `tests/phase17/service-behaviour.test.cjs`, `memory-bank/*`
type: change
rationale: Complete the remaining small hardening closeout slice in this stream by standardizing hash/input negative-path behavior and reducing noisy logging in the last priority-sensitive file handlers.
impact: Consistent 400 behavior for missing/invalid hash and missing required inputs in selected handlers; preserved response shapes/signatures.
status: completed
Summary:
- Branch created from `origin/SIPS-Development`: `TASK22057-phase17-hardening-closeout`.
- Hardened:
- `generatepdf.js`
- `generateappealpdf.js`
- `createappealcompletemessageproxy_api.js`
- Added early 400 guards for missing/invalid hash and required params where applicable.
- Removed noisy direct logging in touched handlers.
- Added focused test pack `tests/phase17/service-behaviour.test.cjs`.
Validation:
- `node tests/phase6/service-parity.test.cjs` -> pass
- `node tests/phase6/service-behaviour.test.cjs` -> pass (8/8)
- `node tests/phase7/service-behaviour.test.cjs` -> pass (12/12)
- `node tests/phase8/service-behaviour.test.cjs` -> pass (5/5)
- `node tests/phase9/service-behaviour.test.cjs` -> pass (5/5)
- `node tests/phase10/service-behaviour.test.cjs` -> pass (5/5)
- `node tests/phase11/service-behaviour.test.cjs` -> pass (4/4)
- `node tests/phase12/service-behaviour.test.cjs` -> pass (4/4)
- `node tests/phase13/service-behaviour.test.cjs` -> pass (7/7)
- `node tests/phase14/service-behaviour.test.cjs` -> pass (9/9)
- `node tests/phase15/service-behaviour.test.cjs` -> pass (5/5)
- `node tests/phase16/service-behaviour.test.cjs` -> pass (4/4)
- `node tests/phase17/service-behaviour.test.cjs` -> pass (6/6)
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps` warnings)
Follow-ups:
- If desired, run additional integrated HTTP/manual checks in an environment with full relay/storage dependencies for end-to-end happy-path confirmation beyond mocked behaviour tests.