Repository navigation
Git read hygiene and PR polling: optional locks, untracked cap, GHE hosts, settled cadence, longpaths (#1520, #1523) - #1548
Conversation
Background status/diff refreshed the index and took index.lock, which could fail the agent's own commit. One gitEnv builder now feeds every local git spawn (gitOut, gitTry, gitOutAsync, gitTryAsync, services-git gitOutAsync) and sets the var only for read subcommands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Changes scan read every untracked file synchronously on the main process just to count lines. A build dir with no ignore rule stalled the UI. Past the cap, files still list but report 0 lines, like binaries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gitEnv appends GIT_CONFIG_KEY/VALUE_<n> after any GIT_CONFIG_COUNT the user already set, so every local git spawn handles long Windows paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settled threads were polled every 5 min like active ones. Skipping them outright would strand merged-worktree reclaim, so they now poll at the first pass at least 10 min after the last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
isGitHubRemote only matched github.com. It now accepts any host gh is logged into (hosts.yml keys, GH_HOST) and resolves ~/.ssh/config aliases once via an async, cached `ssh -G`. PR callers await isGitHubRemoteAsync so an alias is resolved before the first check; sync callers read the cache. gh already picks the host from the repo's remotes, so its calls need no --hostname. slugFromRemoteUrl now parses alias:owner/repo too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…1523) The sync isGitHubRemote returns false for an ssh alias until its ssh -G lookup lands, so the first Planboard call on such a remote reported "not a GitHub repo". Every caller here is already async. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78c4a024e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const real = resolveSshHost(r.host); | ||
| return typeof real === "string" && hosts.has(real); |
There was a problem hiding this comment.
Await SSH alias resolution in issue workflows
When a repository origin uses a previously unseen SSH alias such as work-gh:owner/repo, resolveSshHost() returns a pending Promise and this synchronous path therefore returns false. Several asynchronous issue/Planboard operations still call isGitHubRemote() directly (electron/issues.js, including fetch, edit, reopen, complete, comment, and create), so the user's first operation is rejected as “not a GitHub repo”; it only begins working nondeterministically after the background ssh -G callback populates the cache. Those callers should await isGitHubRemoteAsync() just like the PR callers changed in this commit.
Useful? React with 👍 / 👎.
#1550 moved PR/issue ops to the GitHub API behind isGitHubPrRemote. Keep that at every call site and feed it the gh-host/ssh-alias aware isGitHubRemoteAsync (#1523), so GHE works through the API or gh. Planboard (issues.js) and revertPr.js also use the async check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…giene-pr-polling-0edb0e # Conflicts: # electron/crewIntegration.js # electron/issues.js # electron/worktrees-pr.js # electron/worktrees.js
Keep gitlabOrigin next to isGitHubRemoteAsync so checkout still resolves SSH-aliased GitHub hosts after the #1548 remote helper. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep gitlabOrigin next to isGitHubRemoteAsync so checkout still resolves SSH-aliased GitHub hosts after the #1548 remote helper. Co-authored-by: Cursor <cursoragent@cursor.com>
#1550 moved PR/issue ops to the GitHub API behind isGitHubPrRemote. Keep that at every call site and feed it the gh-host/ssh-alias aware isGitHubRemoteAsync (#1523), so GHE works through the API or gh. Planboard (issues.js) and revertPr.js also use the async check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #1520. Closes #1523. One commit per item.
#1520
gitEnv(args)(electron/worktrees-git.js) now builds the env for every local git spawn (gitOut,gitTry,gitTryAsync,gitExecThrowAsync,services-git.jsgitOutAsync). Read-only subcommands getGIT_OPTIONAL_LOCKS=0, so background status and diff calls no longer takeindex.lockwhile the agent is committing. Writes are unchanged.#1523
gitEnvappendscore.longpaths=truethroughGIT_CONFIG_COUNT/KEY/VALUE, after any entries that are already set.isGitHubRemoteaccepts any host in gh'shosts.ymlorGH_HOST(GitHub Enterprise). sshHostaliases are resolved once withssh -Gand cached. That call uses execFile, so no shell, rejects names starting with-, and reads only the local config. The async callers awaitisGitHubRemoteAsync.slugFromRemoteUrlnow accepts[user@]alias:owner/repo.Tests:
worktrees-git,worktrees,diff-scopesandpr-refresh. Full electron suite: 4350 pass, 0 fail (clean env).Part of the #1532 gap pass.
🤖 Generated with Claude Code