fix(cli): a `--global` rebuild for a newer release keeps the files that release removed

未关闭
#1,230 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
build-system, cli

调研方向

Start in cli/src/contexts/framework/application/shared/ensure-built-marketplace-use-case.ts: compare the stale-sentinel path that reaches runBuild with buildViaTemp, which already clears the built directory first. Check open PR #1145, which proposes the same deleteDirectory fix, before starting. Done when a --global upgrade from v5.13.0 to v5.14.0 leaves the built folder with the same file count as a clean v5.14.0 install (540 files).

由索引模型根据 Issue 内容生成。

描述

Description

The built framework lives at ~/.config/aidd/cache/built/<cli version>/ (the path carries the CLI version, not the framework release). When the same CLI moves a --global install to a newer release, the build is written over the previous one, and the files the new release removed stay. Claude Code still lists the skills and agents among them.

Cause: in ensure-built-marketplace-use-case.ts, when the sentinel is stale (l.126-129), build reaches runBuild (l.176-188), which writes into builtDir without clearing it. buildViaTemp clears it first (l.168).

Open PR #1145 already adds deleteDirectory(builtDir) before the build ("a new build must not inherit deleted files"). This issue gives it a reproduction and a measured scope.

Affected file(s)

cli/src/contexts/framework/application/shared/ensure-built-marketplace-use-case.ts

Expected behaviour

After moving to v5.14.0, the built folder holds exactly the files of a clean v5.14.0 build.

Observed behaviour

In an empty HOME (XDG_CONFIG_HOME=$HOME/.config, AIDD_USER_CONFIG_DIR=$HOME/.config/aidd, CLAUDE_CONFIG_DIR=$HOME/.claude, AIDD_SKIP_UPDATE_CHECK=1), with aidd 5.7.0:

aidd setup --global --source remote --release v5.13.0 --ide claude \
  --plugins aidd-context,aidd-dev,aidd-orchestrator,aidd-pm,aidd-refine,aidd-vcs --yes
aidd setup --global --source remote --release v5.14.0 --ide claude \
  --plugins aidd-context,aidd-dev,aidd-orchestrator,aidd-pm,aidd-refine,aidd-vcs --yes

Compared with a clean v5.14.0 install in another empty HOME:

  • 603 files against 540: 63 files survive, in 4 plugins (aidd-context 40, aidd-dev 13, aidd-refine 8, aidd-ui 2).
  • claude plugin details aidd-dev@aidd-framework: Agents (2) checker, executor, against Agents (0) on the clean install.
  • claude plugin details aidd-refine@aidd-framework: 6 skills, with 05-improve beside 05-review-conversation (renamed by #1068), against 5 on the clean install.
  • Whole removed skills that survive: aidd-refine/05-improve, aidd-ui/01-hello. Also aidd-context/hooks/update_memory.js.
  • aidd sync --global --force rebuilds without removing them.
  • aidd doctor --global: "User-scope installation is healthy".
AI tool

Claude Code

aidd-cli version

5.7.0

OS

Linux

Additional context

Claude Code 2.1.325. The v5.14.0 tag holds no 05-improve, and there is no symlink under ~/.config/aidd/cache/built.

Code of Conduct
主要语言
TypeScript
星标
481
派生
45
平均合并
1 天 13 小时
30 天内合并 PR
91

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ai-driven-dev/framework 的其他 Issue

查看 ai-driven-dev/framework 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。