Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): default MCP worktree launch keeps trailing Unicode whitespace in branch names #48236

Opensaphid(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/48236/headopened View on GitHub

Showing 2 changed files with 58 additions and 1 deletion.

x
0 of 2 viewed, 2 left
56 additions and 0 deletionsapps/server/src/mcp/toolkits/project/handlers.test.tsModified
View file
@@ -1100,6 +1100,62 @@
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
+it.effect(
+ "a defaulted worktree launch keeps trailing Unicode whitespace and disambiguated branch refs",
+ () =>
+ Effect.gen(function* () {
+ const fileSystem = yield* FileSystem.FileSystem;
+ const commitArgs = [
+ "-c",
+ "user.email=t@t",
+ "-c",
+ "user.name=t",
+ "commit",
+ "--allow-empty",
+ "-m",
+ "init",
+ ];
+ for (const [label, branch, tag, expectedBaseRef] of [
+ ["trailing NBSP", "main\u00A0", undefined, "main\u00A0"],
+ ["tag collision", "release", "release", "heads/release"],
+ ] as const) {
+ const repo = yield* fileSystem.makeTempDirectoryScoped({
+ prefix: "t3-launch-branch-name-",
+ });
+ const launched: Array<ThreadLaunch.ThreadLaunchInput> = [];
+ const { projectId, dependencies } = clientLaunchHarness({
+ runtimeModeCeiling: "auto",
+ launched,