Conversation
Repository selection elicitations sent the configured git URL as the select-signal option value. When the URL embeds an access token it exceeds Linear's 100-character option value limit, so the elicitation failed to post and the session stalled. It also transmitted credential-bearing URLs to Linear. Options now use the configured repository name (truncated to Linear's 100-character limit), and response matching resolves names first while keeping URL matching for compatibility.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c421b4eef0
ℹ️ 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".
| // sent to Linear) and can exceed Linear's option value length limit. | ||
| const options = workspaceRepos.map((repo) => ({ | ||
| value: repo.githubUrl || repo.gitlabUrl || repo.name, | ||
| value: repo.name.slice(0, MAX_SELECT_OPTION_VALUE_LENGTH), |
There was a problem hiding this comment.
Preserve unique repository option values
When two workspace repositories have distinct git URLs but names that share the same first 100 characters, this emits duplicate select option values. Linear sends only the selected value back, and selectRepositoryFromResponse matches that truncated value by scanning workspaceRepos in order, so selecting the later repository routes the session into the first one instead. Use a unique non-secret value per repository rather than truncating names alone.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@litnimax I like this code comment from codex, would like to see that.
This is a nice fix though 👍
will be happy to approve
Connoropolous
left a comment
There was a problem hiding this comment.
just requesting the codex changes 👍
past that should be an easy merge
Problem
When no routing rule matches an issue,
RepositoryRouterposts a repository-selection elicitation to Linear with the configured git URL (githubUrl/gitlabUrl) as the select-signal option value. Linear rejects option values longer than 100 characters, so for repositories whose configured URL embeds an access token (e.g.https://user:github_pat_...@github.com/org/repo), the elicitation always fails and the session stalls with an error:Worse, this transmitted credential-bearing git URLs to Linear as part of the mutation payload, and the resulting SDK error logged them in plaintext.
Fix
name(a required config field, and what users should see anyway), truncated to Linear's 100-character limit. Git URLs are never sent to Linear.selectRepositoryFromResponseresolves names first (including the truncated form) and keeps URL matching for compatibility.Testing
pnpm test:packages:runandpnpm typecheckpass.