Clarify codex_home base for MDM path resolution#15707
Merged
Merged
Conversation
60e47c8 to
1195fce
Compare
bolinfest
reviewed
Mar 25, 2026
bolinfest
left a comment
Collaborator
There was a problem hiding this comment.
Here is the language I would use instead: I want to make it clear that ./ is not intentionally supported in this case.
Comment on lines
+288
to
+291
| // Use codex_home as the synthetic base so AbsolutePathBufGuard expands | ||
| // both `~` and `./` here. MDM should prefer `~` or other absolute | ||
| // paths; we continue to resolve `./` for compatibility with existing | ||
| // managed configs. |
Collaborator
There was a problem hiding this comment.
Suggested change
| // Use codex_home as the synthetic base so AbsolutePathBufGuard expands | |
| // both `~` and `./` here. MDM should prefer `~` or other absolute | |
| // paths; we continue to resolve `./` for compatibility with existing | |
| // managed configs. | |
| // As a general rule, config from MDM should _not_ include relative paths, | |
| // starting with `./`, but a path starting with `~/` _is_ a supported use case. | |
| // Because resolve_relative_paths_in_config_toml() relies on | |
| // AbsolutePathBufGuard to resolve `~/`, we must supply a value for base_dir, | |
| // so codex_home is a good a value as any. |
rreichel3-oai
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the follow up code comment Michael asked for at the MDM
managed_config_from_mdm- a follow up from #15351.Validation
cargo fmt --all --checkcargo test -p codex-core managed_preferences_expand_home_directory_in_workspace_write_roots -- --nocapturecargo test -p codex-core write_value_succeeds_when_managed_preferences_expand_home_directory_paths -- --nocapture./tools/argument-comment-lint/run-prebuilt-linter.sh -p codex-core