Support multiple forced ChatGPT workspace ids in config and requirements#17959
Open
rreichel3-oai wants to merge 4 commits intomainfrom
Open
Support multiple forced ChatGPT workspace ids in config and requirements#17959rreichel3-oai wants to merge 4 commits intomainfrom
rreichel3-oai wants to merge 4 commits intomainfrom
Conversation
Add a shared ForcedChatgptWorkspaceIds config type that accepts the existing single string form or an array of workspace IDs. Update ChatGPT login, device-code, external auth, app-server, CLI, and TUI enforcement paths to allow any configured workspace. Regenerate config/app-server schemas and document the single-value and array config forms.
Allow requirements.toml and cloud requirements to specify forced_chatgpt_workspace_id using the same single string or array shape as config.toml. Prefer the requirements value during config resolution, expose it through configRequirements/read, and regenerate app-server schema fixtures. Document requirements precedence and add targeted coverage for requirements parsing, config resolution, API mapping, and cloud requirements fixtures.
e09c173 to
0f54c3a
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
forced_chatgpt_workspace_idto be configured as either a single string or an array of workspace IDsconfig.tomland managedrequirements.toml/ cloud requirementsExample
Single workspace remains supported in either
config.tomlorrequirements.toml:Multiple allowed workspaces can now be configured with an array:
If both files specify
forced_chatgpt_workspace_id, the value fromrequirements.tomlwins. Codex trims whitespace and ignores empty string entries; an explicitly empty list remains an active allowlist and permits no ChatGPT workspace.Testing
just fmtjust write-config-schemajust write-app-server-schemacargo test -p codex-core forced_chatgpt_workspace_id_accepts_string_and_listcargo test -p codex-login workspacecargo test -p codex-app-server-protocolcargo test -p codex-protocolcargo test -p codex-app-server external_auth_refresh_mismatched_workspace_fails_turncargo test -p codex-tui local_chatgpt_authjust fix -p codex-protocol -p codex-config -p codex-core -p codex-login -p codex-app-server-protocol -p codex-app-server -p codex-cli -p codex-tuicargo test -p codex-config forced_chatgpt_workspace_idcargo test -p codex-core forced_chatgpt_workspace_idcargo test -p codex-app-server map_requirements_toml_to_apicargo test -p codex-cloud-requirementscargo test -p codex-core legacy_managed_config_backfillcargo test -p codex-core load_config_layers_includes_cloud_requirementscargo test -p codex-tui debug_configjust fix -p codex-protocol -p codex-config -p codex-core -p codex-cloud-requirements -p codex-app-server-protocol -p codex-app-server -p codex-tuijust fmtgit diff --checkDid not run the full workspace
cargo test; repo guidance asks for confirmation before running the complete suite after core/protocol changes.