fix(audit): require integer drift minimum sample thresholds

Enforce non-negative integer minCandidateSampledEvents/minBaselineSampledEvents in drift gate evaluation and CLI parsing; add regression coverage. Architecture/protocol diagrams reviewed and no updates were needed for this validation-only change.
This commit is contained in:
William Valentin
2026-02-27 13:16:00 -08:00
parent a4794ddea8
commit bf79f734f1
4 changed files with 89 additions and 6 deletions
+13
View File
@@ -507,6 +507,19 @@
],
"test_status": "pnpm test:run src/audit/phase0BaselineSummary.test.ts + pnpm typecheck passing"
},
"phase0-live-baseline-drift-min-threshold-integer-validation": {
"status": "completed",
"date": "2026-02-27",
"updated": "2026-02-27",
"summary": "Hardened phase-0 backend drift gating by requiring `minCandidateSampledEvents` and `minBaselineSampledEvents` to be non-negative integers in both gate evaluation and CLI parsing, preventing fractional count thresholds.",
"files_modified": [
"src/audit/phase0BaselineDrift.ts",
"src/audit/phase0BaselineDrift.test.ts",
"scripts/check-phase0-baseline-backend-drift.ts",
"docs/plans/state.json"
],
"test_status": "pnpm test:run src/audit/phase0BaselineDrift.test.ts + pnpm typecheck passing"
},
"phase0-instrumentation-ticket-checklist": {
"status": "completed",
"date": "2026-02-25",