You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dossiq carries its own CMMN runtime: nine classes and 2,004 lines under lib/Service/Cmmn/ (CaseModelEngine, PlanItemStateMachine, PlanItemTransitions, SentryEvaluator, PlanItemCascade, PlanItemTree, CaseModelLoader, CasePlanRepository, IllegalPlanItemTransitionException), a five-route CmmnCaseController, and a runtime state blob in case.casePlanState. openregister's merged change flow-cmmn-case-semantics now provides the same case layer natively: plan-item rows anchored to the OpenRegister object, the same six-state lifecycle table, sentries over the engine's expression and event primitives, stages, milestones, discretionary and ad-hoc items, all served on /api/cases. That change names this retirement by slug as its promised follow-up. This change drains dossiq onto the openregister case layer and retires the local runtime and the blob.
1.1 lib/Service/CasePlanProjectionService.php: at case start for handlingModel: cmmn, project the published caseModel onto openregister plan items via /api/cases; convert sentries per the closed operator table in design.md section 2, refusing and reporting any operator or on-part outside it. Projection fixtures per operator.
1.2 Repoint the frontend: the cmmn-case-plan widget slot renders the plan from openregister's /api/cases (read plan, transition, enable discretionary, attach ad-hoc, list enableable); error state fails closed with retry when openregister is unreachable. Vitest covers the error path.
1.3 Bridge read preference: prefer openregister rows when the case has them, fall back to the local engine only while a blob is present; ship occ dossiq:cmmn:rollback-case-plans (reverse projection, rows to blob) for R1 rollback.
2.1 occ dossiq:cmmn:migrate-case-plans (--dry-run, --strict) plus repair step: per case, decode the blob, recover item metadata from the backing caseModel, create only the missing openregister rows keyed on (case uuid, item id) with states carried verbatim, write case-file values as declared case properties, import eventLog into the audit, verify, then clear the blob as the per-case commit point.
2.2 Unmappable handling: undecodable blob, orphan item id, unknown state or unconvertible sentry leaves the case intact and reports uuid plus reason; --strict exits non-zero, the repair step logs and continues.
2.3 Idempotency proof: PHPUnit runs the migration twice over the fixture set (populated, half-written, empty, unmappable) asserting identical rows, no duplicate audit entries and untouched unmappable cases.
3.1 Delete lib/Service/Cmmn/ (all nine classes), lib/Controller/CmmnCaseController.php and the five /api/case/{caseId}/cmmn-plan* entries in appinfo/routes.php; drop the R1 rollback command.
3.2 Remove casePlanState from dossiq_register.json and dossiq_mock_register.json and rewrite the handlingModelcmmn description to name the openregister case layer. Gated on the group 2 exit report: openregister strips undeclared properties on save, so this lands last.
3.3 Retire the engine's unit tests (tests/Unit/Service/Cmmn/, CmmnCaseControllerTest) and CmmnBpmnCoexistenceRegressionTest; its BPMN-untouched invariant moves to the structural test and the e2e journey (5.3).
4.1 Delete src/services/cmmnApi.js, src/views/cases/components/CmmnCasePlanPanel.vue and CmmnPlanItemNode.vue, and their registry.js and manifest.json entries; verify the replacement panel from 1.2 owns the cmmn-case-plan slot and the built bundle contains none of the retired components.
4.2 tests/Unit/Service/CmmnRetirementTest.php (class-catching guard): fails on any reference under lib/ or src/ to OCA\Dossiq\Service\Cmmn, CmmnCaseController or casePlanState outside a closed, reason-bearing allowlist; the allowlist holds only the migration's blob access until this release and is asserted empty after 3.1 and 3.2 land.
5.1 tests/e2e/cmmn-retirement.spec.ts: the retirement journey. Anchors @e2e openspec/specs/retire-cmmn-caseplanstate/spec.md#a-cmmn-case-shows-the-plan-openregister-holds, #working-a-plan-item-through-the-panel and #the-old-routes-answer-404-after-removal (open a CMMN case, work an item through the panel, probe the retired routes for 404).
5.2 Migration proof in the same spec: seed a case with a populated blob, run the migration, assert the case detail shows the same items in the same states from openregister rows; anchor #a-drained-case-shows-the-same-plan.
5.3 Update tests/e2e/case-detail-kpis-and-tabs.spec.ts: remove the cmmn-plan 409 allowances from its console and network assertions and anchor #a-bpmn-case-is-untouched on the BPMN case-detail assertions.
6.1 Analyzers green on the touched files: lint, phpcs, psalm, phpstan individually, phpmd per subdir; eslint and vitest for the frontend removals.
6.2 Hydra gates with --scope-to-diff report 0 FAIL on the diff; gate-16 @spec tags on every changed method point at openspec/specs/retire-cmmn-caseplanstate/spec.md.
Artifacts
Summary
dossiq carries its own CMMN runtime: nine classes and 2,004 lines under
lib/Service/Cmmn/(CaseModelEngine, PlanItemStateMachine, PlanItemTransitions, SentryEvaluator, PlanItemCascade, PlanItemTree, CaseModelLoader, CasePlanRepository, IllegalPlanItemTransitionException), a five-routeCmmnCaseController, and a runtime state blob incase.casePlanState. openregister's merged changeflow-cmmn-case-semanticsnow provides the same case layer natively: plan-item rows anchored to the OpenRegister object, the same six-state lifecycle table, sentries over the engine's expression and event primitives, stages, milestones, discretionary and ad-hoc items, all served on/api/cases. That change names this retirement by slug as its promised follow-up. This change drains dossiq onto the openregister case layer and retires the local runtime and the blob.Specs
Tasks
lib/Service/CasePlanProjectionService.php: at case start forhandlingModel: cmmn, project the publishedcaseModelonto openregister plan items via/api/cases; convert sentries per the closed operator table in design.md section 2, refusing and reporting any operator or on-part outside it. Projection fixtures per operator.cmmn-case-planwidget slot renders the plan from openregister's/api/cases(read plan, transition, enable discretionary, attach ad-hoc, list enableable); error state fails closed with retry when openregister is unreachable. Vitest covers the error path.occ dossiq:cmmn:rollback-case-plans(reverse projection, rows to blob) for R1 rollback.occ dossiq:cmmn:migrate-case-plans(--dry-run,--strict) plus repair step: per case, decode the blob, recover item metadata from the backing caseModel, create only the missing openregister rows keyed on (case uuid, item id) with states carried verbatim, write case-file values as declared case properties, importeventLoginto the audit, verify, then clear the blob as the per-case commit point.--strictexits non-zero, the repair step logs and continues.lib/Service/Cmmn/(all nine classes),lib/Controller/CmmnCaseController.phpand the five/api/case/{caseId}/cmmn-plan*entries inappinfo/routes.php; drop the R1 rollback command.casePlanStatefromdossiq_register.jsonanddossiq_mock_register.jsonand rewrite thehandlingModelcmmndescription to name the openregister case layer. Gated on the group 2 exit report: openregister strips undeclared properties on save, so this lands last.tests/Unit/Service/Cmmn/,CmmnCaseControllerTest) andCmmnBpmnCoexistenceRegressionTest; its BPMN-untouched invariant moves to the structural test and the e2e journey (5.3).src/services/cmmnApi.js,src/views/cases/components/CmmnCasePlanPanel.vueandCmmnPlanItemNode.vue, and theirregistry.jsandmanifest.jsonentries; verify the replacement panel from 1.2 owns thecmmn-case-planslot and the built bundle contains none of the retired components.tests/Unit/Service/CmmnRetirementTest.php(class-catching guard): fails on any reference underlib/orsrc/toOCA\Dossiq\Service\Cmmn,CmmnCaseControllerorcasePlanStateoutside a closed, reason-bearing allowlist; the allowlist holds only the migration's blob access until this release and is asserted empty after 3.1 and 3.2 land.tests/e2e/cmmn-retirement.spec.ts: the retirement journey. Anchors@e2e openspec/specs/retire-cmmn-caseplanstate/spec.md#a-cmmn-case-shows-the-plan-openregister-holds,#working-a-plan-item-through-the-paneland#the-old-routes-answer-404-after-removal(open a CMMN case, work an item through the panel, probe the retired routes for 404).#a-drained-case-shows-the-same-plan.tests/e2e/case-detail-kpis-and-tabs.spec.ts: remove thecmmn-plan409 allowances from its console and network assertions and anchor#a-bpmn-case-is-untouchedon the BPMN case-detail assertions.--scope-to-diffreport 0 FAIL on the diff; gate-16@spectags on every changed method point atopenspec/specs/retire-cmmn-caseplanstate/spec.md.Design
See design.md for technical design details.
Synced from
openspec/changes/retire-cmmn-caseplanstateby OpenSpec workflowApp:
dossiq