Skip to content

fix(schema): align vars shapes with the parser - #12794

Draft
risu729 wants to merge 1 commit into
jdx:mainfrom
risu729:schema/vars-parser-shapes
Draft

fix(schema): align vars shapes with the parser#12794
risu729 wants to merge 1 commit into
jdx:mainfrom
risu729:schema/vars-parser-shapes

Conversation

@risu729

@risu729 risu729 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • accept false-removal values and parser-supported option tables in [vars]
  • model object and array forms for vars._.file, vars._.path, and vars._.source
  • reject tools = true, which the non-tools vars resolver silently drops
  • reject the unsupported [vars.mise] alias and no-op path/source expansion

This is one scope split from #12531. It is independent and based directly on main; #12793 separately covers the corresponding environment-directive aliases and options.

Validation

  • mise run render:schema
  • mise run test:e2e e2e/config/test_schema_tombi

Schema-only change; runtime behavior is unchanged.

AI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.

Entire-Checkpoint: 01M1Q6TQZG3QB0DG8RD4Q5DWQX
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: 4671a0b0-7ca0-4a6e-b72b-4d4e28be6629

📥 Commits

Reviewing files that changed from the base of the PR and between e2925ed and f5ce171.

📒 Files selected for processing (3)
  • e2e/config/test_schema_tombi
  • schema/mise-task.json
  • schema/mise.json

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The vars schemas now support structured file, path, and source directives; boolean values; encrypted entries; and tools fields constrained to false. Required-value validation rejects invalid combinations, and vars.mise is rejected. Tombi fixtures cover valid and invalid cases.

Vars schema validation

Layer / File(s) Summary
Vars directive definitions
schema/mise.json, schema/mise-task.json
Adds reusable schemas for file, path, and source directives. Path and source directives reject expand, and vars entries require tools = false.
Variable entry rules
schema/mise.json, schema/mise-task.json
Updates plain, default, required, and encrypted variable entries to support environment-style values, tools validation, and required-value rules. Rejects vars.mise.
Schema regression fixtures
e2e/config/test_schema_tombi
Adds valid and invalid coverage for structured values, encrypted entries, directive forms, floats, required flags, reserved names, and tools restrictions.

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

Merge Risk: ⚪ Minimal · up to f5ce1

This updates vars schema validation to accept supported directive forms and reject unsupported configurations, with matching regression coverage. No current merge-blocking risk remains.

Suggested reviewers: jdx, jambalaya56562, marukome0743

Poem

A rabbit checks each vars-shaped line
With carrots sorted into schema design
False tools flags hop into place
Required rules keep a steady pace
Tombi guards each path and name
The burrow validates the change

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
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: updating the vars schema to match parser-supported shapes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.

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 Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR aligns the generated configuration schemas with runtime parsing of [vars].

  • Accepts false-removal values and supported vars option tables.
  • Models scalar, object, and array forms for vars._ file, path, and source directives.
  • Rejects unsupported vars.mise, tools = true, and ineffective path/source expansion.
  • Extends strict Tombi fixtures, although some newly added accepted directive branches remain uncovered.

Confidence Score: 4/5

The schema changes appear safe to merge, with a non-blocking test-coverage gap around newly modeled directive object and mixed-array forms.

No behavioral mismatch was established between the changed schemas and runtime parsing; the only finding is that several newly introduced accepted branches lack direct regression coverage.

Files Needing Attention: e2e/config/test_schema_tombi

Important Files Changed

Filename Overview
schema/mise.json Updates the primary schema to model parser-supported vars values and directives while rejecting unsupported or ineffective options.
schema/mise-task.json Applies the corresponding vars schema definitions and restrictions to task configuration.
e2e/config/test_schema_tombi Adds positive and negative vars schema fixtures, but does not positively exercise object path/source directives or option-table array entries.

Reviews (1): Last reviewed commit: "fix(schema): align vars shapes with the ..." | Re-trigger Greptile

Comment on lines +174 to +176
_.file = { path = ".env", redact = true, required = true, expand = true }
_.source = ["env.sh"]
_.path = "./bin"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Directive forms lack coverage

The positive fixture tests an object only for _.file; _.source contains only a string and _.path is scalar. This leaves the newly added object forms for _.path and _.source, along with object entries inside directive arrays, without regression coverage. A schema-generation change that rejects these parser-supported forms could therefore pass this test. Please add positive fixtures for a path or source object and an array containing an option table.

Knowledge Base Used: Testing and end-to-end validation

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 1 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 2 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

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