Repository navigation
feat(runtime): materialize trace graph topology - #1443
Conversation
|
The overall trace-only layering looks right, but I found two identity blockers before this is safe to merge. [P1] Do not use unrestricted graph IDs as keys on ordinary JavaScript objects
I reproduced both failure modes on this head:
This is both a correctness failure for an identity accepted by the public contract and a prototype-pollution boundary. Please use [P1] Bind route identity to the immutable edge endpoints
I reproduced two snapshots for the same graph and source record, both using Please either include The focused suites and CI are green; these are contract gaps not covered by the current happy-path tests. |
Summary
This is the second implementation slice of #1341, building on the committed-event projection merged in #1442.
Architectural boundary
This PR is still trace-only. It makes topology and record flow explicit without creating another execution authority.
A route says that an existing committed record is visible on one direct downstream edge. It references the source graph record and never copies message or tool payloads. It also does not recursively invent downstream work: only a RuntimeEvent emitted by that downstream operator can produce records on its own outgoing edges.
The main-agent supervisor remains structurally beside the graph. The existing always-on supervisor meta-stream continues to observe every source record independently; it is not consulted before a route appears and therefore cannot become a serial data-path gate.
Edges remain mechanically simple and route every committed source record. Operator-local readiness, buffering, joins, and semantic input selection belong to a later slice rather than a growing central scheduler DSL.
Validation and failure semantics
Topology materialization fails closed for:
Deliberate non-goals
Validation
npm run typecheck/usr/localexecutable-root ordering assertionrgcannot load PCRE2 inside the operation-scoped Seatbelt sandboxgit diff --checkRefs #1341
中文说明
这是 #1341 的第二个实现切片,建立在 #1442 已合并的 committed-event projection 之上。
本 PR 仍然是 trace-only。Route 只表示一条现有 committed record 在某条直接下游 edge 上可见,不复制 message/tool payload,也不会递归伪造下游执行。只有下游 operator 自己真实产生 RuntimeEvent,才会在它的 outgoing edge 上继续形成 record route。
主 Agent supervisor 始终在图旁监督。现有 always-on supervisor meta-stream 独立观察每条 source record;route 的形成无需等待 supervisor 批准,因此 supervisor 不会成为串行 data-path gate。
Edge 保持机械和简单:转发所有 committed source record。Operator-local readiness、buffering、join 和语义输入筛选留给后续切片,避免把中央 scheduler 扩展成领域 DSL。
本切片不会创建、启动、发消息、恢复、取消或暂停 child,不引入 readiness/admission、resource permits、scheduler control authority、graph-wide completion/closing protocol,也暂不实现 Desktop/TUI renderer。