Skip to content

guardian: isolate review context from skills and memories#28285

Merged
jif-oai merged 1 commit into
mainfrom
jif/guardian-context
Jun 15, 2026
Merged

guardian: isolate review context from skills and memories#28285
jif-oai merged 1 commit into
mainfrom
jif/guardian-context

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Why

Guardian reviews embed the parent session transcript as untrusted evidence. Skill or plugin mentions in that transcript must not be interpreted as requests to inject more instructions into the Guardian request, and memory context adds unrelated model-visible context to an approval decision.

Keeping those sources out of the nested review session makes the request smaller and preserves the trust boundary around the transcript being assessed.

What changed

  • Skip skill and plugin discovery when building turns for Guardian reviewer sessions.
  • Disable memory context and dedicated memory tools in the derived Guardian configuration.
  • Extend the Guardian request-layout coverage to verify that a $skill mention remains visible only as transcript evidence while neither the skill body nor memory context is injected.
  • Expand the Guardian configuration test to cover the disabled memory settings.

Testing

  • Updated the Guardian review request snapshot and assertions for skill and memory isolation.
  • Extended the Guardian session configuration test to cover memories.

@jif-oai
jif-oai requested a review from a team as a code owner June 15, 2026 09:43
@jif-oai jif-oai changed the title feat: optimize guardian context guardian: isolate review context from skills and memories Jun 15, 2026

@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: 4640faa650

ℹ️ 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/core/src/guardian/tests.rs
@jif-oai
jif-oai merged commit a18de1f into main Jun 15, 2026
31 checks passed
@jif-oai
jif-oai deleted the jif/guardian-context branch June 15, 2026 17:24
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 15, 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.

2 participants