Inspiration

When production pricing calculation incidents occur, software engineers often lack safe, structured training environments. In high-pressure situations, developers may prematurely deploy untested hotfixes or passively accept AI-generated suggestions without understanding underlying boundary conditions, half-cent rounding rules, or aggregate subtotal semantics. We built Incident Mastery Loop to transform incident triage into active, guided deliberate practice.

What It Does

  1. Interactive Guided Simulation (index.html): An offline-first practice environment where learners analyze a failing promotional transfer order ($30 charged instead of $25.50), request progressive hints without spoiling the answer, enter repair parameters, and observe 5 simulated boundary checks in real time.
  2. Conceptual Transfer Verification: Tests whether learners actually understood the underlying logic by presenting changed-value arithmetic checks (e.g., 12% off 2537 cents) before revealing feedback.
  3. Reproducible GitLab Duo CI Expert Workflow (docs/duo-workflow.md): A documented, multi-turn prompt sequence where developers inspect failed CI assertions with GitLab Duo in Assisted mode and receive progressive repair guidance.
  4. Real Automated Regression Suite (cart.py, test_cart.py): 27 automated pytest regression and contract checks verifying standard rules, Transfer Challenge 1, and Transfer Challenge 2 (preventing multi-item rounding drift).
  5. Machine-Verified Incident Learning Records (docs/artifacts/ci-verification-record.json): Exportable audit trails linking diagnostic attempts, human-approved MRs, and verified GitLab CI pipeline results.

How We Built It

  • Core Logic: Pure Python 3.11/3.12 pricing algorithms with exact integer cent math.
  • Testing & Verification: Comprehensive 27-test pytest suite covering exact threshold boundaries, half-cent rounding up, aggregate subtotals, and discount caps.
  • Continuous Integration: GitLab CI runner generating automated JUnit reports (pytest-report.xml) and isolated patch validation (scripts/verify_exercise.py).
  • Educational Frontend: Vanilla HTML5, CSS3, and JavaScript requiring zero external dependencies, web servers, or network calls.

Real Evidence & Verifiable Artifacts

  • Passing Main Pipeline: Pipeline #2984678533 (21/21 passing, duration 28s)
  • Merged Human-Governance MR: MR !4
  • Historical Defect Demo: Draft MR !2 (Failed Pipeline #2981423652 $\rightarrow$ Recovery Commit 15f85041)
  • Real Learner Trial Report (N=4): docs/learner-trial.md
  • Public Video Walkthrough: https://youtu.be/PLf_q74KBP0 (2m 25s)

What We Learned

True mastery requires active repair rather than passive observation. By combining human review, progressive prompting with GitLab Duo, and automated boundary testing, developers build lasting mental models of software boundaries.

Built With

Share this project:

Updates

Submission history