Repository navigation
fix(git): a git timeout is said, never read as clean or not-a-repo (#1250 row 11) - #1429
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review disposition, round 1: reviewers a and b (head
|
| Finding | Disposition |
|---|---|
a1 / b1: worktrees.read dropped the timeout, so an agent read a slow repo as "not a repository" |
Fixed. It reports gitTimedOut, and the description says so. The test goes through execute (output schema validated) with the real loadWorktreeDump. It fails on the previous head and kills b's surviving mutation. |
| b2: the conversation-picker family, worktree activity and the agent-activity repo root still read a timed-out list as empty | Split into #1430. These are other features' consumers of the plain list; each self-heals on the next call. The issue names each one and the fix direction (listWorktreesForCwdDetailed exists after this PR). |
b3: renderer history context passes [] on a timed-out catalog |
Split into #1430 (same class; a live catalog refresh may correct it). |
Verification: npx tsc -b is clean; the new control test passes, 1/1.
🤖 Generated with Claude Code
… stays main (#1429 review c) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewer c (FIX-BEFORE-MERGE on test gaps; it reviewed
🤖 Generated with Claude Code |
#1429 verification a) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verification: a FIX-BEFORE-MERGE (a test gap), b MERGE-READY. Addressed in Round count: round 1 and verification are done, so the review is capped. The PR waits for CI and the manager check. 🤖 Generated with Claude Code |
|
Correction to the reviewer c disposition (manager-verified at 1a379f7). c8e858c does not fix c1 or c3. It adds tests and one comment, because the code was already correct. Each finding was a test gap:
Residual: M15 survives. The timed-out status line in 🤖 Generated with Claude Code |
Refs #1250 (row 11). #1250 is a batch issue, so the other rows stay open.
Problem
Every git failure in
src/main/ipc/git.tsreturns''by a documented contract, and only a missing binary was ever told apart (#495 A5). In a large repo, or on a busy disk, a command that hit the runner's 5 s timeout therefore read as "no output":git statusmade a dirty worktree read CLEAN. A timed-outgit cherryread as zero patch-unique commits, making the row "patch-equivalent", a cleanup suggestion. The result was cached for 30 s.Change
runGitCommandrecognises execFile's timeout (killedwithSIGTERM) and marks theAsyncLocalStoragetrace captured when the command was queued.''is still returned, so no existing caller changes.git statuscounts as dirty;statusTimedOutand categoryreview(never a cleanup category);git:worktrees,git:worktree-statusandgit:status: a timed-out probe answers{ ok: false, gitMissing, timedOut: true }. A GitBar status with a later timeout answersincomplete: true.worktrees.read(control) reportsgitTimedOut.Plan:
docs/plans/2026-09-27-git-timeout-not-clean.md.Tests
src/main/ipc/git.timeout.test.ts: the real handlers and runner, withexecFilereplaced to time out chosen commands the way Node does.review; a timed-out cherry is never patch-equivalent; that row is not cached.timedOut; a timed-out log givesincomplete.GitBar.renderer.test.tsxand additions toWorktreesBar.renderer.test.tsx: the timeout copy, the incomplete note and the row chip. All red on the base.worktrees/control.renderer.test.ts:worktrees.read, throughexecute, tells a timeout from "not a repository".Verification
rm -rf .tsc-out; npx tsc -b: clean.NODE_ENV=test npx vitest run src/main/ipc src/renderer/src/features/git src/renderer/src/features/worktrees: 93/93.🤖 Generated with Claude Code