三面拆分⑭:纯编排第三轮 —— 活动卸岗位、卡点废除全真边、边号 E1–En 图上可选
活动契约不带负责人岗位(用户定): - schema:活动节点删 owner(审批点的 approver 是「卡到人的工位」的功能语义,保留) - 运行时:活动任务默认**全员轮值**(在岗候选并集、最闲者先、staffId 稳定排序, owner-resolved 事件岗位记「(全员轮值)」);运营分派机制落地后让位 —— 债已记 - closure:活动点不核岗位,missing-owner-position 只出自审批点 - 员工面链条:活动点报**实际承接人**(实例→任务→人),没起的如实报「轮值待派」; NodeInstance 公开 taskId/approvalId(店面读回,与端口型合流) - 画布/导出依赖文件/属性卡全线摘岗位;属性卡活动点明说「分派归运营」 卡点画法废除,顺序流一律真边(用户定): - 种子图重画:四条回跳/直达(E4 直接定价、E6 选型后定价、E10 不通过、E12 有异议) 全部画成折线真边,车道分层零交叉(顶 y30 / y190 / y230 / 缝隙对开 / 底 y380); 卡点节点删净,图=恰 10 语义节点 + 14 真边一一对应(测试守着) - graph-to-pkg 卡点认亲机制删除;pkg-to-graph 直接按 from→to 认亲 - 元素盘删卡点件;图例、属性卡卡点分支、kindLabel/kindTone 随删 边号 E1、E2…(用户定): - 语义边 id 即边号:种子 E1–E14;合并器铸号(旧边保号、新边取下一空号,回归测试守着) - 画布线标带号(`E3 直接寻源`,无注记的边也标 `E1`);拣选条以边号立牌, **条件不再上按钮** —— 条件/映射只住属性面 - 边在图上可选中:FlowDiagram 连线加宽透明命中垫(边可点时注解层提到形状层上), 点线即切属性卡到该边(实测 E4 命中) 测试:closure 28、advance-order 6、graph-to-pkg 5(新增铸号例)、seed 8、 端到端八例真库全绿(全员轮值下照跑);五闸退出码验过。 库:purge 后重种,唯一 unified-quote@v1 生效(双面判据齐)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -34,7 +34,6 @@ const pkg = (over: Partial<ProcessPackage> = {}): ProcessPackage =>
|
||||
kind: 'activity',
|
||||
label: 'A4 成本定价',
|
||||
activityId: 'a4' as never,
|
||||
owner: { position: 'BD', strategy: 'sole' },
|
||||
failure: { kind: 'terminate' },
|
||||
},
|
||||
{ id: 'end' as never, kind: 'end', label: '终点' },
|
||||
@@ -101,9 +100,31 @@ describe('checkClosure —— 不闭合不得激活', () => {
|
||||
expect(report.violations.map((v) => v.kind)).toContain('unknown-activity');
|
||||
});
|
||||
|
||||
it('岗位不存在即拦', () => {
|
||||
const report = checkClosure({ pkg: pkg(), contracts, positions: new Set(['PM']) });
|
||||
expect(report.violations.map((v) => v.kind)).toContain('missing-owner-position');
|
||||
/* 活动点不核岗位(契约不带负责人);审批点的岗位是功能语义,不存在即拦 */
|
||||
it('审批点岗位不存在即拦;活动点没有岗位可核', () => {
|
||||
const withApproval = pkg({
|
||||
nodes: [
|
||||
...pkg().nodes,
|
||||
{
|
||||
id: 'AP' as never,
|
||||
kind: 'approval',
|
||||
label: '审批',
|
||||
approver: { position: 'GONE', strategy: 'sole' },
|
||||
reject: { kind: 'terminate' },
|
||||
},
|
||||
],
|
||||
edges: [
|
||||
...pkg().edges.filter((e) => e.id !== 'e2'),
|
||||
{ id: 'e2', from: 'A4' as never, to: 'AP' as never, mapping: [], reopen: false },
|
||||
{ id: 'e3', from: 'AP' as never, to: 'end' as never, mapping: [], reopen: false },
|
||||
],
|
||||
});
|
||||
const violations = checkClosure({ pkg: withApproval, contracts, positions }).violations;
|
||||
expect(violations.filter((v) => v.kind === 'missing-owner-position').map((v) => v.nodeId)).toEqual(['AP']);
|
||||
|
||||
// 活动节点引用的岗位集合再小也与它无关 —— 不产生岗位类违规
|
||||
const noPositions = checkClosure({ pkg: pkg(), contracts, positions: new Set() }).violations;
|
||||
expect(noPositions.filter((v) => v.kind === 'missing-owner-position')).toEqual([]);
|
||||
});
|
||||
|
||||
it('孤立节点即拦', () => {
|
||||
@@ -115,7 +136,6 @@ describe('checkClosure —— 不闭合不得激活', () => {
|
||||
kind: 'activity',
|
||||
label: '游离节点',
|
||||
activityId: 'a4' as never,
|
||||
owner: { position: 'BD', strategy: 'sole' },
|
||||
failure: { kind: 'terminate' },
|
||||
},
|
||||
],
|
||||
@@ -156,7 +176,6 @@ describe('checkClosure —— 不闭合不得激活', () => {
|
||||
kind: 'activity',
|
||||
label: 'A3 渠道寻源',
|
||||
activityId: 'a4' as never,
|
||||
owner: { position: 'PRM', strategy: 'sole' },
|
||||
failure: { kind: 'tolerate' },
|
||||
},
|
||||
{
|
||||
@@ -164,7 +183,6 @@ describe('checkClosure —— 不闭合不得激活', () => {
|
||||
kind: 'activity',
|
||||
label: 'A4 成本定价',
|
||||
activityId: 'a4' as never,
|
||||
owner: { position: 'BD', strategy: 'sole' },
|
||||
failure: { kind: 'terminate' },
|
||||
},
|
||||
{ id: 'end' as never, kind: 'end', label: '终点' },
|
||||
|
||||
Reference in New Issue
Block a user