Support forced workspace ids in requirements

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.
This commit is contained in:
rreichel3-oai
2026-04-15 16:54:04 -04:00
parent cad30d2689
commit 0f54c3a97b
14 changed files with 198 additions and 7 deletions
+5 -3
View File
@@ -57,8 +57,8 @@ The generated JSON Schema for `config.toml` lives at `codex-rs/core/config.schem
## Managed ChatGPT Workspace Restrictions
Managed deployments can restrict ChatGPT login to one or more workspace IDs with
`forced_chatgpt_workspace_id`. Existing single-workspace configurations remain
valid:
`forced_chatgpt_workspace_id` in either `config.toml` or `requirements.toml`.
Existing single-workspace configurations remain valid:
```toml
forced_chatgpt_workspace_id = "workspace_id"
@@ -73,7 +73,9 @@ forced_chatgpt_workspace_id = ["workspace_id_a", "workspace_id_b"]
Codex trims whitespace from configured workspace IDs and ignores empty entries.
An empty list remains an active allowlist and allows no ChatGPT workspace. If
this setting is present, ChatGPT credentials whose token workspace ID is not in
the configured allowlist are rejected and logged out.
the configured allowlist are rejected and logged out. A value from
`requirements.toml` takes precedence over ordinary config because requirements
are managed policy.
## SQLite State DB