Skip to content

feat(examples): add supervisor middleware content guard#2169

Draft
pimlock wants to merge 5 commits into
1733-supervisor-middleware/pmlocekfrom
1733-supervisor-middleware-example/pimlock
Draft

feat(examples): add supervisor middleware content guard#2169
pimlock wants to merge 5 commits into
1733-supervisor-middleware/pmlocekfrom
1733-supervisor-middleware-example/pimlock

Conversation

@pimlock

@pimlock pimlock commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Note

This is example usage of the middleware that is being introduced in #2027

Add a runnable supervisor middleware content-guard example that demonstrates external middleware registration, policy binding, request-body inspection, and allow/deny/redact responses. This is a stacked draft PR based on 1733-supervisor-middleware/pmlocek.

Related Issue

Related to #1733

Changes

  • Add a standalone Rust content-guard gRPC service using the supervisor middleware API
  • Support configurable term matching with redact and deny modes, findings, and audit-safe metadata
  • Add an example middleware policy and setup/run instructions
  • Keep the example lockfile reproducible and aligned with the current workspace dependencies

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

The example includes unit coverage for redaction, denial, pass-through, and invalid configuration. No dedicated E2E test is included in this example PR.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

The parent middleware branch contains the corresponding architecture and user-facing middleware documentation; this stacked PR adds the runnable example.

pimlock added 5 commits July 6, 2026 17:15
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@pimlock

pimlock commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 06c0433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant