Repository navigation
fix(tray): 修正宿主页 Skill 版本误判与 Claude 待重开误报 - #593
Merged
Merged
Conversation
- 标着比 App 新的 Skill 副本,只在本机服务不低于该版本时保留,否则按过期副本备份后替换;保留时宿主页照实显示版本 - open_tray.sh 在 Claude Code 会话里启动 App 时去掉 CLAUDE_CONFIG_DIR,避免默认 Claude 行与具名账号行指向同一文件、互相改写 AGENTNAVE_HOST_APP 而一直待重开 - 测试覆盖:服务不够新时替换、够新时保留;旧进程已重连时消除待重开、仍有旧中继时保留
Owner
Author
独立评审记录(PR #593)
Findings 裁决与处置
验证与 CI 状态
剩余风险
|
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.
问题
1.18.0。App 只替换比自己旧的 App 副本,所以一直不换它,界面上却显示「未能安装,点「刷新检测」重试」,点了也没用。install_local.sh在 Claude 会话里拉起 App),继承了该会话的CLAUDE_CONFIG_DIR。按 ADR-0118,App 把它当成默认账号的目录,于是默认 Claude 行和具名账号行指向同一个文件,每次刷新互相改写AGENTNAVE_HOST_APP。记下的配置变更永远对不上当前配置,任何连接回执都证明不了已经生效。改动
hosts/actions.rs:新增keeps_newer_skill。比 App 新的副本,只有本机服务版本不低于它时才保留,否则按过期副本走现有的备份替换流程。hosts.rs:读取本机服务版本的写法抽成service_version,这里要用第三次,原来已有两处重复,reload.rs改为调用它。hosts/snapshot.rs和ui/hosts.js:合法保留的新副本在 Skill 状态里带上newer,界面显示v<版本> · 比 App 新,不再提示刷新重试。scripts/open_tray.sh:在 Claude Code 会话里(设了CLAUDECODE)启动 App 时,去掉CLAUDE_CONFIG_DIR,和脚本原来去掉CLAUDECODE、T3 变量是同一类处理。hosts/tests.rs:current,旁边还有一条旧连接时判为required。这组只是把现有规则固定下来,在改动前的代码上也会通过。验证
apps/tray下:cargo fmt --check、cargo clippy --all-targets -- -D warnings、预览版 clippy 都通过。cargo test:653 个通过,1 个失败,是已知偶发超时的detect::tests::listing_commands_get_empty_stdin_*,单独重跑通过。和 bot 账号分支合并后,cargo test hosts::124 个全部通过。feat/bot-accounts合并后用--dogfood装上,结果如下。CLAUDE_CONFIG_DIR。~/.claude.json。1.18.0旧 Skill 已自动备份,并换成1.17.0。v1.17.0。newer标记,真机上没有能触发它的场景。遗留
App 如果从别的途径带着某个账号的
CLAUDE_CONFIG_DIR启动,默认行和具名账号行仍会抢同一个文件。ADR-0118 没规定这种情况该怎么处理,本 PR 不改。🤖 Generated with Claude Code