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
@@ -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 + phase6phase17 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 phase6phase17 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.