Skip to content

fix(bootstrap): pin relative config dir during reexec - #12721

Merged
jdx merged 1 commit into
mainfrom
codex/fix-bootstrap-relative-config-dir
Sep 3, 2026
Merged

jdx merged 1 commit into
mainfrom
codex/fix-bootstrap-relative-config-dir

Conversation

@jdx

@jdx jdx commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Testing

  • mise run test:e2e e2e/cli/test_bootstrap_from
  • mise run lint-fix

AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable.


Note

Low Risk
Narrow bootstrap --from-git re-exec env forwarding fix with E2E coverage; no auth or data-path changes beyond config directory resolution.

Overview
bootstrap --from-git clones into the config directory and re-runs mise from that checkout. Without pinning, a relative MISE_CONFIG_DIR would be reinterpreted after the child changes working directory, so the clone location and config discovery could diverge from what the parent intended.

This change resolves relative MISE_CONFIG_DIR against the parent’s current directory and passes the absolute path into the child via MISE_CONFIG_DIR, mirroring the existing behavior for relative MISE_GLOBAL_CONFIG_FILE. Optional global config file forwarding stays under the same from_git block.

E2E coverage asserts that with a relative config dir, the repo is cloned there, origin matches, and the bootstrap task still runs.

Reviewed by Cursor Bugbot for commit 62e062b. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed --from-git bootstrapping when MISE_CONFIG_DIR is set to a relative path.
    • Configuration directories now remain correctly resolved when the bootstrap process changes into the checkout directory.
    • Preserved forwarding of the global configuration during bootstrap re-execution.

@coderabbitai

coderabbitai Bot commented Sep 2, 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: 1686211b-1a04-41cd-9a30-7760252c69dd

📥 Commits

Reviewing files that changed from the base of the PR and between 166064c and 62e062b.

📒 Files selected for processing (2)
  • e2e/cli/test_bootstrap_from
  • src/cli/bootstrap.rs

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


📝 Walkthrough

Walkthrough

The Git bootstrap re-execution now converts a relative MISE_CONFIG_DIR to an absolute path. An end-to-end test verifies configuration persistence after the child changes into the checkout.

Changes

Git bootstrap configuration

Layer / File(s) Summary
Resolve configuration directory during re-execution
src/cli/bootstrap.rs, e2e/cli/test_bootstrap_from
The child process receives an absolute MISE_CONFIG_DIR while preserving global config forwarding. The test verifies the checkout remote and bootstrap task output with a relative configuration path.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 62e06

This change keeps relative configuration directories stable when bootstrap re-executes from a cloned repository and adds coverage for the behavior. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: risu729

Poem

A rabbit checks the config trail
Relative paths no longer veer
The checkout keeps its task in sight
The child finds its config right
And hops through bootstrap bright

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: preserving a relative MISE_CONFIG_DIR during bootstrap re-execution.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI

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 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR preserves a relative MISE_CONFIG_DIR across the bootstrap --from-git re-exec by resolving it before the child changes into the checkout.

  • Exports the resolved configuration directory to the child process.
  • Retains the existing checkout-relative handling for MISE_GLOBAL_CONFIG_FILE.
  • Adds end-to-end coverage verifying both the cloned repository and its bootstrap task remain discoverable.

Confidence Score: 5/5

The PR appears safe to merge, with the relative configuration directory preserved consistently across the checkout re-exec.

Startup applies directory selection before bootstrap dispatch, so the new absolute path uses the same base as parent configuration discovery, while default and already-absolute paths retain their existing effective values.

Important Files Changed

Filename Overview
src/cli/bootstrap.rs Resolves the effective configuration directory against the parent working directory and passes it through the from-git child re-exec without an identified behavioral regression.
e2e/cli/test_bootstrap_from Adds focused regression coverage for relative configuration-directory checkout and task discovery.

Reviews (1): Last reviewed commit: "fix(bootstrap): pin relative config dir ..." | Re-trigger Greptile

@jdx
jdx merged commit 0d9bc3b into main Sep 3, 2026
33 checks passed
@jdx
jdx deleted the codex/fix-bootstrap-relative-config-dir branch September 3, 2026 03:38
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