TASK22057: phase17 closeout hash/input consistency hardening
This commit is contained in:
@@ -549,6 +549,25 @@
|
||||
- Applied small view-all presentation cleanup and watched-case refresh filtering adjustment.
|
||||
- Added missing `myportal` namespace mapping in `i18n.js` for `/newappeal/[appealtypes]`.
|
||||
|
||||
## Phase 17 closeout status (2026-03-13)
|
||||
|
||||
- Working branch created from `origin/SIPS-Development`:
|
||||
- `TASK22057-phase17-hardening-closeout`
|
||||
- Completed remaining closeout hardening slice for sensitive file handlers:
|
||||
- `pages/api/file/generatepdf.js`
|
||||
- `pages/api/file/generateappealpdf.js`
|
||||
- `pages/api/file/createappealcompletemessageproxy_api.js`
|
||||
- Applied consistency-only updates:
|
||||
- standardized missing/invalid hash 400 negative paths in selected PDF handlers
|
||||
- standardized required-input 400 guards where route contract requires it
|
||||
- removed noisy direct logs from touched sensitive handlers
|
||||
- preserved existing response shapes/signatures
|
||||
- Added focused behavioural coverage:
|
||||
- `tests/phase17/service-behaviour.test.cjs` (6/6 passing)
|
||||
- includes missing/invalid hash negative-path checks and valid-input proxy happy-path contract check
|
||||
- Broader consistency scan note:
|
||||
- no additional broad hash/400 consistency gaps were identified in `pages/api/endpoint/**` in this pass.
|
||||
|
||||
## Likely next steps
|
||||
|
||||
1. Stabilize and simplify breadcrumb/back-link decision logic with focused regression checks.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -577,6 +577,41 @@ Status key: `[x] done`, `[ ] pending`
|
||||
|
||||
- Revert commit `d32d7d0` to restore prior myportal/i18n state.
|
||||
|
||||
### Phase 17 closeout snapshot (2026-03-13)
|
||||
|
||||
Status key: `[x] done`, `[ ] pending`
|
||||
|
||||
1. `[x]` Create new branch from `origin/SIPS-Development` with required work item prefix
|
||||
- branch: `TASK22057-phase17-hardening-closeout`
|
||||
2. `[x]` Complete remaining consistency-only hardening targets in `pages/api/file/**`
|
||||
- `pages/api/file/generatepdf.js`
|
||||
- `pages/api/file/generateappealpdf.js`
|
||||
- `pages/api/file/createappealcompletemessageproxy_api.js`
|
||||
3. `[x]` Standardize negative-path behavior and logging discipline
|
||||
- explicit early 400 guards for missing/invalid hash where applicable
|
||||
- explicit early 400 guards for missing required params where applicable
|
||||
- noisy direct logs removed from touched handlers
|
||||
- response-shape/signature contracts preserved
|
||||
4. `[x]` Add focused Phase 17 tests
|
||||
- added `tests/phase17/service-behaviour.test.cjs`
|
||||
- includes missing/invalid hash negative-path checks
|
||||
- includes missing required-param checks
|
||||
- includes valid-input happy-path check for proxy contract
|
||||
5. `[x]` Execute required validation bundle
|
||||
- phase6 parity + phase6–phase17 behaviour tests -> pass
|
||||
- lint -> warnings only (pre-existing)
|
||||
6. `[x]` Consistency scan for remaining `pages/api/**`
|
||||
- no additional broad hash/400 consistency gaps identified in `pages/api/endpoint/**` during this pass
|
||||
|
||||
### Phase 17 rollback notes
|
||||
|
||||
- Revert these files to rollback the full closeout slice:
|
||||
- `pages/api/file/generatepdf.js`
|
||||
- `pages/api/file/generateappealpdf.js`
|
||||
- `pages/api/file/createappealcompletemessageproxy_api.js`
|
||||
- `tests/phase17/service-behaviour.test.cjs`
|
||||
- Re-run phase6–phase17 baseline tests and lint after rollback to confirm parity.
|
||||
|
||||
## Safe execution mode for migration chunks (required)
|
||||
|
||||
To reduce terminal hangs during bulk migration work, run refactor chunks in **safe stepwise mode** instead of long chained commands.
|
||||
|
||||
Reference in New Issue
Block a user