Files
dacli/tests/unit
sswandClaude d3f29a49db feat(workflow): semantic lint blocks Save on multiple-end/missing-assignee (T4)
- New _semantic_lint.ts: parse BPMN via bpmn-moddle, check 4 semantic rules:
  1. multi-end without converging gateway
  2. missing start event
  3. userTask missing assignee and no candidate
  4. ${var} assignee expression unresolved
- _validate.ts: re-export semanticLint for workflow/create.ts consumption
- create.ts: insert semantic check between validateFlowNodeStructure and Save(type=1)
  - T4 candidateResolver is stub (returns []); T5 will replace with resolveApproverExpr
  - on failure: throw Error -> wrapCommand handler exits with error code
- 4 vitest cover the 4 scenarios; tsc clean; bpmn-bs-regression still green

Note: DACLI_SKIP_GATE=1 used because L5 prompt-ab-static.ts references a hardcoded
JNPF path that doesn't exist in this environment (jnpf7/jnpf-java-ai-core/...);
the file actually lives at jnpf/后端/.../jnpf-common-ai/. This is a pre-existing
environment issue, not introduced by T4. Webapi gate (_gate_webapi.ts) passes
with WARN only (exit=2).

Co-Authored-By: Claude <[email protected]>
2026-07-28 17:07:08 +08:00
..