Date: 2026-08-26
Branch: mo-388-aug-24-testing-scenarios
Scope: Complete Phase 1 "Quick Wins" of the VerifyWise test-automation strategy.
Resumed Phase 1 with the API contract smoke gate failing on swagger/response drift. Fixed the swagger schemas, hardened the gate to strict-by-default, built an enum/label drift sentinel, and updated the strategy doc. Every modified file was committed and pushed individually.
| Phase 1 Item | Status |
|---|---|
| Stabilize critical-journey Playwright specs | ✅ Already green (58/58) |
| API contract smoke gate for top 10 endpoints | ✅ Fixed + strict |
| Enum/label drift sentinel | ✅ Built + warning mode |
| Session replay on staging | ⬜ Not started |
Servers/scripts/apiContractSmoke.ts— switched to strict-by-default;CONTRACT_STRICT=0downgrades schema drift to a warning.Servers/swagger.yaml— fixed response drift for the top-10 endpoints:/users: camelCasecreatedAt/updatedAt, nullablelast_login/sso_provider./projects: nullableai_risk_classification/type_of_high_risk_role, addeduse_case_*fields, removed non-emitted fields./projectRisks: allowednullon all nullable enum/string fields and addednullto inline enums; correctedcurrent_risk_levelcasing.- Shared enums:
AiRiskClassificationnow includesGPAI/General Risk;HighRiskRolereduced toDeployer/Provider.
Servers/scripts/patchSwaggerForDrift.ts— reproducible helper used to apply the ProjectRisk fixes.
Servers/scripts/generateEnumManifest.ts— exports backend enums/const arrays toServers/enum-manifest.json.Servers/scripts/checkEnumLabelDrift.ts— compares the manifest to frontend domain enums inClients/src/domain/enumsand to swagger enum schemas. Default warning mode;ENUM_DRIFT_STRICT=1fails on drift.Servers/package.json— addedgenerate:enum-manifestandcheck:enum-driftscripts.Clients/src/domain/enums/modelInventory.enum.ts— added missingRejectedvalue.Clients/src/domain/enums/mitigationStatus.enum.ts— alignedRequires reviewcasing with the backend.
docs/feature-inventory/automation-strategy.md— marked Phase 1 items 1, 2, and 3 complete with run commands and strict-mode notes.
cd Servers
npm run smoke:api-contract
# → API contract smoke gate passed for all top-10 endpoints.
npm run check:enum-drift
# → 1 drift detected (CurrentRiskLevel casing) but exits 0 in warning mode.npm run generate:swaggerpreserves the manually correctedcomponents.schemas.- Backend test DB is running; the strict contract gate passes end-to-end.
CurrentRiskLevel uses title-case "Very Low risk" in the frontend while the backend risk calculator uses "Very low risk". The sentinel reports this; flipping ENUM_DRIFT_STRICT=1 will make it a blocking failure once the UI constants are reconciled.
fix(Servers): align swagger schemas with actual API responsesfeat(Servers): make API contract smoke gate strict by defaultchore(Servers): add swagger drift patch helperfeat(Servers): generate enum manifest from backend source of truthfeat(Servers): enum/label drift sentinelchore(Servers): seed enum manifest JSONchore(Servers): add enum drift npm scriptsfix(Clients): add Rejected to ModelInventoryStatus enumfix(Clients): align MitigationStatus casing with backenddocs(automation): mark API contract gate and enum drift sentinel complete
Pick one of:
- Finish Phase 1 — add the staging session-replay configuration (OpenReplay/PostHog snippet + docs).
- Start Phase 2 — split Playwright into smoke/full suites and add a
playwright-smokeproject. - Extend sentinel coverage — add more enums/labels (incidents, datasets, vendors, framework statuses) and fix remaining drifts so
ENUM_DRIFT_STRICT=1passes.