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
+42
View File
@@ -458,6 +458,48 @@
- Response-shape contract stability preserved for touched handlers/services.
- Remaining risk is primarily external dependency behavior on valid-hash happy paths in local environments (relay/storage), not hash-bypass behavior.
## Phase 15 hardening status (2026-03-13)
- Working branch created from `origin/SIPS-Development`:
- `TASK22028-phase15-hardening-slice`
- Delivered consistency-only hardening across 4 additional sensitive file handlers:
- `pages/api/file/upload.js`
- `pages/api/file/uploadsinglefile.js`
- `pages/api/file/createappealcompletemessage_api.js`
- `pages/api/file/setupcontainer.js`
- Hardening posture updates:
- standardized explicit early 400 on missing hash where validation was already required
- standardized early hash-mismatch return path style in `setupcontainer`
- preserved response-shape/signature contracts (no intended contract changes)
- Added focused phase-15 tests:
- `tests/phase15/service-behaviour.test.cjs`
- negative-path checks for missing/invalid hash across all selected handlers
- required-input negative-path checks where applicable
- one valid-hash mocked happy-path check (`setupcontainer` response shape)
### Phase 15 validation evidence snapshot
- `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 (10/10)
- `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 (5/5)
- `node tests/phase15/service-behaviour.test.cjs` -> pass (5/5)
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps` warnings)
### Phase 15 manual HTTP snapshot
- Dev server run on `http://localhost:3002`.
- Missing/invalid hash negative-path checks for selected handlers -> **400**.
- Missing required params where applicable -> **400**.
- Valid-hash spot-check:
- `GET /api/file/setupcontainer?ident=c1&hash=<valid>` -> **200**.
## Likely next steps
1. Stabilize and simplify breadcrumb/back-link decision logic with focused regression checks.