feat: enforce pass/fail quality gates on typed operator outputs - #283
feat: enforce pass/fail quality gates on typed operator outputs#283chandrashekhard-zmx wants to merge 8 commits into
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… criterion Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ality gate Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… output Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Also wire expected_min/expected_max/expected_value through the admin process-template page's outputs prop serialization, which the plan's Task 5 had missed — the field mapping there is explicit, not a plain model toArray(), so the new columns were invisible to the UI without it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for contributing to OpenMES @chandrashekhard-zmx. We're introducing a Contributor License Agreement (CLA) so the project can stay open source (AGPL-3.0) while also being offered under separate commercial licences that fund its continued development. You keep the copyright to your contributions — the CLA doesn't transfer ownership. It only grants the project the rights it needs to license OpenMES under both open-source and commercial terms, and you remain free to use your own code elsewhere. Since code you contributed is still part of OpenMES, we'd like to confirm it's covered. Please read the CLA here: If you agree, just comment with the line below: I have read the OpenMES CLA at commit 201d911 and I agree that it covers all my past and future contributions to Mes-Open/OpenMes. Thanks a lot for your help building OpenMES. |
Summary
number/boolean/selecttyped operator output can now carry an optional pass criterion (min/max range, required Yes, or a single passing option) alongside the existingis_required"must be recorded" gate.IN_PROCESS_QC_FAILblocking issue on the work order, which stops the next station from starting — reusingWorkOrder::isBlocked()/BatchStep::canStart()rather than inventing new blocking logic.WO-YB1-TEST-FAIL) recorded an out-of-spec voltage and the batch still reachedDONEwith zero blocking before this change.Implementation
database/migrations/2026_09_04_120000_add_expected_result_to_template_step_outputs.php— nullableexpected_min/expected_max/expected_valuecolumns.App\Services\WorkOrder\OutputGateEvaluator— stateless pass/fail evaluation per value type.App\Observers\BatchStepOutputValueObserver— hooksBatchStepOutputValue::created, raises the issue via the existingIssueService, best-effort (never breaks the operator's save).ProcessTemplateManagementController).Show.jsx.Full plan:
docs/superpowers/plans/2026-09-04-quality-gate-enforcement.md.Test plan
php artisan test— full suite: 1651 passed, 3 pre-existing failures unrelated to this change (imagewebp()missing in this container's GD build, and Sanctum stateful-domain config assertions) — none touch files this PR changes.TemplateStepOutputExpectedResultTest,OutputGateEvaluatorTest.QualityGateEnforcementTest(out-of-range value raises issue + blocks next step; in-range raises nothing; resolving the issue unblocks; ungated outputs unaffected).StepTypedOutputsTestfor admin-authoring validation/persistence of the new fields.🤖 Generated with Claude Code