feat(engine): RunEvent 增 executor 驻地字段(ADR-R6 补记:双端透明调度设计——三条纪律+确定性路由表+数据不动原则)

This commit is contained in:
yu committed 2026-11-06 15:29:34 +08:00
1 parent 3a0ff42ac6
commit 81ce4bc9b8
4 files changed
+29 -1

No files matched your search

@@ -87,6 +87,8 @@ describe("A++ 检查点事件负载", () => {
expect(first.checkpointId).toBe("first");
expect(first.resumable).toBe(true);
expect(first.idempotencyKey).toBe("run_cp:first");
// 双端透明调度(ADR-R6 补记):本地执行驻地必须随事件上报,供审计区分
expect(first.executor).toBe("local");
const second = finished.find((e) => e.nodeId === "second")!;
expect(second.checkpointId).toBe("second");
+1
View File
@@ -370,6 +370,7 @@ async function executeNode(node: FlowNode, ctx: RunContext, states: Map<string,
evidence: state.evidence,
checkpointId: node.id,
resumable,
executor: "local",
...(resumable ? { idempotencyKey: `${ctx.runId}:${node.id}` } : {})
});
return result;
+2
View File
@@ -185,6 +185,8 @@ export interface RunEvent {
checkpointId?: string;
idempotencyKey?: string;
resumable?: boolean;
// 双端透明调度(ADR-R6 补记):本次执行驻地;用户界面不展示,审计/排障必须可见
executor?: "local" | "backend";
startedAt?: string;
nodeLabel?: string;
total?: number;