fix(schema): align env directive options - #12793
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe environment schemas now support deprecated directive aliases, restrict ChangesEnvironment schema validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Environment directive schemas now recognize deprecated aliases, reject unsupported expansion on path and source entries, and strictly validate Python virtual-environment options. The change is ready to merge. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
Entire-Checkpoint: 01M1Q6SJWPRM1YEE0TWJN84W12
8a46cdf to
39d72a0
Compare
Greptile SummaryThis PR aligns the environment-directive schemas with runtime behavior.
Confidence Score: 4/5The schema changes appear safe to merge, with a non-blocking gap in regression coverage for several newly modeled contracts. Runtime and schema behavior align for the aliases, path/source expansion handling, and Python option strictness; the remaining concern is that tests cover only the expansion-rejection portion of the change. Files Needing Attention: e2e/config/test_schema_tombi Important Files Changed
Reviews (1): Last reviewed commit: "fix(schema): align env directive options" | Re-trigger Greptile |
| # `expand` is only read for `_.file`; reject it on path/source directives so | ||
| # editors do not suggest that the option has an effect there. | ||
| for directive in \ | ||
| '_.path = { paths = ["./bin"], expand = true }' \ | ||
| '_.source = { path = "env.sh", expand = true }'; do | ||
| cat >"$HOME/workdir/mise-bad-env-directive-expand.toml" <<TOML | ||
| [env] | ||
| $directive | ||
| TOML | ||
| assert_fail "$TOMBI_LINT mise-bad-env-directive-expand.toml" | ||
| done |
There was a problem hiding this comment.
Incomplete schema regression coverage
The added tests only check that expand = true is rejected for path and source directives. They do not cover the newly accepted value, values, and env.mise aliases or verify that unknown Python virtual-environment options are rejected. Since the two schemas are maintained separately, adding positive alias cases and negative Python-property cases would help prevent future drift between the schemas and runtime behavior.
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!
|
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. |
|
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. |
Summary
valueandvaluesaliases for environment directives[env.mise]alias using the same contract as[env._]expand = trueThis is one scope split from #12531. It is independent and based directly on
main; #12794 separately covers vars values and directives. The three PRs can merge in any order.Validation
mise run render:schemamise run test:e2e e2e/config/test_schema_tombiSchema-only change; runtime behavior is unchanged.
AI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.
Summary by CodeRabbit
Bug Fixes
expandsettings on path and source directives.Compatibility
value/valuesaliases for environment paths.env.misealias.Tests