Skip to content

fix(server): keep long multi-repo setup terminal ids distinct - #329

Merged
LoganRupe merged 1 commit into
multi-repo-workspacesfrom
fix/multi-repo/setup-terminal-ids
Sep 30, 2026
Merged

LoganRupe merged 1 commit into
multi-repo-workspacesfrom
fix/multi-repo/setup-terminal-ids

Conversation

@LoganRupe

Copy link
Copy Markdown
Owner

What Changed

Follow-up to #328, from Copilot's review there.

  • A setup terminal id over the 128-character limit now keeps a short hash of the full id instead of being cut off. Two repos whose names differ only near the end still get their own terminals. Before, they could share one, and reopening that shared terminal in the other worktree stopped the first repo's script. Normal-length ids are unchanged.
  • A new runner test checks that T3CODE_REPO_ROOT and the per-repo terminal id reach terminalManager.open. feat(server): run the setup script in every repo of a multi-repo worktree #328's server test mocked the runner, so it never covered this.

Why

The collision takes a very long script id or repo name, but when it happens a setup script is killed with no message. The env test closes the coverage gap Copilot pointed out.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 05:13
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused implementation correctly addresses the collision and includes appropriate regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Prevents collisions between long multi-repo setup terminal IDs while preserving existing IDs within the limit.

Changes:

  • Adds deterministic hash suffixes when generated IDs exceed 128 characters.
  • Verifies per-repo terminal IDs and T3CODE_REPO_ROOT propagation.
File Description
apps/​server/​src/​project/​ProjectSetupScriptRunner.ts Generates bounded, collision-resistant setup terminal IDs.
apps/​server/​src/​project/​ProjectSetupScriptRunner.test.ts Covers multi-repo environment propagation and long-ID distinction.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@LoganRupe
LoganRupe merged commit 4978dc4 into multi-repo-workspaces Sep 30, 2026
8 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants