Skip to content

Comments

chore: sort settings.toml alphabetically and add test#8111

Merged
jdx merged 2 commits intomainfrom
chore/settings-toml-alphabetical
Feb 11, 2026
Merged

chore: sort settings.toml alphabetically and add test#8111
jdx merged 2 commits intomainfrom
chore/settings-toml-alphabetical

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Feb 11, 2026

Summary

  • Sorts all sections in settings.toml alphabetically
  • Adds a unit test (test_settings_toml_is_sorted) that asserts the keys remain in alphabetical order, so future additions stay organized

Test plan

  • cargo test test_settings_toml_is_sorted passes
  • cargo check succeeds (build.rs still parses settings.toml correctly)
  • mise run lint-fix passes clean

🤖 Generated with Claude Code


Note

Low Risk
Mostly a non-functional reordering of settings.toml, plus a new unit test that could be slightly brittle if TOML parsing/order semantics change.

Overview
Reorders settings.toml sections to be alphabetically sorted, without changing the underlying setting definitions.

Adds test_settings_toml_is_sorted in src/config/settings.rs that parses settings.toml and asserts top-level and nested setting keys remain in alphabetical order (skipping grouping-only tables), preventing future drift.

Written by Cursor Bugbot for commit aa1dfdb. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings February 11, 2026 13:20
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jdx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the consistency and maintainability of the project's configuration. By alphabetically sorting the settings.toml file, it becomes easier for developers to locate and manage settings. Furthermore, the introduction of an automated test ensures that this organizational standard is upheld in all future changes, promoting long-term code health and reducing potential merge conflicts related to ordering.

Highlights

  • Alphabetical Sorting of settings.toml: All sections and entries within the settings.toml configuration file have been reordered alphabetically to improve readability and maintainability.
  • Automated Sorting Enforcement: A new unit test, test_settings_toml_is_sorted, has been added to src/config/settings.rs to automatically verify that settings.toml remains alphabetically sorted, preventing future out-of-order additions.
Changelog
  • settings.toml
    • Reordered all configuration sections and individual settings alphabetically.
    • Moved various settings such as age.*, conda.channel, env_file, gix, github_attestations, http_retries, http_timeout, locked, slsa, status.show_tools, terminal_progress, ruby.github_attestations, and task.* to their correct alphabetical positions.
  • src/config/settings.rs
    • Added a new unit test test_settings_toml_is_sorted to programmatically check if settings.toml is sorted alphabetically.
Activity
  • The initial changes for this pull request were generated using Claude Code.
  • No human activity (comments, reviews, or further commits) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reorganizes settings.toml by sorting settings sections alphabetically and adds a unit test to enforce ordering going forward.

Changes:

  • Reordered settings.toml sections into alphabetical order (including moved blocks like age.*, conda.channel, locked, terminal_progress, etc.).
  • Added test_settings_toml_is_sorted to assert settings.toml remains alphabetically ordered.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/config/settings.rs Adds a unit test intended to enforce alphabetical ordering of settings keys.
settings.toml Reorders settings definitions/sections alphabetically to keep the file organized.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +776 to +804
let content =
std::fs::read_to_string(concat!(env!("CARGO_MANIFEST_DIR"), "/settings.toml"))
.expect("failed to read settings.toml");
let table: toml::Table = content.parse().expect("failed to parse settings.toml");

fn collect_keys(table: &toml::Table, prefix: &str) -> Vec<String> {
let mut keys = Vec::new();
for (key, value) in table {
let full_key = if prefix.is_empty() {
key.clone()
} else {
format!("{prefix}.{key}")
};
if let toml::Value::Table(sub) = value {
// A nested table that has no "type" or "description" is a grouping table
// (e.g., [aqua], [node]), not a setting itself.
if !sub.contains_key("type") && !sub.contains_key("description") {
keys.extend(collect_keys(sub, &full_key));
continue;
}
}
keys.push(full_key);
}
keys
}

