Skip to content

Let mbx manage per-machine cache budgets instead of setting MBX_GC_MAX_TOTAL_SIZE - #78

Merged
kelchm merged 1 commit into
masterfrom
fix/mbx-per-machine-budget
Nov 25, 2026
Merged

kelchm merged 1 commit into
masterfrom
fix/mbx-per-machine-budget

Conversation

@kelchm

@kelchm kelchm commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Summary

Drop [env] MBX_GC_MAX_TOTAL_SIZE = "100GiB" from home/dot_config/mise/conf.d/mbx.toml.tmpl so dotfiles owns only the mr-boxington tool pin and [wrappers.cargo], leaving cache sizing to mbx's per-machine configuration (mbx settings set gc.max_total_size ... or mbx's built-in disk-proportional defaults).

Why

  • Setting MBX_GC_MAX_TOTAL_SIZE as a mise [env] variable overrode mbx's own config.toml in mise-activated shells and wrappers, while non-mise callers (such as rust-analyzer) read config.toml instead.
  • Tuning a machine's budget required editing the deployed ~/.config/mise/conf.d/mbx.toml directly on disk, causing permanent chezmoi drift (MM) on every subsequent rollout.

Changes

  • home/dot_config/mise/conf.d/mbx.toml.tmpl: remove [env] MBX_GC_MAX_TOTAL_SIZE = "100GiB".
  • docs/profiles.md: document that cache sizing is machine-local via mbx's built-in defaults or mbx settings set gc.max_total_size <size>.
  • tests/test_profiles.py: assert rendered mbx.toml omits [env].

Verification

  • python3 -m unittest -v tests.test_profiles.Profiles.test_mbx_and_hidden_display_scoping passed.
  • chezmoi diff --no-pager -S . --exclude scripts is empty against live $HOME.

…X_TOTAL_SIZE

Drop `[env]` `MBX_GC_MAX_TOTAL_SIZE` from `home/dot_config/mise/conf.d/mbx.toml.tmpl` so dotfiles owns only the `mr-boxington` pin and `[wrappers.cargo]`.

Setting `MBX_GC_MAX_TOTAL_SIZE` as a mise env var overrode per-machine `mbx settings set gc.max_total_size ...` values in mise-activated shells while leaving non-mise callers (such as `rust-analyzer`) on `mbx`'s own config file, forcing direct edits to the deployed `mbx.toml` to tune a machine's budget.

Update `docs/profiles.md` and `tests/test_profiles.py` to match.

Co-Authored-By: gemini-4-neon <noreply@google.com>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Documentation
    • Updated cache-sizing guidance to describe disk-proportional defaults and per-machine configuration.
  • Bug Fixes
    • Removed the fixed 100 GiB cache limit from the managed configuration, allowing the default sizing behavior to apply.

The mbx profile no longer sets a fixed 100GiB cache limit. The documentation now describes disk-proportional defaults and per-machine sizing. The profile test verifies that the rendered configuration has no environment table.

Changes: mbx cache sizing

Layer / File(s) Summary
Cache sizing configuration and validation
home/.dot_config/mise/conf.d/mbx.toml.tmpl, tests/test_profiles.py, docs/profiles.md
The mbx profile removes the fixed cache-size environment setting. The test checks that the rendered configuration has no env table. The documentation describes disk-proportional defaults and per-machine sizing with mbx settings set gc.max_total_size <size>.

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

Change: Bug fix

Possibly related PRs

  • kelchm/dotfiles#70: Adds the mbx wrapper and tool pin used by the profile and test changes in this PR.
Merge Risk: Minimal · up to 6ad01

This change stops dotfiles from forcing a fixed 100GiB mbx cache limit, so cache sizing falls back to mbx defaults or per-machine settings. No merge-blocking risk was found, and reverting is trivial.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: mbx now manages per-machine cache budgets, and the MBX_GC_MAX_TOTAL_SIZE setting is no longer set in dotfiles. The diff removes that env setting from mbx.toml.tmpl, u…
Description check Passed The description is directly related to the changeset. It explains removing the [env] MBX_GC_MAX_TOTAL_SIZE entry from mbx.toml.tmpl, the docs update in docs/profiles.md, and the test change asserting …
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 states the main change: mbx now manages per-machine cache budgets, and the MBX_GC_MAX_TOTAL_SIZE setting is no longer set in dotfiles. The diff removes that env setting from mbx.toml.tmpl, updates docs/profiles.md, and adjusts the test to match.

Full details: Description check

Explanation

The description is directly related to the changeset. It explains removing the [env] MBX_GC_MAX_TOTAL_SIZE entry from mbx.toml.tmpl, the docs update in docs/profiles.md, and the test change asserting the rendered file omits [env]. It also gives the reasons and verification steps.

  • 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: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5b9407e4-e7f1-47c1-8436-0ec01b327891
Commits

Reviewing files that changed from the base of the PR and between 37a9cb5 and 6ad01ed.

Files selected for processing: 3

  • docs/profiles.md
  • home/dot_config/mise/conf.d/mbx.toml.tmpl
  • tests/test_profiles.py
Files with no reviewable changes: 1

  • home/dot_config/mise/conf.d/mbx.toml.tmpl

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

@kelchm
kelchm merged commit 6d1efb9 into master Nov 25, 2026
7 checks passed
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