判据 ④⑤ 解锁:G2 并行网关起出 A3 / A2 —— 输出口发射的是落地事实

G2 之后一直不分流,根因三条,逐条修:

① 输出口载荷是空的。`outputPortsOf` 原先从**作用域**里捞字段拼载荷,
   而放行那一刻草稿层已合并并清空,捞到的只剩起单入参 —— 下游节点必然缺字段。
   改为:载荷取自**落地收敛的事实**,由 `releaseWrite` 回报合并了哪些行,
   经 release → task → app 一路带上来。这也正是「落地收敛,输出口才发射」的字面意思:
   发射的就该是已经落地的那些事实。
   `LandedFacts` 给两种读法:铺平(标量取值)与逐行(数组取值),
   输出口声明里 `type: 'array'` 的属性填逐行,标量属性填铺平值(驼峰/下划线两种写法都认)。

② 一条分支起不来,把整条终态上报连坐掀翻 —— 于是**上游任务的终态也报不上去**,
   流停在原地,一行日志都没有。改为:该分支记 `node-start-failed` 事件 + 落一个
   blocked 实例,其余分支照走,在治理台「需处置」里现形。
   (这条是先修的:正因为它,前面两条才一直查不出来。)

③ 边映射引用了不存在的路径:`G2→A3` 的 pn 取 `intake.records`(那是想象中的 LLM 出参形状)、
   `G2J→A4` 的 records 取 `initiation.records`(起单时根本还没有这些行)。
   按输出口的真实声明改正。

结果:A1 released → G2 并行分叉 → **A3 渠道寻源落到林佩萱、A2 替代选型落到王梓名**,
两个 loop 活动同时在跑,岗位解析正确。

gates: tsc / eslint / depcruise(317 模块)/ api-report / 393 测试 全绿

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
2026-07-27 04:52:53 +08:00
co-authored by Claude Opus 5
parent 1721bcf6e3
commit 9de33a5416
22 changed files with 223 additions and 35 deletions
+5 -2
View File
@@ -3,7 +3,7 @@
*/
import type { BudgetCaps, Paradigm, StaffId, TaskId, TerminalState } from '@contracts';
import type { Consumption } from './internal/domain/harness.ts';
import type { Task } from './contract.ts';
import type { LandedFacts, Task } from './contract.ts';
export type Clock = { now(): Date };
export type IdGenerator = { next(): string };
@@ -61,6 +61,8 @@ export type LandingGateway = {
converged: boolean;
emittedPorts: readonly string[];
ledgerRowsMerged: number;
/** 已落地的事实 —— 输出口载荷,随终态报给流程层 */
facts: LandedFacts;
}>;
};
@@ -92,7 +94,8 @@ export type PersistenceProbe = {
/** 控制事件与终态事件 —— app 注入 `event`(L1) */
export type TaskEventPublisher = {
publishControl(taskId: TaskId, semantic: string, by: StaffId, reason?: string): Promise<void>;
publishTerminal(taskId: TaskId, terminal: TerminalState, reason: string): Promise<void>;
/** `facts` = 落地收敛的事实,作为输出口载荷随终态报给流程层;非放行终态为空 */
publishTerminal(taskId: TaskId, terminal: TerminalState, reason: string, facts: LandedFacts): Promise<void>;
};
/** 改派通知 —— app 注入 `message`(L2):改派留痕并**通知双方** */