fix(workflow): T4 critical lint bugs — potentialOwner array + namespaced assignee (would block valid JNPF workflows)
C1 critical: bpmn-moddle Activity.resources 是 isMany: true flat ResourceRole 数组,
不存在 resources.potentialOwner 嵌套访问. 修复前对所有 <bpmn:potentialOwner/>
元素 (BPMN 标准 candidate wrapper pattern) 误判为 no candidate 而阻断.
修复: filter by $type === 'bpmn:PotentialOwner'.
C2 critical: camunda/flowable extension 属性 (assignee / candidateUsers) 落到 $attrs
并保留命名空间前缀 ($attrs['camunda:assignee']). 修复前只查 ut.assignee +
$attrs.assignee, 错失命名空间属性. JNPF/Camunda XML 风格 userTask 全部误判.
修复: 查 ut.assignee + $attrs.assignee + $attrs['camunda:assignee'] +
$attrs['flowable:assignee'].
I1: 加 2 回归测试 (Test 5/6) — potentialOwner wrapper 误判 + camunda:assignee 误判
I2: 更新 _semantic_lint.ts:84-93 注释, 反映正确的访问 pattern (filter by $type)
M1: 去掉冗余 (ut as any).resources cast — ut 已 any (filter 上下文)
M3: 加 2 稳定性测试 — 空 XML + 单 End+Gateway 短路验证
注: 同步修正原 Test 3 (userTask 无 assignee 且无 potentialOwner), 因为之前的 XML
含 <bpmn:potentialOwner/>, C1 修复后会视为有候选 → 改为真正的 'no candidate' case.
Test 4 (Test 4 = assign=${deptManager} 阻断) 不受影响, 因为 $vars 用 ut.assignee 直接读,
不会触 $attrs 命名空间路径.
tsc --noEmit 干净; vitest 504 passed (500 旧 + 4 new); bpmn-bs-regression 6/6 绿.
Co-Authored-By: Claude <[email protected]>