Uh oh!
There was an error while loading. Please reload this page.
feat(runtime): support sequential agent graph epochs - #2969
Conversation
likun666661
left a comment
There was a problem hiding this comment.
LGTM. The Runtime Host-owned cutover, terminal/quiescent recheck, wake suppression, and storage CAS establish the right lifecycle boundary for sequential graph epochs.
Non-blocking follow-up: please add a recovery test for the crash window where advanceAgentGraphEpoch has committed but supersedeAgentGraphSupervisorWakes has not. On restart, any retryable wake belonging to the prior graph should be deterministically superseded rather than retained or redelivered against the new current epoch.
0262d0c to
9505917Compareme2seeks
commented
Aug 13, 2026
Added the crash-window recovery coverage and tightened recovery so only wakes from the stale graph epoch are superseded; a current-epoch wake for the same root still delivers normally. Also rebased onto current main. |
Summary
A finished graph remains immutable. The next graph-capable Turn receives a new deterministic graph ID, and concurrent Hosts converge through a storage CAS instead of reopening or skipping the previous graph. Ordinary default Turns leave the finished graph untouched. Legacy epoch 1 stays virtual until the first real cutover, so Sessions do not acquire graph state just by being read.
This establishes the lifecycle boundary needed by #2588. Historical graph selection and cross-epoch result inputs remain follow-up work.
Refs #2588
Verification
npm --workspace @maka/core run test— 539 passednpm --workspace @maka/storage run test— 777 passed, 16 skippednpm --workspace @maka/runtime run test— 2,788 passed, 6 skippednpm --workspace @maka/runtime-host run test— 910 passedgit diff --checkChecklist
Does this PR entail a change in behavior?
中文说明
摘要
已经
finish的图仍然不可修改。下一条启用 Graph 的 Turn 使用新的确定性 graph ID;多个 Host 并发切换时由 Storage CAS 收敛,不会重开旧图或跳过 epoch。普通 default Turn 不会切换 graph epoch。第一次真正切换前,legacy epoch 1 只是只读兼容值,因此会话不会仅因查询而写入图状态。本 PR 建立 #2588 所需的生命周期基础。历史图选择和跨 epoch 结果输入将在后续实现。