Skip to content

refactor(registry): convert to nested TOML sections format#6361

Merged
jdx merged 23 commits intomainfrom
registry-refactor
Sep 21, 2025
Merged

refactor(registry): convert to nested TOML sections format#6361
jdx merged 23 commits intomainfrom
registry-refactor

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Sep 21, 2025

Summary

  • Converted registry.toml from flat format (tools.name.field = value) to nested sections format ([tools.name])
  • Added JSON schema for registry validation
  • Added taplo configuration for TOML formatting

Test plan

  • Build passes with new format
  • mise registry output matches the previous format
  • mise run lint:toml passes
  • Tool resolution still works (mise ls-remote bob)

Details

The registry now uses proper TOML sections which is more standard and easier to read/edit. For example:

Before:

[tools]
bob.description = "A version manager for neovim"
bob.backends = ["aqua:MordechaiHadad/bob", "ubi:MordechaiHadad/bob[matching_regex=bob-(linux|macos|windows)-(arm|x86_64)\\.zip$]", "cargo:bob-nvim"]
bob.test = ["bob --version", "bob-nvim {{version}}"]

After:

[tools.bob]
description = "A version manager for neovim"
backends = [
    "aqua:MordechaiHadad/bob",
    "ubi:MordechaiHadad/bob[matching_regex=bob-(linux|macos|windows)-(arm|x86_64)\\.zip$]",
    "cargo:bob-nvim"
]
test = [
    "bob --version",
    "bob-nvim {{version}}"
]

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings September 21, 2025 14:48
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 refactors the registry format from flat TOML structure to nested sections, improves error handling for NPM backend dependency checking, and adds validation/formatting infrastructure for the registry.

  • Converted registry.toml from flat format to nested TOML sections format
  • Added comprehensive error checking for npm/bun availability in NPM backend operations
  • Added JSON schema validation and TOML formatting configuration for registry management

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
src/backend/npm.rs Added dependency checking for npm/bun with helpful error messages
schema/mise-registry.json Added JSON schema for registry validation
e2e/backend/test_npm_missing_error Added end-to-end test for npm missing error scenarios
.taplo.toml Added TOML formatting configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- Convert registry.toml from flat format (tools.name.field = value) to nested sections ([tools.name])
- Add JSON schema for registry validation
- Add taplo configuration for TOML formatting
- Maintain compatibility with existing build process

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

Co-Authored-By: Claude <noreply@anthropic.com>
@jdx jdx force-pushed the registry-refactor branch from 53dd808 to 51a5bf0 Compare September 21, 2025 14:49
jdx added 3 commits September 21, 2025 14:55
- Remove toml-sort dependency and use taplo for all TOML formatting/validation
- Add taplo configuration to hk.pkl for linting
- Update .taplo.toml with reorder settings for registry and settings files
- Delete xtasks/lint/toml script in favor of hk.pkl configuration
- Format all TOML files with taplo's formatting rules
- Fix schema paths for registry files
- Remove toml-sort commands since taplo fmt now handles all TOML formatting
- This completes the migration from toml-sort to taplo
- taplo formatting is now handled by hk fix command
- Avoids duplication since hk.pkl already defines taplo fix behavior
cursor[bot]

This comment was marked as outdated.

autofix-ci bot and others added 3 commits September 21, 2025 15:04
- Put description at top of each tool and setting section
- Add blank lines after description fields for better readability
- Maintain nested section format with proper taplo formatting
- Update taplo configuration for consistent formatting rules

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Enable reorder_keys in taplo configuration
- Sort all fields alphabetically in registry.toml and settings.toml
- Provides consistent field ordering throughout both files

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

Co-Authored-By: Claude <noreply@anthropic.com>
cursor[bot]

This comment was marked as outdated.

