Repository navigation
Conversation
…cess host The pinned desktop moves to ora-space/desktop#768, where Node runs Git itself and refuses to start without ora-reaper. Preparation builds and records ora-node and ora-reaper, the runtime copies both and starts only Node, and the configuration names the reaper by its short name in the runtime root. host_directory stays so Node deletes the retired host's state in roots prepared before the upgrade; cleanup still recognizes host and guardian processes such roots may be running.
Without the guardian, Node's control socket is the longest path a runtime root holds, so the root, Agent runtime and demo data directory checks measure that instead of a guardian scope socket.
…leanup unconfirmed Node can exit before an Agent it was stopping has gone. The process host used to be stopped after Node, which gave such an Agent time to exit; without it, the leftover check ran at once and reported the stop as unconfirmed. Processes left in the root now get the same grace to exit on their own, and are still never killed by working directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs ora-space/circus#1145
v2,不涉及 specs。只改
v2-server/,接口契约不变,界面没有变化。ora-space/desktop#768 已合并:Node 自己执行 Git,不再需要
ora-process-host和ora-process-guardian,但启动时必须能拉起ora-reaper,拉不起来就不启动。本 PR 把固定的 desktop 推到 desktop#768 的合并提交,并让 v2-server 跟上。改了什么
scripts/prepare-node.sh的source_commit改为aa21210e(desktop#768 在 main 上的合并提交);构建和记录的可执行文件从ora-node、ora-process-host、ora-process-guardian改成ora-node、ora-reaper,assets.json里的host、guardian换成reaper。agentruntime校验和传递的资产同步改掉。RuntimeOptions去掉Host、Guardian,加上Reaper。运行目录里拷贝 Node(nb)和 reaper(rb),只启动 Node,不再等host.sock,停止时只停 Node。process.reaper_program指向运行目录里的rb。Node 默认找同目录下名为ora-reaper的文件,而运行目录用短名字,所以要显式写。host_directory、expected_uid照旧写:新 Node 在旧 host 停掉后会删除它留下的h目录,旧目录都清完后再去掉这两项。rb。Node 被强杀后,reaper 还会存活片刻。升级前的运行目录里可能还有hb、gb进程,名单里保留它们。opencode,报execution shutdown unconfirmed(本地 9 次停止里出现 2 次,main 上没有)。现在运行目录里归属不明的进程有一个宽限期(StopGrace)自己退出,过了仍在才报错,仍然不按 cwd 杀进程。<Root>/n/control.sock。node、agentruntime和demo的检查都改按它算,数据目录上限从约 23 个字符放宽到 67 个。README.md、Taskfile.yml、internal/node/README.md、internal/nodeservices/README.md、internal/agentruntime/README.md里对 host 和 guardian 的说明,以及真实测试里启动 host 的夹具,都已同步。commit
feat(v2-server): run Node with its reaper instead of starting the process host:资产、运行时、Node 配置和残留清理,附测试。新增真实测试TestRealRuntimeRemovesRetiredHostDirectory,覆盖"升级前的运行目录启动后旧 host 目录被删除、每个 Node 只有一个 reaper、停止后没有残留"。feat(v2-server): bound runtime paths by the Node control socket:路径长度检查。docs(v2-server): describe the reaper in place of the process host and guardian:文档。fix(v2-server): give an exiting Agent the stop grace before calling cleanup unconfirmed:停止确认,附单测。验证
go vet ./...;internal/node、internal/nodeservices、internal/agentruntime、demo和根包的单测都通过。aa21210e的 release 资产跑真实 Node 测试,task v2:node:test、task v2:node:agent:test、task v2:execution:test都通过(第 4 个 commit 之后又跑了一遍)。跑完没有残留的nb、rb进程。dcff8afe)建项目、开一条对话,再在同一个数据目录和库上换成本 PR 启动。能正常启动,旧项目里新开的对话正常回复,两个 Node 的w/h都被删除;之后的停止和重启都没有残留进程。shutdown unconfirmed,也没有残留进程。按 circus#896 的指标复测:4 核 arm64,release 构建,OpenCode 0.6.11 + DeepSeek Flash,同一提示词。每轮新建一个项目,等 10 秒后连开 4 条新对话。前两轮对话之间隔 5 秒,第三轮隔 45 秒。单位是秒,括号里是范围。
dcff8afe)