Lanes are never pruned after their PR merges (76 lanes / ~128 GB locally)
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- git, github, typescript
- Domínio
- developer-experience, tooling
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 1
- Forks
- 0
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de githubnext/ace2
-
documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
githubnext/ace2#530 · 1 comentário ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
githubnext/ace2#437 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
githubnext/ace2#528 ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 20/100
githubnext/ace2#511 ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
githubnext/ace2#506 ·
Todas as issues de githubnext/ace2
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
getsentry/sentry-conventions#732 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
status:in-linear status:team-assigned team:nodes
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
n8n-io/n8n#41548 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
motiondivision/motion#3955 ·
Mantenedores costumam responder em até 1 dia
-
DQ assisgnment closing at CRAbertaenhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
equinor/prisma-decision-web#919 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 83/100