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): a first message into a linked thread prepares its worktr… · pingdotgg/t3code@a8ae922

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/orchestration-v2
    • ThreadLaunchService.test.ts
    • ThreadLaunchService.ts
  • docs/internals
    • 05_remote.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/orchestration-v2/ThreadLaunchService.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/ThreadLaunchService.test.ts
+36Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3087,6 +3087,42 @@ it.live(
30873087
);
30883088
assert.isFalse(yield* fileSystem.exists(ran));
30893089

3090+
// A first message sent into an empty thread the link started names no link; the
3091+
// thread's own link still decides.
3092+
const emptyThreadId = ThreadId.make("thread:limited-empty");
3093+
yield* threads.dispatch({
3094+
type: "thread.create",
3095+
commandId: CommandId.make("launch:limited-empty:create"),
3096+
threadId: emptyThreadId,
3097+
projectId,
3098+
title: "Linked",
3099+
modelSelection,
3100+
runtimeMode: "full-access",
3101+
interactionMode: "default",
3102+
branch: null,
3103+
worktreePath: null,
3104+
createdBy: "agent",
3105+
creationSource: "mcp",
3106+
linkOrigin: {
3107+
sessionId: "mcp-session:linked",
3108+
label: "Linked laptop",
3109+
access: "auto-accept-edits",
3110+
},
3111+
});
3112+
yield* launches.launch({
3113+
...launchInput({
3114+
command: "launch:limited-empty",
3115+
thread: emptyThreadId,
3116+
message: "Start",
3117+
workspace: { type: "worktree", baseRef: "main", branch: "feature/limited-empty" },
3118+
}),
3119+
reuseExistingThread: true,
3120+
});
3121+
const reused = yield* preparationSettled(emptyThreadId);
3122+
assert.equal(reused.runs[0]?.status, "failed");
3123+
assert.isNull(reused.thread.worktreePath);
3124+
assert.isFalse(yield* fileSystem.exists(ran));
3125+
30903126
const full = yield* launch("full", "full-access");
30913127
assert.equal(full.runs[0]?.status, "starting");
30923128
assert.equal(yield* fileSystem.readFileString(ran), "create\n");
Collapse file

‎apps/server/src/orchestration-v2/ThreadLaunchService.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/ThreadLaunchService.ts
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,8 +1611,17 @@ const make = Effect.gen(function* () {
16111611
branch: workspaceStrategy.branch,
16121612
}
16131613
: workspaceStrategy;
1614+
// The thread's link decides, as it does when preparation is retried: a request
1615+
// that reuses a thread names none.
1616+
const { linkOrigin: _requestLinkOrigin, ...preparation } = input;
16141617
yield* schedulePreparation(
1615-
{ ...input, workspaceStrategy: preparationStrategy },
1618+
{
1619+
...preparation,
1620+
workspaceStrategy: preparationStrategy,
1621+
...(committedThread.linkOrigin === undefined
1622+
? {}
1623+
: { linkOrigin: committedThread.linkOrigin }),
1624+
},
16161625
threadId,
16171626
runId,
16181627
);
Collapse file

‎docs/internals/05_remote.md‎

Copy file name to clipboardExpand all lines: docs/internals/05_remote.md
+3-2Lines changed: 3 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ side lists and revokes it in Sharing & access like any other session, and owns i
3333
shared access rules ([`mcp/linkOrigin.ts`](../../apps/server/src/mcp/linkOrigin.ts)). Below full
3434
access, linked work can mutate only threads with the same origin, cannot touch projects, settings,
3535
scheduled tasks, or further links, and skips project setup scripts and worktree layout commands
36-
(a project that declares a layout gives such a thread no worktree). Full-access links are not
37-
fenced because their agents already run as the receiving OS user.
36+
(in a project that declares a layout, a worktree launch or handoff for such a thread fails;
37+
restoring a missing folder brings back plain checkouts). Full-access links are not fenced because
38+
their agents already run as the receiving OS user.
3839
- **Namespace idempotency keys.** All callers on the linking side share one session on the receiving
3940
side, so idempotency keys must be hashed with the caller's namespace before forwarding.
4041
- **Clients read linked threads as standard thread streams.**

0 commit comments

Comments
0 (0)
You are visitor 01402792 — 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.