Lanes are never pruned after their PR merges (76 lanes / ~128 GB locally)
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- git, github, typescript
研究方向
Start with apps/host/src/manage.ts and apps/app/src/git.ts, then read packages/channel/src/lanes.ts and the lane CLI guidance in AGENTS.md. Trace how channel removal and PR state are handled, and check how git fetch --prune and lane prune report lanes they retain. Done when merged lanes are pruned by the host and retained lanes have a visible reason.
由索引模型根據 Issue 內容生成。
描述
Summary
Lanes are never removed after their PR merges. On one dev machine, ace2 had built up 76 lanes taking about 128 GB, and 59 of them belonged to PRs that had already merged. The lane lifecycle (https://lane.lukeed.com/usage/) expects lane prune to remove landed lanes. In practice, nothing in Ace runs it, and with our merge setup it can't recognise most of our lanes as landed anyway.
What's happening
1. Nothing runs lane prune.
- The only mention is in agent instructions:
AGENTS.md:71andAGENTS.md:109say to runlane prune"once it merges". - The agent's turn ends at
gh pr create. The merge happens later on GitHub, and nobody comes back afterwards. remove()inapps/host/src/manage.ts:278removes only the older worktrees kept in the channel directory, and only when a channel is deleted. Lanes created bylane neware deliberately left "forlane pruneorlane rm". Channels that are archived or simply kept retain all their lanes.
2. lane prune didn't treat our merged lanes as landed.
- Per
AGENTS.md:71, prune removes a lane once its remote branch is gone or localmaincontains its work. - Until today githubnext/ace had
delete_branch_on_merge: false, and AGENTS.md says to merge without--delete-branch, so remote branches stayed after merging. Example:fair-ember/canary-0-0-13(#115, merged Oct 5) was still on origin. - PRs are squash-merged, so
mainnever contains the lane's commits. - Lanes from before Ace adopted the lane CLI (in
~/.local/state/ace*/channels/*/lanes, created before about Oct 13) have no landing record fromlane push, so prune reportslanded outside lane. - As a result,
lane lsshowed 63 lanes aspushedand none aslanded.lane prune --dry-runlisted 6 skipped lanes and said nothing about the other 70, so they were invisible as well as kept.
Breakdown at the time:
| Kind | Count | PR status |
|---|---|---|
| Lanes in the channel directory (pre-lane CLI) | 70 | 57 merged, 2 closed, 11 never had a PR |
lane new lanes, .lane/trees |
6 | 2 closed, 4 never had a PR |
Done so far
- "Automatically delete head branches" is now on for githubnext/ace. Merges from now on should delete the remote branch, so
git fetch --prune && lane pruneought to catch them. This hasn't been verified yet on a lane that merged after the change. - One-off local cleanup: I removed 51 merged lanes from the channel directory with
git worktree remove. Each one was clean, and its HEAD equalled the merged PR'sheadRefOid.
Proposal
- Have the host run
git fetch --prune+lane pruneitself.- On host start, or periodically.
- When it sees a channel's PR become merged.
apps/app/src/git.tsalready tracks PR state. - In
remove()when a channel is deleted, instead of leaving its lanes behind.
- Surface lanes prune refuses. The
landed outside laneandcommits main does not havecases should appear somewhere visible, so they aren't left on disk indefinitely. - Retire the pre-lane-CLI path. After a one-time migration that drops merged lanes from the channel directory, the
lanesloop inremove()and therecorded?.pathfallback inpackages/channel/src/lanes.tscan go. - Possibly upstream in lane: have
lane prune --dry-runlist every lane it keeps and why, not only some of them. A lane that ispushedwith an existing remote branch is currently omitted silently.
- 主要語言
- TypeScript
- 星號
- 1
- 分支
- 0
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
githubnext/ace2 的其他 Issue
-
documentation
難度 2/5 1-3 小時 新手友好度 76/100
githubnext/ace2#530 · 1 則留言 ·
-
難度 1/5 1 小時以內 新手友好度 88/100
githubnext/ace2#437 ·
-
難度 4/5 3-5 天 新手友好度 45/100
githubnext/ace2#528 ·
-
難度 5/5 一週以上 新手友好度 20/100
githubnext/ace2#511 ·
-
難度 5/5 一週以上 新手友好度 25/100
githubnext/ace2#506 ·
相似的 Issue
-
area: repo priority: P2 type: bug
難度 2/5 1-3 小時 新手友好度 76/100
appandflow/stim#4107 · 1 則留言 ·
維護者通常 1 天內回覆
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難度 1/5 1-3 小時 新手友好度 60/100
lingdojo/kana-dojo#32859 · 1 則留言 · 5 個 reaction ·
維護者通常 1 天內回覆
-
code-quality refactoring
難度 2/5 1-3 小時 新手友好度 78/100
github/gh-aw-firewall#10364 ·
維護者通常 1 天內回覆
-
Merge the duplicate kaffir_corn record into sorghum可能已有人在做 @Crypto-Shroom 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 65/100
Crypto-Shroom/Bird-Feed-Calculator#322 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
drizzle-team/drizzle-orm#6552 ·
維護者通常 2 天內回覆