refactor(account): centralize account runtime ownership - #2173
Open
zvzuola wants to merge 1 commit into
Open
Conversation
limityan
approved these changes
Aug 9, 2026
limityan
left a comment
Collaborator
There was a problem hiding this comment.
总体结论:Approve。
本次重构在 CLI / Embedded 范围内完成了账户运行时所有权收敛:CliRuntimeContext 只构造一个共享 Arc<AccountRuntime>,Embedded App Server、Peer Host、启动恢复和 settings-sync loop 使用同一实例;Shared 路径没有创建本地账户 owner,并继续对 Account / Sync / Worktree 能力 fail closed。未发现需要阻止该重构方向的 P0/P1 问题。
本地 exact-head 验证已通过:
git diff --check- Core no-default-features 与 agent-runtime checks
- AccountRuntime 聚焦测试(4 passed)
- App Server 测试(43 passed)
- CLI product assembly 合同测试(15 passed)
pnpm run check:core-boundaries
建议后续补充但不阻塞本次批准:
AccountLoginResult::routing_owner_replaced已保留 daemon owner 被替换的事实,但 App Server 的登录状态消息没有投影该字段。建议恢复“旧 daemon 已停止、需重启 daemon 才能恢复 always-on routing”的提示。- 建议恢复迁移前覆盖 daemon retirement、pending replacement、token revoke、并发候选登录和 routing lease 的关键行为等价性测试。
- Settings sync 的 upload / fetch / apply 路径建议恢复分阶段错误上下文。
合并门禁:当前 exact-head 的 CLI Tests (macos-15) 仍失败,失败点是本 PR 未修改的 dispatch cancellation timing test。请先定位/处理该问题并确认 required checks 全绿,再合并。
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.
Summary
Fixes #
Type and Areas
Type:
Areas:
Motivation / Impact
Verification
Reviewer Notes
Checklist