Skip to content

[plugins] Add marketplace source requirements#29690

Merged
xl-openai merged 1 commit into
mainfrom
xl/marketplace-source-admission
Jun 24, 2026
Merged

[plugins] Add marketplace source requirements#29690
xl-openai merged 1 commit into
mainfrom
xl/marketplace-source-admission

Conversation

@xl-openai

@xl-openai xl-openai commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Why

Managed deployments need a mergeable way to declare which marketplace sources Codex may use. An enterprise-keyed TOML table avoids array merge ambiguity and lets every requirements layer use the existing config precedence rules without a marketplace-specific merger.

Requirements shape

[marketplaces]
restrict_to_allowed_sources = true

[marketplaces.allowed_sources.company_plugins]
source = "git"
url = "https://github.com/example/company-plugins.git"
ref = "main"

[marketplaces.allowed_sources.internal_git]
source = "host_pattern"
host_pattern = "^git\\.example\\.com$"

[marketplaces.allowed_sources.local_plugins]
source = "local"
path = "/opt/company/codex-plugins"

restrict_to_allowed_sources follows normal scalar precedence. allowed_sources follows normal recursive TOML table merge behavior: distinct keys accumulate and fields under the same key use normal layer precedence. The final source value later selects which fields the marketplace admission policy interprets.

The raw rule fields remain optional while requirements layers are composed, so a higher-priority layer can override only ref, url, or another individual field. Source-specific validation and normalization intentionally belong to the marketplace admission layer, not requirements merging.

This initial shape includes git, host_pattern, and local sources. It does not add npm or path-pattern rules.

What changed

  • Add the marketplace requirements TOML shape to ConfigRequirementsToml, ConfigRequirementsWithSources, and ConfigRequirements.
  • Carry marketplace requirements through the existing regular requirements merge path.
  • Keep allowed-source entries as raw partial tables for downstream policy interpretation.
  • Cover partial same-key overlays, source changes, unknown fields, and unmodified local paths.

This PR defines and composes the requirements only. Source admission is implemented by the next PR in the stack.

Stack

This is PR 1 of 3. #29753 adds source admission on top of this PR; draft #29691 will add runtime enforcement after it is rebased later.

Test plan

  • just test -p codex-config marketplace_

@xl-openai xl-openai force-pushed the xl/marketplace-source-admission branch 2 times, most recently from 74505d8 to 2917cca Compare June 23, 2026 23:33
@xl-openai xl-openai marked this pull request as ready for review June 23, 2026 23:34
@xl-openai xl-openai requested a review from a team as a code owner June 23, 2026 23:34
@xl-openai xl-openai force-pushed the xl/marketplace-source-admission branch from 2917cca to cf169c5 Compare June 23, 2026 23:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2917cca2e1

ℹ️ 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".

Comment thread codex-rs/cli/src/marketplace_cmd.rs Outdated
Comment thread codex-rs/core-plugins/Cargo.toml Outdated
@xl-openai xl-openai force-pushed the xl/marketplace-source-admission branch from cf169c5 to 712d186 Compare June 23, 2026 23:43
@xl-openai xl-openai force-pushed the xl/marketplace-source-admission branch from 712d186 to a749876 Compare June 24, 2026 00:28
@xl-openai xl-openai changed the title [plugins] Add marketplace source admission requirements [plugins] Add marketplace source requirements Jun 24, 2026
@xl-openai xl-openai force-pushed the xl/marketplace-source-admission branch from a749876 to b6afbd3 Compare June 24, 2026 00:56
@xl-openai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6afbd3625

ℹ️ 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".

Comment thread codex-rs/config/src/requirements_layers/stack.rs
Comment thread codex-rs/config/src/config_requirements.rs
Comment thread codex-rs/config/src/config_requirements.rs Outdated
@xl-openai xl-openai force-pushed the xl/marketplace-source-admission branch from b6afbd3 to 730a101 Compare June 24, 2026 01:38
@xl-openai

Copy link
Copy Markdown
Collaborator Author

@codex review again

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 730a101ca6

ℹ️ 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".

@xl-openai xl-openai enabled auto-merge (squash) June 24, 2026 01:51
@xl-openai xl-openai disabled auto-merge June 24, 2026 02:35
@xl-openai xl-openai merged commit 2696e71 into main Jun 24, 2026
43 of 47 checks passed
@xl-openai xl-openai deleted the xl/marketplace-source-admission branch June 24, 2026 02:42
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants