test: cover Claude stale symlink self-heal#5694
Conversation
Co-authored-by: multica-agent <github@multica.ai>
|
@vicksiyi is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
multica-eve
left a comment
There was a problem hiding this comment.
当用户安装的命令自行升级并清理旧版本后,后续工作仍应继续完成,无需重启或手工修复。这个行为值得保障,也符合产品预期。
Must-fix
server/internal/daemon/agent_path_selfheal_test.go:73 构造的是 ~/.local/share/claude/versions/<version>/bin/claude,但 #5683 的现场路径和复现步骤都是稳定链接直接指向可执行文件 ~/.local/share/claude/versions/<version>。当前夹具仍是“版本目录下再嵌套 bin/claude”的通用版本管理器形状,与已有 Codex 回归测试高度重叠;这个 PR 只新增测试,因此必须精确覆盖 Claude 原生安装器的真实布局,才能锁住报告中的回归。
请把 Claude 版本文件直接创建在 versions/<version>,并相应调整版本探测 stub(或让测试可执行文件真实输出 --version);保留旧目标删除、稳定链接重指向,以及 healed path / returned version / version cache 同步更新的断言。
定向测试与完整 go test ./internal/daemon -count=1 均通过;这说明当前夹具自洽,但不能替代对真实布局的覆盖。
🔄 Request changes:产品方向正确,但上述测试夹具必须先修正。
|
up |
Co-authored-by: multica-agent <github@multica.ai>
|
Addressed the requested Claude native installer fixture correction in b5b25bb.
Validation:
GitHub CI is green on the pushed commit. |
What does this PR do?
Adds regression coverage for GitHub #5683, where Claude Code's stable command symlink can be pinned to a versioned executable path at daemon startup and later disappear after Claude auto-updates and garbage-collects the old version directory.
The daemon's built-in
resolveAgentEntrypath already re-resolves vanished pinned executables for built-in providers. This PR makes the Claude native-installer shape explicit so future changes cannot accidentally leave this coverage Codex-only.Related Issue
Closes #5683
Multica: ZIC-107
Type of Change
Changes Made
server/internal/daemon/agent_path_selfheal_test.go.How to Test
cd servergo test ./internal/daemon -run 'TestResolveAgentEntry'go test ./internal/daemonChecklist
apps/web/features/landing/i18n/) and relevant docs (apps/docs/content/docs/) (N/A)apps/docs/content/docs/developers/conventions.zh.mdx(terminology, mixed-rule fortask/issue/skill) (N/A)AI Disclosure
AI tool used: Multica Agent
Prompt / approach:
Traced daemon executable resolution and self-heal behavior, then added focused regression coverage for the Claude native-installer symlink/update layout described in GitHub #5683.
Screenshots (optional)
N/A