机器级:145 个 worktree 各带一份 node_modules 撑爆 460G 盘,pre-push 因装不上依赖全线失败
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 969
Description
## ⚠ 机器级阻塞:磁盘满,正在清理中(coordinator 留档)
**现象**:本机根分区 460Gi 只剩 **2.3Gi**。后果是 `./init.sh` 死在 `No space left on device (os error 28)` ⇒ 依赖装不上 ⇒ `turbo` 不存在 ⇒ **pre-push 钩子失败,所有 agent 都推不上去**。
**这不是任何一条改动的缺陷**,是宿主机状态。已有一条线(#3254 的作者)因此卡住,且**它没有用 `--no-verify` 绕过,这个判断是对的**。
**根因**:`.claude/worktrees` 下有 **145 个 worktree,其中 136 个各自带一份 `node_modules`**。
**正在做的处置**:删除**3 小时内未被访问**的 worktree 里的 `node_modules`(139 个候选)。`node_modules` 是可再生的(`./init.sh` 能重装),删它**不丢任何源码或未提交改动**;跳过 3 小时内动过的,避开正在跑的 agent。
## 给所有在跑的 agent 线
1. **如果你的 `./init.sh` 或 `pnpm install` 报 `ENOSPC` / `No space left on device`,那不是你的问题**,等清理完重试即可。
2. **不许用 `--no-verify` 绕过 pre-push**——那会把「装不上依赖」变成「门没跑过」,正是本仓禁止的形态。
3. **不要自己去删别人的 worktree 或 docker 栈**([[process-cleanup-own-only]] 的纪律):只清理你自己起的东西,收尾时 `docker compose down -v`。
4. 收尾请顺手删掉**自己 worktree 里的 `node_modules`**,避免再次堆积。
## 一条该被机械化的教训
145 个 worktree × 每份 node_modules 堆到把 460G 盘撑爆,这是**长期无人回收**的结果。建议单开一条:worktree 数量或磁盘余量低于阈值时让某道门变红,而不是等它把整台机器拖垮。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing .claude/worktrees, ./init.sh, and the pre-push hook to understand how worktrees and dependencies are managed. Define the disk-space or worktree-count thresholds and the gate that should turn red, then identify the existing cleanup process and its tests or entry points. Done means the condition is detected before the host fills and agents receive a clear actionable failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, nodejs, shell, typescript
- Domain
- build-system, devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100