Skip to content

Use trusted Guardian templates for managed policies - #60646

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/7f00bfaa85051272ed70ceb2fcb64ffc297b8755
Nov 10, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/7f00bfaa85051272ed70ceb2fcb64ffc297b8755

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Use trusted Guardian templates for managed policies

Why

User-configured model catalogs can supply Guardian prompt templates that omit policy slots or add conflicting instructions. Managed rules need a trusted template to reach the reviewer.

What changed

  • Use the bundled Guardian policy template when managed policy or additional rules are present, while preserving explicit host-provided templates.
  • Remove auto_review.extra_policy and auto_review.experimental_policy_template from configuration and the schema. Warn when they are used, directing additional rules to guardian_extra_policy in managed requirements.toml.

Testing

Add regression coverage for managed rules with user-supplied catalog templates, explicit host templates, and migration warnings for the removed settings.

## Why

User-configured model catalogs can supply Guardian prompt templates that omit policy slots or add conflicting instructions. Managed rules need a trusted template to reach the reviewer.

## What changed

- Use the bundled Guardian policy template when managed policy or additional rules are present, while preserving explicit host-provided templates.
- Remove `auto_review.extra_policy` and `auto_review.experimental_policy_template` from configuration and the schema. Warn when they are used, directing additional rules to `guardian_extra_policy` in managed `requirements.toml`.

## Testing

Add regression coverage for managed rules with user-supplied catalog templates, explicit host templates, and migration warnings for the removed settings.

GitOrigin-RevId: 7f00bfaa85051272ed70ceb2fcb64ffc297b8755
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/7f00bfaa85051272ed70ceb2fcb64ffc297b8755 branch from d645a46 to a2b7c4a Compare November 10, 2026 19:30
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-10T19:30:44.533002Z d645a46 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit a2b7c4a into main Nov 10, 2026
9 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/7f00bfaa85051272ed70ceb2fcb64ffc297b8755 branch November 10, 2026 19:30
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant