poteto-mode worktree cleanup: untracked files are labelled "scratch, safe to drop", and paths with spaces are truncated
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 65/100
Rechercherichtung
Start by reading scripts/worktree-audit.sh and playbooks/worktree-cleanup.md, then reproduce both defects: a merged-branch worktree with an untracked new-provider-parser.ts, and a worktree path containing a space. The audit needs to hold non-ignored untracked files instead of calling them scratch, parse git worktree list --porcelain -z so full paths survive, and mark failed git inspections as unknown rather than clean. Update the playbook wording and add tests for untracked-only, spaced-path, and git-failure cases; done when those tests pass and the audit no longer labels such work safe.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Found against pstack 0.15.34 at cursor/plugins 519d36aa98955bf680db01bcde5fdfba686dc901 (harness/pstack/claude-code/skills/poteto-mode/). Line numbers refer to that commit.
scripts/worktree-audit.sh, together with playbooks/worktree-cleanup.md, can lead an agent to delete work that
exists nowhere in git. There are two defects.
A. Untracked files are classed as disposable.
worktree-audit.sh:93-97: a worktree whosegit status --porcelainhas only??lines becomesscratch:N. The
bucket logic (:125) then rates itsafewhen the branch is merged or has a PR.worktree-cleanup.md:6says "scratch:Nis untracked throwaway, safe to drop", and step 7 runs
git worktree remove --force <path>.
Being untracked doesn't make a file disposable. A new source file that hasn't been git added yet is the most common
form of unfinished work.
Repro:
- Create a worktree on a branch that is already merged (or has a merged PR).
- Add an untracked
new-provider-parser.tswith unfinished code. - Run the audit. The row is
scratch:1, bucketsafe. - Follow the playbook. The worktree is force-removed and the file is lost, without the decision the playbook requires
for tracked WIP.
B. Path parsing and failed inspection.
worktree-audit.sh:31and:80useawk '{print $2}'ongit worktree list --porcelain, which drops everything
after the first space. A worktree at/tmp/my worktrees/branch-oneis read as/tmp/my.:93:git -C "$wt" status --porcelain 2>/dev/null. When$wtis wrong or git fails, the output is empty and the
row is reported asclean, so a failed inspection looks safe.:115-116: transcript matching passes the path torg -eas a regex (.and+match other paths), and
xargs statsplits filenames on whitespace.
Repro (parsing):
Input: worktree /tmp/my worktrees/branch-one
Output: /tmp/my
Suggested fix:
- Treat untracked files that aren't ignored as WIP (
hold-wip), the same as tracked edits. Only drop them after the
user has confirmed them by name, or after they have been preserved (stash with-u, or copied out). Change the
playbook text to match. - Parse
git worktree list --porcelain -z(NUL-delimited) and keep the full path. - When
rev-parse,logorstatusfails, make the rowunknown/ held, neverclean. - Use
rg -F(fixed strings) for the transcript match, andrg -l0 … | xargs -0 stat. - Add tests for a worktree with only untracked files, a path with a space, and a git failure.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 18.2k
- Forks
- 2k
- Ø Merge
- 3 Std. 56 Min.
- Gemergte PRs (30 T.)
- 96
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cursor/plugins
-
pstack: interrogate asks the user, which worker.md forbids for delegates that reach itEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
cursor/plugins#1272 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
poteto-mode: multi-phase-plan Merge placeholder still appends every PR to a base-branch stackEvtl. vergeben @mangeshraut712 hat das vor 15 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
typescript-best-practices: schema example uses z.string().uuid(), deprecated in Zod 4Evtl. vergeben @mangeshraut712 hat das vor 14 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
cursor/plugins#1165 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
statechart: relative-symlink launcher test fails on macOS because /var is a symlinkEvtl. vergeben @lnuxe hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
cursor/plugins#1164 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
pstack docs/harness/claude-code.md: transcript slug replaces every non-alphanumeric character, not only / and .Evtl. vergeben @isTuhin hat das vor 9 Tagen übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
cursor/plugins#1155 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
infra needs-triage
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
LucasSantana-Dev/Lucky#3331 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
kOaDT/oss-oopssec-store#381 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
nocobase/nocobase#11669 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
iOS: Clear Context (/clear) and model picker fallback use negative agent check instead of isClaudeOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Area: API Bug Difficulty: Low Priority: Low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
DouglasNeuroInformatics/OpenDataCapture#1937 ·
Maintainer antworten meist innerhalb von 1 Tag