fix(desktop): forward Bitbucket auth to WSL #7620
main fromrefs/pull/7620/head·opened View on GitHubThe Windows desktop process did not forward Bitbucket credentials into its managed WSL backend. As a result, Bitbucket requests ran anonymously even when the credentials were configured in the Windows environment, eventually exhausting the anonymous API rate limit.
This adds all three supported Bitbucket credential variables to the existing WSL forwarding allowlist and extends the focused backend configuration test to verify both the child environment and generated WSLENV. Secret values remain in the child environment; WSLENV contains only their names.
Fixes #7621.
Related: #5840 documents the same missing-credential symptom on macOS. This PR is limited to the Windows/WSL launch path and does not claim to fix the macOS shell-profile path.
Validation:
vp test run apps/desktop/src/backend/DesktopBackendConfiguration.test.ts(23 tests)vp fmt --check apps/desktop/src/backend/DesktopBackendConfiguration.ts apps/desktop/src/backend/DesktopBackendConfiguration.test.tsvp run --filter @t3tools/desktop typecheck
Implemented with GPT-5.6 SOL (OpenAI Codex) via pi.
Note
Low Risk Small, targeted change to the existing WSL secret-forwarding list with matching unit test coverage; no new auth logic beyond env propagation.
Overview
Windows desktop → WSL backend now forwards the three supported Bitbucket credential env vars (T3CODE_BITBUCKET_ACCESS_TOKEN, T3CODE_BITBUCKET_EMAIL, T3CODE_BITBUCKET_API_TOKEN) using the same path as existing LLM keys: values on the WSL child env, and names appended to WSLENV when not already declared.
The resolveWsl WSLENV test was extended to assert those values and the updated WSLENV string while still preserving pre-existing entries and avoiding duplicate forwarding for vars already listed (e.g. OPENAI_API_KEY).
Note
Forward T3CODE_BITBUCKET_* env vars to WSL in DesktopBackendConfiguration#
Extends WSL_FORWARDED_ENV_NAMES to also forward T3CODE_BITBUCKET_ACCESS_TOKEN, T3CODE_BITBUCKET_EMAIL, and T3CODE_BITBUCKET_API_TOKEN into the WSL backend environment via resolveWsl, and appends their names to WSLENV when present. Updates the corresponding test to assert these vars reach config.env and that existing WSLENV entries are preserved.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved at
1aa2bfeMacroscope's review found this PR approvable — This change adds Bitbucket authentication environment variables to an existing list of credentials forwarded to WSL, following the established pattern for OpenAI and Anthropic keys. The modification is mechanical with appropriate test coverage.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
749b24be-b1b8-4702-a035-3e01f93ccac7You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share