let keys = collect_keys(&table, "");
let mut sorted = keys.clone();
sorted.sort();
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test currently parses TOML into toml::Table and then iterates the map to obtain keys. The toml crate’s table/map iteration order is not the same as “order in the source file” (and is commonly key-sorted), so this test is likely to pass even when settings.toml is not sorted on disk. To actually enforce file ordering, derive the key/header sequence from the raw file text using an order-preserving parser (e.g., toml_edit) or by scanning lines for table headers/setting identifiers and comparing that encountered sequence against a sorted copy.

Copilot uses AI. Check for mistakes.
Comment on lines +789 to +796
if let toml::Value::Table(sub) = value {
// A nested table that has no "type" or "description" is a grouping table
// (e.g., [aqua], [node]), not a setting itself.
if !sub.contains_key("type") && !sub.contains_key("description") {
keys.extend(collect_keys(sub, &full_key));
continue;
}
}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “grouping table” detection is based on the absence of "type" and "description", which is a schema-dependent heuristic. If a legitimate setting table ever omits one/both of these fields, it will be treated as a grouping table and won’t be checked by the sort assertion. Consider making grouping detection explicit (e.g., by enumerating known grouping roots) or using a more robust schema signal so the test cannot silently skip settings.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This PR does a good job of sorting the settings.toml file and adding a test to enforce it. I found a couple of entries that are out of alphabetical order. The new test should have caught these, so I'm not sure why it's passing, but the sorting should be corrected. Otherwise, this is a great change for maintainability.

type = "Bool"

[slsa]
[github_attestations]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There appears to be a sorting error here. gix should come before github_attestations alphabetically.

hide = true
type = "Bool"

[locked]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's another sorting error here. lockfile should come before locked alphabetically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jdx jdx force-pushed the chore/settings-toml-alphabetical branch from 1ed985b to aa1dfdb Compare February 11, 2026 13:39
@jdx jdx enabled auto-merge (squash) February 11, 2026 13:43
@jdx jdx merged commit d8d2495 into main Feb 11, 2026
33 checks passed
@jdx jdx deleted the chore/settings-toml-alphabetical branch February 11, 2026 14:01
@github-actions
Copy link

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.9 x -- echo 22.3 ± 0.4 21.4 24.6 1.00
mise x -- echo 23.2 ± 0.5 22.1 24.9 1.04 ± 0.03

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.9 env 21.9 ± 0.6 20.9 26.5 1.00
mise env 22.6 ± 0.5 21.6 24.2 1.03 ± 0.04

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.9 hook-env 22.4 ± 0.5 21.2 27.8 1.00
mise hook-env 23.3 ± 0.5 22.1 25.5 1.04 ± 0.03

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.2.9 ls 20.5 ± 0.4 19.5 22.1 1.00
mise ls 21.0 ± 0.6 19.8 23.2 1.02 ± 0.04

xtasks/test/perf

Command mise-2026.2.9 mise Variance
install (cached) 122ms 123ms +0%
ls (cached) 74ms 75ms -1%
bin-paths (cached) 79ms 79ms +0%
task-ls (cached) 547ms ⚠️ 815ms -32%

⚠️ Warning: task-ls cached performance variance is -32%

jdx pushed a commit that referenced this pull request Feb 12, 2026
### 🚀 Features

