TASK22028: phase 15 hash guard consistency hardening slice

This commit is contained in:
2026-03-13 16:04:31 +00:00
parent 0ca6cd94cc
commit 1a95cf1098
9 changed files with 458 additions and 11 deletions
@@ -467,6 +467,44 @@ Status key: `[x] done`, `[ ] pending`
- Revert `b8fa514` to remove getrepsblob contract-alignment + Quill import fix.
- Re-run phase6phase14 tests and lint after rollback.
### Phase 15 completion snapshot (2026-03-13)
Status key: `[x] done`, `[ ] pending`
1. `[x]` Create new branch from `origin/SIPS-Development` with required work item prefix
- branch: `TASK22028-phase15-hardening-slice`
2. `[x]` Apply minimal consistency-only hardening in 4 additional sensitive handlers
- `pages/api/file/upload.js`
- `pages/api/file/uploadsinglefile.js`
- `pages/api/file/createappealcompletemessage_api.js`
- `pages/api/file/setupcontainer.js`
3. `[x]` Standardize negative-path behavior
- explicit early 400 for missing/invalid hash in selected handlers
- explicit missing required-input checks where route contract requires them
- preserved response-shape contracts and function signatures
4. `[x]` Add focused Phase 15 tests
- added `tests/phase15/service-behaviour.test.cjs`
- includes negative-path tests for missing/invalid hash + required-input checks
- includes one valid-hash mocked happy-path response-shape check
5. `[x]` Execute required validation bundle
- phase6 parity + phase6phase14 behaviour tests -> pass
- phase15 behaviour tests -> pass
- lint -> warnings only (pre-existing)
6. `[x]` Execute targeted manual checks
- missing/invalid hash across selected handlers -> 400
- missing required params where applicable -> 400
- valid-hash `setupcontainer` spot-check -> 200
### Phase 15 rollback notes
- Revert these files to rollback the full hardening slice:
- `pages/api/file/upload.js`
- `pages/api/file/uploadsinglefile.js`
- `pages/api/file/createappealcompletemessage_api.js`
- `pages/api/file/setupcontainer.js`
- `tests/phase15/service-behaviour.test.cjs`
- Re-run phase6phase15 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.