Skip to content

Override local apps settings with requirements.toml settings#14304

Merged
canvrno-oai merged 7 commits intomainfrom
canvrno/requirements_toml_enforces_app_enablement
Mar 13, 2026
Merged

Override local apps settings with requirements.toml settings#14304
canvrno-oai merged 7 commits intomainfrom
canvrno/requirements_toml_enforces_app_enablement

Conversation

@canvrno-oai
Copy link
Copy Markdown
Contributor

@canvrno-oai canvrno-oai commented Mar 11, 2026

This PR changes app and connector enablement when requirements.toml is present locally or via remote configuration.

For apps.* entries:

  • enabled = false in requirements.toml overrides the user’s local config.toml and forces the app to be disabled.
  • enabled = true in requirements.toml does not re-enable an app the user has disabled in config.toml.

This behavior applies whether or not the user has an explicit entry for that app in config.toml. It also applies to cloud-managed policies and configurations when the admin sets the override through requirements.toml.

Scenarios tested and verified:

  • Remote managed, user config (present) override

    • Admin-defined policies & configurations include a connector override:
      [apps.<appID>] enabled = false
    • User's config.toml has the same connector configured with enabled = true
    • TUI/App should show connector as disabled
    • Connector should be unavailable for use in the composer
  • Remote managed, user config (absent) override

    • Admin-defined policies & configurations include a connector override:
      [apps.<appID>] enabled = false
    • User's config.toml has no entry for the the same connector
    • TUI/App should show connector as disabled
    • Connector should be unavailable for use in the composer
  • Locally managed, user config (present) override

    • Local requirements.toml includes a connector override:
      [apps.<appID>] enabled = false
    • User's config.toml has the same connector configured with enabled = true
    • TUI/App should show connector as disabled
    • Connector should be unavailable for use in the composer
  • Locally managed, user config (absent) override

    • Local requirements.toml includes a connector override:
      [apps.<appID>] enabled = false
    • User's config.toml has no entry for the the same connector
    • TUI/App should show connector as disabled
    • Connector should be unavailable for use in the composer
image image
@canvrno-oai canvrno-oai force-pushed the canvrno/requirements_toml_enforces_app_enablement branch from 0746db8 to 21e3d30 Compare March 11, 2026 23:58
@canvrno-oai canvrno-oai force-pushed the canvrno/requirements_toml_enforces_app_enablement branch from 21e3d30 to 61398b9 Compare March 12, 2026 22:57
@canvrno-oai canvrno-oai marked this pull request as ready for review March 12, 2026 23:25
allowed_web_search_modes,
feature_requirements,
mcp_servers,
apps,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge_unset_fields treats the new apps table as a single all-or-nothing field. Once a higher-precedence layer has any apps entry, lower-precedence layers can no longer add independent app disables; even an empty higher-priority apps table blocks lower layers entirely.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks! I've added merge_enablement_settings_descending (and tests), which for now is only for AppsRequirementsToml but could be abstracted out to other enablement settings in the future. This will ensure that we process enabled settings in descending order, giving preference to any false values from any managed sources. It will not enable any downstream configs, only disable them.

@canvrno-oai canvrno-oai force-pushed the canvrno/requirements_toml_enforces_app_enablement branch from 00c5548 to 9e261de Compare March 13, 2026 18:58
@canvrno-oai
Copy link
Copy Markdown
Contributor Author

/merge

@canvrno-oai canvrno-oai merged commit 914f7c7 into main Mar 13, 2026
35 of 36 checks passed
@canvrno-oai canvrno-oai deleted the canvrno/requirements_toml_enforces_app_enablement branch March 13, 2026 19:40
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants