-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fixed config merging issue with profiles #9509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR fixes a small issue with chained (nested) config.toml file merging. The old logic didn't properly handle profiles. The change adds a unit test for this case. It also exposes a function from the config crate that is needed by the app server code paths to implement support for chained configs.
This PR adds support for chained (layered) config.toml file merging for clients that use the app server interface. It does the following: * Changes code paths for new thread, resume thread, and fork thread to use the effective config based on the cwd. * Updates the `config/read` API to accept an optional `cwd` parameter. If specified, the API returns the effective config based on that cwd path. Also optionally includes all layers including project config files. If cwd is not specified, the API falls back on its older behavior where it considers only the global (non-project) config files when computing the effective config. The changes in codex_message_processor.rs look deceptively large. They mostly just involve moving existing blocks of code to a later point in some functions so it can use the cwd to calculate the config. This PR builds upon #9509 and should be reviewed and merged after that PR.
bolinfest
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@etraut-openai could you please expand the PR body to explain what the fix was? I see the new unit test, which is great, but I also see a bunch of changes to TUI code that I did not expect. It seems like there is some relationship between restoring cwd and profile correctness, which is not obvious, so I think that should be explained in the PR body.
…rusted workspaces
This PR fixes a small issue with chained (layered) config.toml file merging. The old logic didn't properly handle profiles.
In particular, if a lower-layer config overrides a profile defined in a higher-layer config, the override did not take effect. This prevents users from having project-specific profile overrides and contradicts the (soon-to-be) documented behavior of config merging.
The change adds a unit test for this case. It also exposes a function from the config crate that is needed by the app server code paths to implement support for layered configs.