Skip to content

fix(RovoDev): store binary bundle in global storage instead of per-workspace - #1920

Open
NSExceptional wants to merge 1 commit into
atlassian:mainfrom
NSExceptional:fix/rovodev-bin-global-storage
Open

fix(RovoDev): store binary bundle in global storage instead of per-workspace#1920
NSExceptional wants to merge 1 commit into
atlassian:mainfrom
NSExceptional:fix/rovodev-bin-global-storage

Conversation

@NSExceptional

@NSExceptional NSExceptional commented Jul 30, 2026

Copy link
Copy Markdown

What Is This Change?

The Rovo Dev CLI binary bundle is downloaded into per-workspace storage (context.storageUri) instead of shared global storage. The bundle is version-pinned and byte-for-byte identical across workspaces — it contains a bundled Python 3.13 runtime, the full tree_sitter_language_pack, ripgrep, git-ai, native crypto/grpc libraries, and the atlassian_cli_rovodev binary (~366–435 MB per version).

Because it's keyed to each workspace, every workspace you open downloads and stores its own full copy. On my machine with 34 workspaces this added up to ~14 GB of duplicated binaries:

14.2 GB total across 34 workspaces
  22 × 202606.17.1  (435 MB each)  =  9.6 GB
   8 × 202604.30.2  (366 MB each)  =  2.9 GB
   4 × 202604.11.1  (366 MB each)  =  1.5 GB

I verified the copies are identical (same SHA-256 for atlassian_cli_rovodev across workspaces on the same version), so all but one copy per version is pure waste.

The fix:

  1. Root the bundle at context.globalStorageUri instead of context.storageUri in GetRovoDevURIs. The code already nests the bundle under a per-version subdirectory (MIN_SUPPORTED_ROVODEV_VERSION), which is a safe global cache key, so the download now happens once per version and is shared across all workspaces. Nothing about the bundle is workspace-specific — the process is already launched with the workspace folder as cwd, which is unaffected. As a bonus this removes the context.storageUri! non-null assertion; storageUri is undefined when no workspace/folder is open, whereas globalStorageUri is always defined.

  2. Automatically reclaim existing duplication. When Rovo Dev initializes in a workspace, any leftover bundle at the old per-workspace location (context.storageUri/atlascode-rovodev-bin) is removed. This is self-healing — each workspace cleans itself on next open — and uses only documented API, without reaching into other workspaces' storage folders (which VS Code provides no supported way to enumerate). Combined with VS Code's own garbage collection of storage for folders that no longer exist, no manual cleanup is required.

Storage footprint after this change: ~435 MB (one shared copy of the current version) instead of scaling linearly with the number of workspaces.

How Has This Been Tested?

  • npm run lint — passes (also enforced by the pre-commit hook).
  • npm run test:unit for src/rovo-dev/ — passes (9/9 in rovoDevLanguageServerProvider.test.ts; GetRovoDevURIs is mocked in the suite, so behavior is unchanged).
  • TypeScript --noEmit typecheck — clean.
  • Manual: confirmed existing per-workspace copies are byte-identical across workspaces, confirming the duplication and that a single shared copy is sufficient.

Note: the legacy cleanup is deliberately scoped to the current workspace on activation rather than walking the entire workspaceStorage tree, to avoid depending on undocumented on-disk layout. If maintainers would prefer a one-shot sweep of all workspaces, I'm happy to adjust.

@atlassian-cla-bot

atlassian-cla-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

Hooray! All contributors have signed the CLA.

@atlassian

atlassian Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

To enable Rovo Dev code reviews, link your GitHub account to your Atlassian account.

This is a one-time task that takes less than a minute. Once your account is linked, resubmit the pull request to trigger a code review.

@NSExceptional NSExceptional reopened this Jul 30, 2026
@NSExceptional
NSExceptional force-pushed the fix/rovodev-bin-global-storage branch from 8ac108b to 7d2ec19 Compare July 30, 2026 22:27
The Rovo Dev CLI bundle (Python runtime, tree-sitter language pack,
ripgrep, native libs; ~400MB) is version-pinned and byte-identical
across workspaces, but GetRovoDevURIs rooted it at context.storageUri,
so a full copy was downloaded into every workspace's storage folder.
On a machine with 34 workspaces this consumed ~14GB.

Root it at context.globalStorageUri instead. The existing per-version
subdirectory already provides a safe dedup/cache key, so the bundle is
now downloaded once per version and shared across all workspaces. This
also removes the storageUri non-null assertion, which could be undefined
when no workspace is open.

Additionally, remove any leftover per-workspace bundle from the old
location when a workspace initializes Rovo Dev, so existing installs
reclaim the duplicated storage automatically rather than requiring
manual cleanup.
@NSExceptional
NSExceptional force-pushed the fix/rovodev-bin-global-storage branch from 7d2ec19 to d12decc Compare July 31, 2026 11:57
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