GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): repositories whose folder name ends in a space keep that space in their root path by only21mil · Pull Request #41666 · pingdotgg/t3code

Conversation

@only21mil

@only21mil only21mil commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Problem

GitVcsDriver.detectRepository reads the repository root and Git common dir from git rev-parse and calls .trim() on each path. On Linux and macOS a folder name can end in a space, a non-breaking space or a carriage return, and .trim() removes it, so rootPath names a folder that does not exist. Two server checks then go wrong for such a checkout:

  • GitWorkflowService.withCheckoutLease takes its workspace lease on realPath(rootPath), falling back to the path itself. The trimmed path has no real path, so branch switches, branch creation, commit/push actions and local PR checkouts take a different lease than turn starts, checkpoint rollback, storage cleanup and terminals, which lease the real folder. They no longer wait for each other.
  • assertCheckoutIdle looks for projects nested under the root with startsWith(${root}/), which misses every nested project, so a busy thread in one does not block a branch switch.

RepositoryIdentityResolver (#35767) and GitVcsDriverCore's common-dir reader already remove only Git's final newline.

Change

detectRepository now removes only Git's final LF from the two path lines, in both the one-spawn answer and the per-path fallback used when a path holds a newline, and splits on LF alone. Git ends these lines with LF on every platform, so a CR before it belongs to the path, as in GitVcsDriverCore's layout read. The --is-inside-work-tree line is still trimmed, and an empty common dir still maps to null. One test is added to GitVcsDriver.test.ts.

Verification

An AI agent ran each check on Linux with no accounts.

Setup: Linux x86_64, Node 26.13.1, git 2.53.0, a throwaway repository in a temp folder named project (trailing space).
Steps: a small script that calls the real VcsDriverRegistry.detect on that folder, computes the checkout lease key the way withCheckoutLease does, and runs git -C <rootPath> status.

18d5eda8819f (main) a757dbd93abb (this PR)
rootPath …/project (does not exist) …/project
Checkout lease key matches turn-start key no yes
Nested pkg project found under root no yes
git -C <rootPath> status exit 128, cannot change to '…/project' exit 0
  • vp test run src/vcs/GitVcsDriver.test.ts: the new case covers roots ending in a space and in a carriage return, with common dirs ending in U+00A0, through both the one-spawn answer and the newline fallback. It fails on main (expected '…/repo' to equal '…/repo ') and passes here. Restoring the old CR-tolerant split, or .trim() on the fallback root alone, also fails it.
  • vp run check:changed: passes.

Generated with Claude Opus 5.5 in T3 Code Nightly

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@only21mil
fix(server): repositories whose folder name ends in a space keep that…
a757dbd
… space in their root path
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

detectRepository now preserves whitespace and carriage returns in Git-reported paths. A new test checks detection of working-directory paths with trailing spaces, carriage returns, or embedded newlines, and metadata paths ending in a nonbreaking space.

Changes: Repository path parsing

Layer / File(s) Summary
Parse and test repository paths
apps/server/src/vcs/GitVcsDriver.ts, apps/server/src/vcs/GitVcsDriver.test.ts
detectRepository removes only a trailing LF from Git output and no longer trims parsed paths. The added test checks detection of paths containing whitespace and carriage returns.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to d1b19

Repository detection now keeps trailing spaces and carriage returns in folder names, so paths match the real directory. The change is small and tested, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the actual change: detectRepository keeps trailing spaces in repository root paths on Linux and macOS, which the raw summary and objectives both confirm. It follows the conventional co…
Description check Passed The description covers the problem, the change, verification, and scope context. It explains the bug with reproduction steps on Linux, the fix in detectRepository, and a test. It names the agent and m…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the actual change: detectRepository keeps trailing spaces in repository root paths on Linux and macOS, which the raw summary and objectives both confirm. It follows the conventional commit form and is specific enough for a teammate scanning history. It is a bit long at 94 characters, but this does not affect the verdict.

Full details: Description check

Explanation

The description covers the problem, the change, verification, and scope context. It explains the bug with reproduction steps on Linux, the fix in detectRepository, and a test. It names the agent and model used, as the template asks. The Scope section does not link an issue, but it cites the related PR #35767 and says the fix matches existing behavior in GitVcsDriverCore and RepositoryIdentityResolver, which partly covers the bug-justification need. Verification is detailed and lists the commands and results, and it notes that the author ran check:changed. It does not state anything unverified, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: feee786
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c37d52a9-cb91-46fc-888f-68da965a6f16
Commits

Reviewing files that changed from the base of the PR and between a757dbd and d1b190e.

Files selected for processing: 1

  • apps/server/src/vcs/GitVcsDriver.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 23, 2026
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/server-git-detect…
d1b190e
…-repo-whitespace-path
@juliusmarminge

juliusmarminge commented Nov 23, 2026

Copy link
Copy Markdown
Member

Evidence

Real web app, Chromium, light theme, 1440×1000; fresh database on each commit. Created project with committed pkg and other subfolders and branches main/feature. Added both subfolders as projects, left a Replay question turn busy in pkg, completed a showcase turn in other, then selected feature from the idle thread's Branch picker.

Proven: base switches the shared checkout under the busy sibling; head refuses the switch and preserves main. scenarios:prove exited 0.

Before — feee7863ca After — d1b190e663
Before: feature selected while Busy pkg turn waits for Input After: busy-checkout error and branch remains main
Before recording After recording

Scenario driver

Not shown:

  • The separate checkout lease-key effect was not directly observed; this proof demonstrates the busy nested-project guard.
  • Other whitespace characters, separate Git metadata directories, and newline-path fallback behavior were outside this reproduction.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 23, 2026
@juliusmarminge
juliusmarminge merged commit 0514c1d into pingdotgg:main Nov 23, 2026
55 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 23, 2026
@only21mil only21mil mentioned this pull request Nov 23, 2026
fix(server): checkpoints work when a Git path ends in a space #41725
Merged
@tiliakoos tiliakoos mentioned this pull request Nov 24, 2026
fix(server): diff expansion works in a repository whose folder name ends in a space #41777
Merged
@patroza patroza mentioned this pull request Nov 24, 2026
Merge upstream main through 2fe7febc8d73 patroza/t3code#671
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@only21mil @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.