Capstone 01 — Regression CI Pipeline

Phase: 11 — Capstone | Difficulty: ⭐⭐⭐⭐⭐ | Time: 5–6 hours

Build a production-grade CI/CD accuracy regression gate that blocks deployments on statistically significant regressions.

What you build

  • BaselineManager — stores and retrieves per-task model baselines
  • mcnemar_test — χ² with continuity correction for paired accuracy comparison
  • evaluate_regression — per-task delta + McNemar p-value
  • CIReport — JSON report with pass/fail per task and overall gate decision
  • build_ci_report / serialize_report — pipeline entry points; sys.exit(0/1) for CI

Integrates

Phase 09 McNemar test + Phase 09 regression detection + Phase 07 profiling report format

Run

pip install -r requirements.txt
python lab.py       # generates report.json
pytest test_lab.py -v