- Create comprehensive JSON schema for settings.toml validation
- Support both flat and nested setting structures (e.g., aqua.*, python.*)
- Add schema directive to settings.toml for taplo validation
- Include all setting field types: Bool, String, Path, Url, Duration, etc.
- Support enums, deprecation markers, and documentation fields
- Copy schema to docs/schema/ for symlinked docs/settings.toml
- Update taplo configuration with schema paths for validation

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

Co-Authored-By: Claude <noreply@anthropic.com>
@jdx jdx force-pushed the registry-refactor branch from 0cecb2a to 621c49d Compare September 21, 2025 15:10
jdx and others added 7 commits September 21, 2025 15:12
- Add taplo fmt --check to linting process to ensure TOML files are properly formatted
- Ensures consistent formatting is maintained in CI and local development
- Complements existing taplo check for schema validation

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Update schema/mise.json with latest settings structure
- Refresh generated documentation and CLI files
- Fix hk.pkl configuration by removing invalid top-level exclude property

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove docs/schema/mise-settings.json copy
- Add docs/settings.toml to taplo exclude list since it's a symlink
- Main schema validation still works through root schema/ directory
- Cleanup duplicate schema files

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Revert schema/mise.json to version before alphabetical sorting changes
- Enum values should maintain logical order (e.g., log levels: trace, debug, info, warn, error)
- Task output modes should maintain original order for consistency
- Schema generation was affected by alphabetical sorting in settings.toml

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Update .taplo.toml to set reorder_arrays = false for settings.toml rule
- This prevents alphabetical sorting of enum values that have logical ordering
- Preserves correct log_level enum: trace→debug→info→warn→error
- Preserves correct task_output enum ordering
- Maintains alphabetical field sorting while protecting array content
- Fixes schema generation issue where enum ordering was corrupted

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Regenerate schema/mise.json to fix enum ordering after rebase
- Ensures log_level enum follows logical sequence: trace→debug→info→warn→error
- Ensures task_output enum maintains correct order
- Generated from settings.toml with preserved enum ordering via taplo config

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

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Sep 21, 2025

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.9.14 x -- echo 20.3 ± 0.4 19.1 22.9 1.00
mise x -- echo 20.8 ± 0.3 20.0 22.5 1.02 ± 0.03

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.9.14 env 19.9 ± 0.4 19.2 26.6 1.00
mise env 20.4 ± 0.4 19.5 22.9 1.03 ± 0.03

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.9.14 hook-env 19.6 ± 0.8 19.0 33.3 1.00
mise hook-env 19.9 ± 0.4 19.1 21.1 1.01 ± 0.04

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.9.14 ls 17.4 ± 0.7 16.8 24.8 1.00
mise ls 17.7 ± 0.4 17.0 20.9 1.02 ± 0.05

xtasks/test/perf

Command mise-2025.9.14 mise Variance
install (cached) 174ms ✅ 105ms +65%
ls (cached) 66ms 65ms +1%
bin-paths (cached) 76ms 71ms +7%
task-ls (cached) 474ms 471ms +0%

✅ Performance improvement: install cached is 65%

jdx and others added 6 commits September 21, 2025 16:26
Array order is semantically important in the registry:
- test arrays: [command, expected_output] order must be preserved
- backends arrays: priority order (first backend tried first)

Setting reorder_arrays = false prevents taplo from changing array
order during formatting, which was causing test failures.

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Convert registry.toml from flat format (tools.tool-name.property) to nested format ([tools.tool-name])
- Preserve exact array ordering and tool configurations
- Maintain functional equivalence verified through JSON comparison
- All tests pass including test_registry

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove temporary registry conversion tool
- Fix workspace Cargo.toml to exclude removed tool
- Resolves cargo-machete unused dependency warning
@jdx jdx enabled auto-merge (squash) September 21, 2025 20:32
@jdx jdx merged commit bc5a8cb into main Sep 21, 2025
30 checks passed
@jdx jdx deleted the registry-refactor branch September 21, 2025 21:34
@jdx jdx mentioned this pull request Sep 21, 2025
jdx added a commit that referenced this pull request Sep 21, 2025
### 📦 Registry

