Uh oh!
There was an error while loading. Please reload this page.
feat(runtime-host): establish canonical Memory authority - #1610
Conversation
Astro-Han
left a comment
There was a problem hiding this comment.
Approved. This keeps the production entry points unchanged, reuses the existing root-lease and policy-activation seams, and does not add a generic Store or file RPC. The two-document transaction and chunked upload both follow from concrete product and transport constraints, so I would keep the current boundary.
I found three non-blocking edge cases worth following up:
- The Markdown parser accepts every
maka-memorymetadata comment in a section, so a later comment in the content can replace the canonical scope or status. Only the first metadata line should be authoritative. - A no-op raw replacement can rewrite a backup without advancing the bundle revision. A client may then restore a different backup from the one it previously queried. Giving each backup candidate a revision and checking it during restore would close that race.
beginDrain()clears staged uploads before accepted mutations have finished waiting on the shared lane. A queuedreplace_commitcan therefore returnupload_not_foundduring shutdown. Upload cleanup should wait for accepted operations to settle.
None of these need to block this M3 slice. Each should get a focused regression test before production activation.
d332d5b to
0cabf50CompareM4n5ter
commented
Jul 29, 2026
Addressed all three follow-up edge cases in |
English
Summary
This PR establishes the Runtime Host boundary for transparent local Memory:
MEMORY.md,PENDING.md, and public backup candidates;MemoryBundlecommit boundary for canonical and pending state;memory.queryandmemory.mutateoperations;This is part of the M3 extraction tracked by #1167 and follows the ownership and lifecycle direction in #853.
Authority and protocol
MEMORY.mdandPENDING.mdform one revisioned bundle, so proposal approval cannot publish only half of its state.maka-memorymetadata comment in a section is authoritative; later metadata comments cannot replace canonical status or scope.commit_outcome_unknownand requests Host drain.Policy and product boundary
This slice does not switch the production Desktop or TUI owner. Production adapter wiring and removal of embedded writers remain later cutover work. It also does not introduce a generic file, blob, Store, or transaction RPC.
Non-cooperating writers that retain an already-open file descriptor remain outside the Store's concurrency guarantee. Before production activation, raw writers for the same Interactive root must be routed through the Host or removed.
Validation
git diff --checkpass.简体中文
概要
本 PR 为透明本地 Memory 建立 Runtime Host 边界:
MEMORY.md、PENDING.md与公开 backup candidate 建立唯一、经过认证且受 lease 约束的 writer;MemoryBundle提交边界;memory.query与memory.mutateoperation;本 PR 属于 #1167 追踪的 M3 提取,并遵循 #853 的 ownership 与 lifecycle 方向。
Authority 与协议
MEMORY.md与PENDING.md组成一个 revisioned bundle,proposal approval 不会只发布一半状态。maka-memorymetadata comment 具备权威性;后续 metadata comment 不能替换 canonical status 或 scope。commit_outcome_unknown,并请求 Host drain。Policy 与产品边界
本 slice 不切换 production Desktop 或 TUI owner。Production adapter 接线与 embedded writer 删除仍属于后续 cutover。本 PR 也不增加 generic file、blob、Store 或 transaction RPC。
已经持有打开 file descriptor 的非协作 writer 不在 Store 的并发保证内。Production activation 前,同一 Interactive root 下的 raw writer 必须路由到 Host,或被删除。
验证
git diff --check通过。