Skip to content

fix: clean upm project-local state between benchmark runs - #193

Merged
evert merged 1 commit into
mainfrom
evert/fix-upm-cache-cleanup
Oct 29, 2026
Merged

evert merged 1 commit into
mainfrom
evert/fix-upm-cache-cleanup

Conversation

@vltbaudbot

@vltbaudbot vltbaudbot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem

upm's cache cleanup between benchmark runs was incomplete, giving upm an unfair advantage:

1. Global cache: XDG directories not cleaned

clean_upm_cache() only wiped ~/.upm/, but upm uses XDG base directories on Linux:

  • Store + metadata: $XDG_DATA_HOME/upm (default ~/.local/share/upm)
  • Compile cache: $XDG_CACHE_HOME/upm (default ~/.cache/upm)

upm only falls back to ~/.upm when ~/.upm/store already exists. On a fresh CI runner (or after a clean that wipes ~/.upm), the store lands in ~/.local/share/upm/ and the cache in ~/.cache/upm/ — neither of which was being cleaned.

2. Project-local state not cleaned

clean_package_manager_files() removed .aube (aube's project-local state) but not .upm or .upm-store (upm's project-level artifacts).

Fix

  • clean_upm_cache(): Now wipes all three possible locations: ~/.upm, $XDG_DATA_HOME/upm, and $XDG_CACHE_HOME/upm
  • clean_package_manager_files(): Now removes .upm and .upm-store alongside other PMs' project artifacts

Verification

Cache path logic verified against upm source (src/util.ts upmHome function).

Co-authored-by: Evert Pot me@evertpot.com

@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
benchmarks Ready Ready Preview Oct 29, 2026 3:00am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e722102a-52ac-47c2-aacf-423ffed11283
Commits

Reviewing files that changed from the base of the PR and between a4b6c25 and 625f336.

Files selected for processing: 1
  • suite/scripts/clean-helpers.sh

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ec66352c-3180-4889-8812-cb1b282a56a6
Commits

Reviewing files that changed from the base of the PR and between 0d78549 and a4b6c25.

Files selected for processing: 1
  • suite/scripts/clean-helpers.sh

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

Walkthrough

clean_package_manager_files now removes the .upm directory along with other transient package-manager artifacts.

Changes: Package manager cleanup

Layer / File(s) Summary
Remove transient package-manager artifacts
suite/scripts/clean-helpers.sh
clean_package_manager_files now removes .upm alongside other transient package-manager artifacts.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Suggested reviewers: ejkorol

Merge Risk: Minimal · previous review a4b6c

The change safely clears project-local upm cache state between benchmark runs, with no established merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: removing project-local .upm state between benchmark runs.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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

Comment @coderabbitai help to get the list of available commands.

The upm cleanup was incomplete in two ways:

1. clean_upm_cache() only wiped ~/.upm/, but upm uses XDG base
   directories on Linux: the store and registry metadata go to
   $XDG_DATA_HOME/upm (default ~/.local/share/upm), and the compile
   cache goes to $XDG_CACHE_HOME/upm (default ~/.cache/upm). upm
   falls back to ~/.upm only when ~/.upm/store already exists. On a
   fresh CI runner, ~/.upm/store never exists, so the store lands in
   ~/.local/share/upm/ and the cache in ~/.cache/upm/ — neither of
   which was cleaned.

2. clean_package_manager_files() cleaned .aube (aube's project-local
   state) but not .upm or .upm-store (upm's project-level artifacts),
   so upm's local state could persist across runs.

Now clean_upm_cache() wipes all three locations (~/.upm, the XDG data
dir, and the XDG cache dir), and clean_package_manager_files() removes
.upm and .upm-store alongside the other PMs' project artifacts.

Co-authored-by: Evert Pot <me@evertpot.com>
@vltbaudbot
vltbaudbot force-pushed the evert/fix-upm-cache-cleanup branch from a4b6c25 to 625f336 Compare October 29, 2026 02:59

This branch was previously deployed

1 inactive deployment
Benchmark — 625f3365 Deployed Oct 29, 2026 by vltbaudbot via Run Benchmarks (vue, registry-lockfile) #1384
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.

2 participants