- add missing cargo backends by @jayvdb in
[#6307](#6307)

### 🚀 Features

- add env propagation by @Its-Just-Nans in
[#6342](#6342)

### 🐛 Bug Fixes

- **(aqua)** improve GitHub token handling for sigstore verification by
@jdx in [#6351](#6351)
- **(backend)** change dependency checks to warnings instead of errors
by @jdx in [#6363](#6363)
- **(npm)** improve error message when npm/bun is not installed by @jdx
in [#6359](#6359)
- **(vfox)** enable TLS support for reqwest to fix CI tests by @jdx in
[#6356](#6356)

### 🚜 Refactor

- **(registry)** convert to nested TOML sections format by @jdx in
[#6361](#6361)

### 🧪 Testing

- **(e2e)** resolve mise via PATH in backend missing deps test by @jdx
in [#6362](#6362)
- **(vfox)** replace flaky external HTTP tests with local mock server by
@jdx in [#6354](#6354)

### 📦️ Dependency Updates

- pin dependencies by @renovate[bot] in
[#6243](#6243)

### Chore

- **(install.sh)** add `MISE_INSTALL_MUSL` to force installing musl
variants on Linux by @malept in
[#6355](#6355)

Co-authored-by: mise-en-dev <release@mise.jdx.dev>
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Sep 24, 2025
## [2025.9.16](https://github.com/jdx/mise/compare/v2025.9.15..v2025.9.16) - 2025-09-22

### 📦 Registry

- use npm backend for zbctl by @risu729 in [#6379](jdx/mise#6379)

### 🐛 Bug Fixes

- **(aqua)** remove blake3 support from aqua checksum algorithms by @risu729 in [#6370](jdx/mise#6370)
- **(aqua)** remove cosign and slsa-verifier dependencies by @risu729 in [#6371](jdx/mise#6371)
- **(aqua)** remove cosign.experimental by @risu729 in [#6376](jdx/mise#6376)

### 📚 Documentation

- minisign doesn't require cli by @risu729 in [#6369](jdx/mise#6369)

### Chore

- ignore renovate new bot name by @risu729 in [#6364](jdx/mise#6364)

## [2025.9.15](https://github.com/jdx/mise/compare/v2025.9.14..v2025.9.15) - 2025-09-21

### 📦 Registry

- add missing cargo backends by @jayvdb in [#6307](jdx/mise#6307)

### 🚀 Features

- add env propagation by @Its-Just-Nans in [#6342](jdx/mise#6342)

### 🐛 Bug Fixes

- **(aqua)** improve GitHub token handling for sigstore verification by @jdx in [#6351](jdx/mise#6351)
- **(backend)** change dependency checks to warnings instead of errors by @jdx in [#6363](jdx/mise#6363)
- **(npm)** improve error message when npm/bun is not installed by @jdx in [#6359](jdx/mise#6359)
- **(vfox)** enable TLS support for reqwest to fix CI tests by @jdx in [#6356](jdx/mise#6356)

### 🚜 Refactor

- **(registry)** convert to nested TOML sections format by @jdx in [#6361](jdx/mise#6361)

### 🧪 Testing

- **(e2e)** resolve mise via PATH in backend missing deps test by @jdx in [#6362](jdx/mise#6362)
- **(vfox)** replace flaky external HTTP tests with local mock server by @jdx in [#6354](jdx/mise#6354)

### 📦️ Dependency Updates

- pin dependencies by @renovate[bot] in [#6243](jdx/mise#6243)

### Chore

- **(install.sh)** add `MISE_INSTALL_MUSL` to force installing musl variants on Linux by @malept in [#6355](jdx/mise#6355)

## [2025.9.14](https://github.com/jdx/mise/compare/v2025.9.13..v2025.9.14) - 2025-09-20

### 🐛 Bug Fixes

- fix an issue where Swift could not be installed on arm64 Ubuntu by @lish82 in [#6348](jdx/mise#6348)

### Chore

- use cross to build on linux by @jdx in [#6346](jdx/mise#6346)

### New Contributors

- @lish82 made their first contribution in [#6348](jdx/mise#6348)

## [2025.9.13](https://github.com/jdx/mise/compare/v2025.9.12..v2025.9.13) - 2025-09-19

### 📦 Registry

- remove deprecated virtualos by @jdx in [166379f](jdx/mise@166379f)
- add trufflehog ([aqua:trufflesecurity/trufflehog](https://github.com/trufflesecurity/trufflehog)) by @risu729 in [#6316](jdx/mise#6316)

### 🚀 Features

- **(aqua)** integrate native sigstore-verification for security verification by @jdx in [#6332](jdx/mise#6332)
- **(docs)** improve search result readability with lighter teal background by @jdx in [#6328](jdx/mise#6328)
- **(ui)** update logo as favicon and fix hover transitions by @jdx in [#6325](jdx/mise#6325)
- **(vfox)** add file.read lua function by @malept in [#6333](jdx/mise#6333)
- add documentation for "Environment in tasks" #5134 #5638 by @Its-Just-Nans in [#6329](jdx/mise#6329)

### 🐛 Bug Fixes

- **(github)** correctly paginate releases/tags for private repos by @malept in [#6318](jdx/mise#6318)
- **(hk)** exclude aqua-registry from prettier linting by @jdx in [#6327](jdx/mise#6327)
- **(ui)** improve GitHub star badge layout and alignment by @jdx in [#6326](jdx/mise#6326)

### 📚 Documentation

- change 'hello.py' to 'main.py' in python.md by @my1e5 in [#6319](jdx/mise#6319)
- customize VitePress theme with unique branding by @jdx in [#6324](jdx/mise#6324)

### 📦️ Dependency Updates

- update taiki-e/install-action digest to 0aa4f22 by @renovate[bot] in [#6334](jdx/mise#6334)
- update rust crate comfy-table to v7.2.1 by @renovate[bot] in [#6335](jdx/mise#6335)
- update rust crate console to v0.16.1 by @renovate[bot] in [#6336](jdx/mise#6336)
- update rust crate indexmap to v2.11.4 by @renovate[bot] in [#6337](jdx/mise#6337)

### Chore

- fixing typos by @Its-Just-Nans in [#6331](jdx/mise#6331)

### New Contributors

- @Its-Just-Nans made their first contribution in [#6331](jdx/mise#6331)
- @my1e5 made their first contribution in [#6319](jdx/mise#6319)
riastradh pushed a commit to riastradh/pkgsrc-test20250901 that referenced this pull request Feb 8, 2026
## [2025.9.16](https://github.com/jdx/mise/compare/v2025.9.15..v2025.9.16) - 2025-09-22

### 📦 Registry

- use npm backend for zbctl by @risu729 in [#6379](jdx/mise#6379)

### 🐛 Bug Fixes

- **(aqua)** remove blake3 support from aqua checksum algorithms by @risu729 in [#6370](jdx/mise#6370)
- **(aqua)** remove cosign and slsa-verifier dependencies by @risu729 in [#6371](jdx/mise#6371)
- **(aqua)** remove cosign.experimental by @risu729 in [#6376](jdx/mise#6376)

### 📚 Documentation

- minisign doesn't require cli by @risu729 in [#6369](jdx/mise#6369)

### Chore

- ignore renovate new bot name by @risu729 in [#6364](jdx/mise#6364)

## [2025.9.15](https://github.com/jdx/mise/compare/v2025.9.14..v2025.9.15) - 2025-09-21

### 📦 Registry

- add missing cargo backends by @jayvdb in [#6307](jdx/mise#6307)

### 🚀 Features

- add env propagation by @Its-Just-Nans in [#6342](jdx/mise#6342)

### 🐛 Bug Fixes

- **(aqua)** improve GitHub token handling for sigstore verification by @jdx in [#6351](jdx/mise#6351)
- **(backend)** change dependency checks to warnings instead of errors by @jdx in [#6363](jdx/mise#6363)
- **(npm)** improve error message when npm/bun is not installed by @jdx in [#6359](jdx/mise#6359)
- **(vfox)** enable TLS support for reqwest to fix CI tests by @jdx in [#6356](jdx/mise#6356)

### 🚜 Refactor

- **(registry)** convert to nested TOML sections format by @jdx in [#6361](jdx/mise#6361)

### 🧪 Testing

- **(e2e)** resolve mise via PATH in backend missing deps test by @jdx in [#6362](jdx/mise#6362)
- **(vfox)** replace flaky external HTTP tests with local mock server by @jdx in [#6354](jdx/mise#6354)

### 📦️ Dependency Updates

- pin dependencies by @renovate[bot] in [#6243](jdx/mise#6243)

### Chore

- **(install.sh)** add `MISE_INSTALL_MUSL` to force installing musl variants on Linux by @malept in [#6355](jdx/mise#6355)

## [2025.9.14](https://github.com/jdx/mise/compare/v2025.9.13..v2025.9.14) - 2025-09-20

### 🐛 Bug Fixes

- fix an issue where Swift could not be installed on arm64 Ubuntu by @lish82 in [#6348](jdx/mise#6348)

### Chore

- use cross to build on linux by @jdx in [#6346](jdx/mise#6346)

### New Contributors

- @lish82 made their first contribution in [#6348](jdx/mise#6348)

## [2025.9.13](https://github.com/jdx/mise/compare/v2025.9.12..v2025.9.13) - 2025-09-19

### 📦 Registry

- remove deprecated virtualos by @jdx in [166379f](jdx/mise@166379f)
- add trufflehog ([aqua:trufflesecurity/trufflehog](https://github.com/trufflesecurity/trufflehog)) by @risu729 in [#6316](jdx/mise#6316)

### 🚀 Features

- **(aqua)** integrate native sigstore-verification for security verification by @jdx in [#6332](jdx/mise#6332)
- **(docs)** improve search result readability with lighter teal background by @jdx in [#6328](jdx/mise#6328)
- **(ui)** update logo as favicon and fix hover transitions by @jdx in [#6325](jdx/mise#6325)
- **(vfox)** add file.read lua function by @malept in [#6333](jdx/mise#6333)
- add documentation for "Environment in tasks" #5134 #5638 by @Its-Just-Nans in [#6329](jdx/mise#6329)

### 🐛 Bug Fixes

- **(github)** correctly paginate releases/tags for private repos by @malept in [#6318](jdx/mise#6318)
- **(hk)** exclude aqua-registry from prettier linting by @jdx in [#6327](jdx/mise#6327)
- **(ui)** improve GitHub star badge layout and alignment by @jdx in [#6326](jdx/mise#6326)

### 📚 Documentation

- change 'hello.py' to 'main.py' in python.md by @my1e5 in [#6319](jdx/mise#6319)
- customize VitePress theme with unique branding by @jdx in [#6324](jdx/mise#6324)

### 📦️ Dependency Updates

- update taiki-e/install-action digest to 0aa4f22 by @renovate[bot] in [#6334](jdx/mise#6334)
- update rust crate comfy-table to v7.2.1 by @renovate[bot] in [#6335](jdx/mise#6335)
- update rust crate console to v0.16.1 by @renovate[bot] in [#6336](jdx/mise#6336)
- update rust crate indexmap to v2.11.4 by @renovate[bot] in [#6337](jdx/mise#6337)

### Chore

- fixing typos by @Its-Just-Nans in [#6331](jdx/mise#6331)

### New Contributors

- @Its-Just-Nans made their first contribution in [#6331](jdx/mise#6331)
- @my1e5 made their first contribution in [#6319](jdx/mise#6319)
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