Skip to content

fix(antigravity): guard WSL /mnt rule, bound install dedupe set, and short-circuit sign-in lookup - #51591

Merged
nwparker merged 1 commit into
mainfrom
fix/release-scan-267delta-slice-a
Nov 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
fix/release-scan-267delta-slice-a

Conversation

@nwparker

@nwparker nwparker commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the remaining still-present issues from the 1.4.267 delta release scan (Slice A: Antigravity / installer / sign-in):

  • STA-16724 (src/main/acp/launch/acp-launch-command.ts, src/main/wsl/filesystem/wsl-guest-windows-drive-path.ts): Restrict the WSL /mnt/<drive> rejection in findHostProgram to actual WSL guests (using async WSL detection and /proc/mounts drive mount discovery via readGuestWindowsDriveMountsAsync / isWslGuestProcessAsync) instead of rejecting /mnt/<letter>/... unconditionally on native Linux. In WSL guests, strip Windows drive mount entries from PATH before resolving so a native Linux binary later on PATH is not shadowed by a Windows copy.
  • STA-16726 (src/renderer/src/runtime/hosts/installation/use-managed-runtime-install.ts): Bound the module-level reDetectedAfter Set<string> with a FIFO cap (MAX_RE_DETECTED_OPERATIONS = 128) so completed installer operation IDs are not retained unboundedly for the lifetime of the renderer.
  • STA-16708 (src/renderer/src/components/native-chat/host-access/native-chat-sign-in-account.ts): Short-circuit nativeChatSignInAccount when unavailable or launchDetails already determines the sign-in account instead of eagerly calling currentFailure(items, submissions), and skip scanning transcript items in currentFailure when the latest submission's sequence is already newer than the last item in the transcript.

(Note: STA-16725 was already fixed on main in #46368 and STA-16727 was already fixed on main in #48305; both were closed as Done in Linear.)

Performance

  • No main-thread blocking: WSL guest detection and /proc/mounts reading in findHostProgram use node:fs/promises (access, readFile) via isWslGuestProcessAsync / readGuestWindowsDriveMountsAsync and cache the parsed mount list after the first read.
  • Bounded renderer memory: reDetectedAfter is capped at 128 entries with FIFO eviction.
  • Avoided transcript walks: nativeChatSignInAccount no longer walks items when unavailable or launchDetails already provides the account, or when the latest submission is strictly newer than the last journal item.

Verification

  • timeout 900 pnpm check:changed passes all 40 checks (format, oxlint, typecheck, unit tests including new src/main/acp/launch/acp-launch-command.test.ts, and all ratchets).
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​50 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​50
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​109 $\color{#cf222e}{\Huge{\mathbf{−}}}$​16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​93

…short-circuit sign-in lookup

- STA-16724: only filter Windows drive mounts in findHostProgram on WSL guests
  using async WSL/mount checks so native Linux /mnt/<x> installs are kept.
- STA-16726: cap reDetectedAfter Set in use-managed-runtime-install.ts at 128
  entries with FIFO eviction.
- STA-16708: short-circuit nativeChatSignInAccount before walking transcript
  history when unavailable, launchDetails, or a newer submission already decides.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes update WSL-aware host program lookup, native chat sign-in account selection, and managed runtime install operation tracking. Host program lookup filters Windows drive mounts and applies WSL-specific path checks. Native chat failure and account selection use updated sequence and precedence rules. Runtime install tracking limits remembered operation IDs to 128.

Merge Risk: Minimal · up to 06d3f

This change makes host program lookup distinguish real WSL guests from native Linux, tightens sign-in account selection, and bounds a renderer set. No concrete merge-blocking defect was found. A narrow gap remains for WSL setups with a custom automount root, but it predates this change.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names three changes: a WSL /mnt rule guard, a bounded install dedupe set, and a short-circuit for sign-in lookup. Each matches a change in the raw summary. The title is long and lists three …
Description check Passed The description follows the repository template in structure and covers the main sections: summary of the three fixes, performance, and verification. It has gaps. The ELI5, What Changed (before/after …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names three changes: a WSL /mnt rule guard, a bounded install dedupe set, and a short-circuit for sign-in lookup. Each matches a change in the raw summary. The title is long and lists three items, so it is broader than a single primary change. It still describes real changes in the changeset and is not misleading.

Full details: Description check

Explanation

The description follows the repository template in structure and covers the main sections: summary of the three fixes, performance, and verification. It has gaps. The ELI5, What Changed (before/after as a user sees it), Why, Linked Issue ("Fixes #" is blank, and the description cites Linear IDs instead of a linked issue), Visual Proof, Risk level, and Testing checkboxes are missing or unfilled. The author also did not state the rationale over alternatives. These are gaps in required sections, but the description is largely complete in substance.

Resolution

Fill in the template sections that are blank or missing: ELI5, a before/after explanation for the user, the rationale for the chosen approach, a linked issue (the "Fixes #" line is empty), a Visual Proof entry or an N/A with reason, the Risk level with a rollback note, and the Testing checkboxes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1a55c32a-8218-43f3-aa18-8e597babc2b5
Commits

Reviewing files that changed from the base of the PR and between 3a0c78c and 06d3fc1.

Files selected for processing: 5

  • src/main/acp/launch/acp-launch-command.test.ts
  • src/main/acp/launch/acp-launch-command.ts
  • src/main/wsl/filesystem/wsl-guest-windows-drive-path.ts
  • src/renderer/src/components/native-chat/host-access/native-chat-sign-in-account.ts
  • src/renderer/src/runtime/hosts/installation/use-managed-runtime-install.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@nwparker
nwparker merged commit 1a1065e into main Nov 28, 2026
56 checks passed
@nwparker
nwparker deleted the fix/release-scan-267delta-slice-a branch November 28, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant