Skip to content

fix(schema): allow structured task tool options - #11021

Merged
jdx merged 5 commits into
jdx:mainfrom
risu729:agent/schema-task-tool-values
Jul 16, 2026
Merged

jdx merged 5 commits into
jdx:mainfrom
risu729:agent/schema-task-tool-values

Conversation

@risu729

@risu729 risu729 commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • reuse the existing tool value definition for task tools in the main mise schema
  • add the equivalent local definition to the standalone task schema
  • allow scalar, array, and nested-table backend option values in task tools
  • add strict Tombi coverage for structured options in both schema entry points

Why

Runtime support landed in #10960, which preserves and renders nested TOML values in task tool options. The published schemas still limited unknown task tool options to strings, so editors and strict validators rejected arrays and nested tables that mise accepts.

The main schema can now reference its existing tool definition directly. mise-task.json keeps an equivalent local definition because it is published and validated independently; an external reference to mise.json would couple standalone and offline validation to cross-file resolution.

Stack

Stacked on #11004 because both changes update the shared schema fixture. Target branch remains main.

Validation

  • mise run render:schema
  • mise run test:e2e config/test_schema_tombi
  • mise run lint-fix

Summary by CodeRabbit

  • New Features

    • Added a bootstrap.mise_shell_activate configuration to declaratively control shell activation for Bash, Zsh, Fish, and common startup/RC files.
    • Expanded task tool configuration validation to align with a shared tool schema, including install environment, dependencies, and post-install actions.
  • Bug Fixes / Tests

    • Improved schema validation behavior for shell activation and task tool tools entries.
    • Extended end-to-end schema regression coverage with stricter negative cases for invalid shell activation targets and malformed activation values.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The schemas now share a broader task-tool definition and support declarative bootstrap shell activation. Tombi fixtures add valid tool and shell activation cases plus strict negative validation for unsupported fields and values.

Changes

Schema validation

Layer / File(s) Summary
Unified task tool contract
schema/mise-task.json, schema/mise.json
Task tool entries reference the shared tool schema, which adds installer metadata and broader extra-property types while preserving related definitions.
Shell activation schema
schema/mise.json
Adds structured bootstrap.mise_shell_activate validation for bash, zsh, fish, and related initialization files.
Tombi schema regression fixtures
e2e/config/test_schema_tombi
Adds valid tool and shell activation fixtures and strict negative cases for unsupported activation targets, invalid zsh values, and boolean node.os.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • jdx/mise#11004: Adds the same shell activation schema and related Tombi validation coverage.

Poem

A rabbit hops through schemas bright,
With shell hooks tucked in just right.
Tools gain options, fields expand,
Bad TOML gets a firm “no” command.
Tombi thumps its testbook tight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main schema change: allowing structured task tool options.

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.

@greptile-apps

greptile-apps Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the JSON Schema definitions for task tool options in both mise.json and mise-task.json so that editors and strict validators accept array and nested-table backend option values that mise already supports at runtime (landed in #10960).

  • schema/mise.json: Replaces the inline oneOf in tasks.*.tools.additionalProperties with a $ref to the existing #/$defs/tool definition, which was already correct and allows unevaluatedProperties of any scalar, array, or nested-object type.
  • schema/mise-task.json: Adds an equivalent standalone tool definition to $defs (matching mise.json's definition structurally) and references it the same way, keeping the standalone schema independently usable without cross-file resolution.
  • e2e/config/test_schema_tombi: Extends valid-fixture examples to exercise array and nested-table backend option values; removes the stale mise-bad-task-tool-extra.toml negative test that was previously asserting the now-permitted nested-object pattern should fail.

Confidence Score: 5/5

Safe to merge — the changes are purely additive schema relaxations that align validation with already-supported runtime behaviour, and both schema files remain consistent with each other.

The tool definition added to mise-task.json is structurally identical to the pre-existing one in mise.json, so there is no drift between the two schemas. The unevaluatedProperties approach is the correct JSON Schema mechanism here: known properties are fully typed, and anything else is allowed as string/number/boolean/array/object to accommodate arbitrary backend options. The e2e Tombi fixture tests are updated consistently.

No files require special attention.

Important Files Changed

Filename Overview
schema/mise.json Replaces the inline oneOf in tasks.*.tools.additionalProperties with a $ref to the existing #/$defs/tool definition, which already permits unevaluatedProperties of type string, number, boolean, array, or nested object.
schema/mise-task.json Adds a standalone tool $defs entry mirroring mise.json's definition, and updates tasks.*.tools.additionalProperties to reference it; also reorders tool_options, env_path, env_paths, and os_filter definitions without semantic change.
e2e/config/test_schema_tombi Adds array and nested-table backend option values to valid tool fixtures; removes the now-invalid mise-bad-task-tool-extra.toml test case since nested backend option objects are intentionally allowed by the updated schema.

Reviews (2): Last reviewed commit: "Merge branch 'main' into agent/schema-ta..." | Re-trigger Greptile

@risu729
risu729 marked this pull request as ready for review July 16, 2026 04:16
@jdx
jdx merged commit 5c44f8a into jdx:main Jul 16, 2026
33 checks passed
@risu729
risu729 deleted the agent/schema-task-tool-values branch July 16, 2026 04:37
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