- **(activate)** add shims directory as fallback when auto-install is
enabled by @ctaintor in [#8106](#8106)
- **(env)** add `tools` variable to tera template context by @jdx in
[#8108](#8108)
- **(set)** add --stdin flag for multiline environment variables by @jdx
in [#8110](#8110)

### 🐛 Bug Fixes

- **(backend)** improve conda patchelf and dependency resolution for
complex packages by @jdx in
[#8087](#8087)
- **(ci)** fix validate-new-tools grep pattern for test field by @jdx in
[#8100](#8100)
- **(config)** make MISE_OFFLINE work correctly by gracefully skipping
network calls by @jdx in [#8109](#8109)
- **(github)** skip v prefix for "latest" version by @jdx in
[#8105](#8105)
- **(gitlab)** resolve tool options from config for aliased tools by
@jdx in [#8084](#8084)
- **(install)** use version_expr for Flutter to fix version resolution
by @jdx in [#8081](#8081)
- **(registry)** add Linux support for tuist by @fortmarek in
[#8102](#8102)
- **(release)** write release notes to file instead of capturing stdout
by @jdx in [#8086](#8086)
- **(upgrade)** tools are not uninstalled properly due to outdated
symlink by @roele in [#8099](#8099)
- **(upgrade)** ensure uninstallation failure does not leave invalid
symlinks by @roele in [#8101](#8101)
- SLSA for in-toto statement with no signatures by @gerhard in
[#8094](#8094)
- Vfox Plugin Auto-Installation for Environment Directives by @pose in
[#8035](#8035)

### 📚 Documentation

- use mise activate for PowerShell in getting-started by @rileychh in
[#8112](#8112)

### 📦 Registry

- add conda backend for mysql by @jdx in
[#8080](#8080)
- add conda backends for 10 asdf-only tools by @jdx in
[#8083](#8083)
- added podman-tui by @tony-sol in
[#8098](#8098)

### Chore

- sort settings.toml alphabetically and add test by @jdx in
[#8111](#8111)

### New Contributors

- @ctaintor made their first contribution in
[#8106](#8106)
- @rileychh made their first contribution in
[#8112](#8112)
- @fortmarek made their first contribution in
[#8102](#8102)
- @pose made their first contribution in
[#8035](#8035)
- @gerhard made their first contribution in
[#8094](#8094)

## 📦 Aqua Registry Updates

#### New Packages (2)

- [`entireio/cli`](https://github.com/entireio/cli)
-
[`rmitchellscott/reManager`](https://github.com/rmitchellscott/reManager)

#### Updated Packages (1)

- [`atuinsh/atuin`](https://github.com/atuinsh/atuin)
jdx pushed a commit that referenced this pull request Feb 12, 2026
### 🚀 Features

- **(activate)** add shims directory as fallback when auto-install is
enabled by @ctaintor in [#8106](#8106)
- **(env)** add `tools` variable to tera template context by @jdx in
[#8108](#8108)
- **(set)** add --stdin flag for multiline environment variables by @jdx
in [#8110](#8110)

### 🐛 Bug Fixes

- **(backend)** improve conda patchelf and dependency resolution for
complex packages by @jdx in
[#8087](#8087)
- **(ci)** fix validate-new-tools grep pattern for test field by @jdx in
[#8100](#8100)
- **(config)** make MISE_OFFLINE work correctly by gracefully skipping
network calls by @jdx in [#8109](#8109)
- **(github)** skip v prefix for "latest" version by @jdx in
[#8105](#8105)
- **(gitlab)** resolve tool options from config for aliased tools by
@jdx in [#8084](#8084)
- **(install)** use version_expr for Flutter to fix version resolution
by @jdx in [#8081](#8081)
- **(registry)** add Linux support for tuist by @fortmarek in
[#8102](#8102)
- **(release)** write release notes to file instead of capturing stdout
by @jdx in [#8086](#8086)
- **(upgrade)** tools are not uninstalled properly due to outdated
symlink by @roele in [#8099](#8099)
- **(upgrade)** ensure uninstallation failure does not leave invalid
symlinks by @roele in [#8101](#8101)
- SLSA for in-toto statement with no signatures by @gerhard in
[#8094](#8094)
- Vfox Plugin Auto-Installation for Environment Directives by @pose in
[#8035](#8035)

### 📚 Documentation

- use mise activate for PowerShell in getting-started by @rileychh in
[#8112](#8112)

### 📦 Registry

- add conda backend for mysql by @jdx in
[#8080](#8080)
- add conda backends for 10 asdf-only tools by @jdx in
[#8083](#8083)
- added podman-tui by @tony-sol in
[#8098](#8098)

### Chore

- sort settings.toml alphabetically and add test by @jdx in
[#8111](#8111)

### New Contributors

- @ctaintor made their first contribution in
[#8106](#8106)
- @rileychh made their first contribution in
[#8112](#8112)
- @fortmarek made their first contribution in
[#8102](#8102)
- @pose made their first contribution in
[#8035](#8035)
- @gerhard made their first contribution in
[#8094](#8094)

## 📦 Aqua Registry Updates

#### New Packages (2)

- [`entireio/cli`](https://github.com/entireio/cli)
-
[`rmitchellscott/reManager`](https://github.com/rmitchellscott/reManager)

#### Updated Packages (1)

- [`atuinsh/atuin`](https://github.com/atuinsh/atuin)
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
## Summary
- Sorts all sections in `settings.toml` alphabetically
- Adds a unit test (`test_settings_toml_is_sorted`) that asserts the
keys remain in alphabetical order, so future additions stay organized

## Test plan
- [x] `cargo test test_settings_toml_is_sorted` passes
- [x] `cargo check` succeeds (build.rs still parses settings.toml
correctly)
- [x] `mise run lint-fix` passes clean

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Mostly a non-functional reordering of `settings.toml`, plus a new unit
test that could be slightly brittle if TOML parsing/order semantics
change.
> 
> **Overview**
> Reorders `settings.toml` sections to be alphabetically sorted, without
changing the underlying setting definitions.
> 
> Adds `test_settings_toml_is_sorted` in `src/config/settings.rs` that
parses `settings.toml` and asserts top-level and nested setting keys
remain in alphabetical order (skipping grouping-only tables), preventing
future drift.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
aa1dfdb. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
### 🚀 Features

- **(activate)** add shims directory as fallback when auto-install is
enabled by @ctaintor in [jdx#8106](jdx#8106)
- **(env)** add `tools` variable to tera template context by @jdx in
[jdx#8108](jdx#8108)
- **(set)** add --stdin flag for multiline environment variables by @jdx
in [jdx#8110](jdx#8110)

### 🐛 Bug Fixes

- **(backend)** improve conda patchelf and dependency resolution for
complex packages by @jdx in
[jdx#8087](jdx#8087)
- **(ci)** fix validate-new-tools grep pattern for test field by @jdx in
[jdx#8100](jdx#8100)
- **(config)** make MISE_OFFLINE work correctly by gracefully skipping
network calls by @jdx in [jdx#8109](jdx#8109)
- **(github)** skip v prefix for "latest" version by @jdx in
[jdx#8105](jdx#8105)
- **(gitlab)** resolve tool options from config for aliased tools by
@jdx in [jdx#8084](jdx#8084)
- **(install)** use version_expr for Flutter to fix version resolution
by @jdx in [jdx#8081](jdx#8081)
- **(registry)** add Linux support for tuist by @fortmarek in
[jdx#8102](jdx#8102)
- **(release)** write release notes to file instead of capturing stdout
by @jdx in [jdx#8086](jdx#8086)
- **(upgrade)** tools are not uninstalled properly due to outdated
symlink by @roele in [jdx#8099](jdx#8099)
- **(upgrade)** ensure uninstallation failure does not leave invalid
symlinks by @roele in [jdx#8101](jdx#8101)
- SLSA for in-toto statement with no signatures by @gerhard in
[jdx#8094](jdx#8094)
- Vfox Plugin Auto-Installation for Environment Directives by @pose in
[jdx#8035](jdx#8035)

### 📚 Documentation

- use mise activate for PowerShell in getting-started by @rileychh in
[jdx#8112](jdx#8112)

### 📦 Registry

- add conda backend for mysql by @jdx in
[jdx#8080](jdx#8080)
- add conda backends for 10 asdf-only tools by @jdx in
[jdx#8083](jdx#8083)
- added podman-tui by @tony-sol in
[jdx#8098](jdx#8098)

### Chore

- sort settings.toml alphabetically and add test by @jdx in
[jdx#8111](jdx#8111)

### New Contributors

- @ctaintor made their first contribution in
[jdx#8106](jdx#8106)
- @rileychh made their first contribution in
[jdx#8112](jdx#8112)
- @fortmarek made their first contribution in
[jdx#8102](jdx#8102)
- @pose made their first contribution in
[jdx#8035](jdx#8035)
- @gerhard made their first contribution in
[jdx#8094](jdx#8094)

## 📦 Aqua Registry Updates

#### New Packages (2)

- [`entireio/cli`](https://github.com/entireio/cli)
-
[`rmitchellscott/reManager`](https://github.com/rmitchellscott/reManager)

#### Updated Packages (1)

- [`atuinsh/atuin`](https://github.com/atuinsh/atuin)
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
### 🚀 Features

- **(activate)** add shims directory as fallback when auto-install is
enabled by @ctaintor in [jdx#8106](jdx#8106)
- **(env)** add `tools` variable to tera template context by @jdx in
[jdx#8108](jdx#8108)
- **(set)** add --stdin flag for multiline environment variables by @jdx
in [jdx#8110](jdx#8110)

### 🐛 Bug Fixes

- **(backend)** improve conda patchelf and dependency resolution for
complex packages by @jdx in
[jdx#8087](jdx#8087)
- **(ci)** fix validate-new-tools grep pattern for test field by @jdx in
[jdx#8100](jdx#8100)
- **(config)** make MISE_OFFLINE work correctly by gracefully skipping
network calls by @jdx in [jdx#8109](jdx#8109)
- **(github)** skip v prefix for "latest" version by @jdx in
[jdx#8105](jdx#8105)
- **(gitlab)** resolve tool options from config for aliased tools by
@jdx in [jdx#8084](jdx#8084)
- **(install)** use version_expr for Flutter to fix version resolution
by @jdx in [jdx#8081](jdx#8081)
- **(registry)** add Linux support for tuist by @fortmarek in
[jdx#8102](jdx#8102)
- **(release)** write release notes to file instead of capturing stdout
by @jdx in [jdx#8086](jdx#8086)
- **(upgrade)** tools are not uninstalled properly due to outdated
symlink by @roele in [jdx#8099](jdx#8099)
- **(upgrade)** ensure uninstallation failure does not leave invalid
symlinks by @roele in [jdx#8101](jdx#8101)
- SLSA for in-toto statement with no signatures by @gerhard in
[jdx#8094](jdx#8094)
- Vfox Plugin Auto-Installation for Environment Directives by @pose in
[jdx#8035](jdx#8035)

### 📚 Documentation

- use mise activate for PowerShell in getting-started by @rileychh in
[jdx#8112](jdx#8112)

### 📦 Registry

- add conda backend for mysql by @jdx in
[jdx#8080](jdx#8080)
- add conda backends for 10 asdf-only tools by @jdx in
[jdx#8083](jdx#8083)
- added podman-tui by @tony-sol in
[jdx#8098](jdx#8098)

### Chore

- sort settings.toml alphabetically and add test by @jdx in
[jdx#8111](jdx#8111)

### New Contributors

- @ctaintor made their first contribution in
[jdx#8106](jdx#8106)
- @rileychh made their first contribution in
[jdx#8112](jdx#8112)
- @fortmarek made their first contribution in
[jdx#8102](jdx#8102)
- @pose made their first contribution in
[jdx#8035](jdx#8035)
- @gerhard made their first contribution in
[jdx#8094](jdx#8094)

## 📦 Aqua Registry Updates

#### New Packages (2)

- [`entireio/cli`](https://github.com/entireio/cli)
-
[`rmitchellscott/reManager`](https://github.com/rmitchellscott/reManager)

#### Updated Packages (1)

- [`atuinsh/atuin`](https://github.com/atuinsh/atuin)
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