Switch runtime to cloud config bundle#24622
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
recheck |
f9a036b to
7f490c5
Compare
33f45ee to
78a0d84
Compare
9f9cea6 to
d38594c
Compare
78a0d84 to
438e65e
Compare
438e65e to
194afd0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 438e65ef09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
dc90f07 to
da8a6d7
Compare
cc9ec27 to
fae0096
Compare
da8a6d7 to
4b922aa
Compare
fae0096 to
ccc0c6a
Compare
4b922aa to
b14d255
Compare
ccc0c6a to
ee9df4f
Compare
b14d255 to
81a9b2c
Compare
ee9df4f to
1f13fcf
Compare
2d4d4ea to
f2b36ab
Compare
1f13fcf to
4333622
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2b36ab920
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4333622 to
be7117f
Compare
f2b36ab to
bd5f010
Compare
be7117f to
c4f0868
Compare
bd5f010 to
5fb048c
Compare
c4f0868 to
8aa8462
Compare
0415e4e to
86ae66f
Compare
86ae66f to
db4846e
Compare
6d266b1 to
f30ddc5
Compare
db4846e to
07cdfd2
Compare
f30ddc5 to
c1c5625
Compare
b00a469 to
e440aa1
Compare
c1c5625 to
01afd43
Compare
e440aa1 to
1eccaba
Compare
01afd43 to
aec42eb
Compare
1eccaba to
cded23d
Compare
aec42eb to
01df562
Compare
cded23d to
6993648
Compare
01df562 to
36ebbd0
Compare
6993648 to
2f9b084
Compare
Replace the old cloud requirements runtime path with the unified cloud config bundle loader. Config construction now receives a CloudConfigBundleLoader and uses the shared bundle for both cloud-delivered requirements and cloud-delivered config layers, so config and requirements consumers do not race separate backend fetches. Remove the codex-cloud-requirements crate and legacy CloudRequirementsLoader surface. The new path preserves the existing pull-based load behavior and routes managed requirements through the same composed requirements model while enterprise-managed config fragments are inserted below user/profile/project/session config and above system config. Legacy MDM-delivered managed_config.toml remains the highest-precedence compatibility layer while it is phased out. Thread the bundle loader through app-server, app-server-client, TUI, core config construction, exec, hooks, network proxy loading, and related tests. Update config-manager error handling and tests to report cloudConfigBundle load failures consistently, and update the loader README to describe the new public argument and the effective config-layer precedence. Refresh generated Python SDK protocol artifacts from the local app-server schema so downstream clients know about enterpriseManaged config layers and the cloudManagedConfig hook source. The normal SDK generate-types command still targets the pinned runtime package, so this checkpoint regenerated v2_all.py from the checked-in local schema for the branch-local protocol changes. Add codex_config::test_support::CloudConfigBundleFixture to centralize cloud bundle test setup. The fixture supports quick single-layer enterprise requirement/config loaders, additive enterprise requirement/config layers for multi-layer tests, and conversion into either a bundle or loader, removing copied private helpers from core and app-server tests. Verification: just fmt; just fix -p codex-config; cargo test -p codex-config test_support; cargo test -p codex-core cloud_config_bundle_take_precedence_over_mdm_requirements; cargo test -p codex-app-server write_value_rejects_feature_requirement_conflict; git diff --cached --check. Earlier checkpoint verification also covered codex-cloud-config, codex-backend-client, codex-hooks, codex-core-plugins, selected codex-core cloud config tests, selected codex-app-server cloud config tests, bazel lock update/check, and a Python SDK smoke test for enterpriseManaged and cloudManagedConfig.
Move CloudConfigBundleLoader into ConfigLoadOptions so lower-level config loading does not need a separate bundle parameter or a bundle-specific TOML helper. Keep exec and TUI on the straightforward local helper path: bootstrap from local config, build the shared cloud bundle loader, and reload merged TOML with that loader only when OSS provider inference needs cloud-delivered config. Preserve strict validation and path-base behavior for cloud config and requirements fragments, including diagnostics that name the cloud layer and requirements paths resolved against CODEX_HOME. Validation: just fmt; just test -p codex-core -E 'test(load_config_layers_resolves_relative_cloud_requirements_paths_against_codex_home) | test(strict_config_rejects_unknown_cloud_config_key)'; just test -p codex-config; just test -p codex-exec -E 'test(top_cli_parses_resume_prompt_after_config_flag)'; just test -p codex-tui -E 'test(app_server_target_for_launch_prefers_explicit_remote_endpoint)'; just fix -p codex-config -p codex-core -p codex-exec -p codex-tui -p codex-app-server -p codex-core-plugins; git diff --check.
Adapts the runtime config loading call sites to the RequirementsLayerEntry name introduced by the requirements composition PR. This keeps the final config-bundle runtime switch aligned with the renamed layer-entry abstraction while preserving the existing loading semantics.
Keeps the cloud config bundle fixture module focused by moving its unit tests into a named sibling test file. This mirrors the test organization used by the cloud config modules and avoids putting implementation and test bodies in the same file.
Updates the remaining legacy cloud requirements test-builder call to use the cloud config bundle loader helper. This fixes the top PR Bazel/clippy failure after removing the old cloud requirements path.
36ebbd0 to
a919f8f
Compare
2f9b084 to
ce00443
Compare
Summary
PR 5 of 5 in the cloud-managed config client stack.
Switches runtime config loading over to the unified cloud config bundle, wires all managed requirements sources through the shared requirements-layer composer, and removes the legacy
codex-cloud-requirementsruntime path.Details
CloudConfigBundleLoader, and both cloud-delivered requirements and cloud-delivered config layers are read from that same snapshot.requirements.toml, cloud bundle fragments, legacymanaged_config.toml, and MDM are normalized into lowest-to-highest precedenceRequirementsLayers before composition, matching config-layer ordering.cloudConfigBundleerrors, with auth-related failures classified for relogin handling.Validation
Local validation:
just fmtcargo check -p codex-configjust test -p codex-config requirements_compositiongit diff --checkCI will run the broader test matrix.