Skip to content

fix(catalog): enforce provider.use policies on available providers during config reload (#52333) - #52682

Closed
JerryLiu369 wants to merge 1 commit into
anomalyco:devfrom
JerryLiu369:fix/52333-policy-hot-reload
Closed

JerryLiu369 wants to merge 1 commit into
anomalyco:devfrom
JerryLiu369:fix/52333-policy-hot-reload

Conversation

@JerryLiu369

@JerryLiu369 JerryLiu369 commented Oct 2, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #52333

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

During config or plugin hot-reloads, experimental.policies statements could be bypassed if requests/model lookups occurred before catalog finalization finished, because CatalogV2.provider.available() previously only filtered by integration availability without evaluating provider.use policy rules.

This PR ensures CatalogV2.provider.available() directly filters providers through policy.evaluate("provider.use", provider.id, "allow") !== "deny" whenever policy statements exist, failing closed immediately and preventing denied providers/models from becoming selectable during reload windows. Also adds regression test coverage in catalog.test.ts.

How did you verify your code works?

  • Tested with bun test test/catalog.test.ts test/policy.test.ts in packages/core (all 18 tests pass).
  • Full core suite tested with bun test in packages/core (all 1102 tests pass).

Screenshots / recordings

N/A

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…ring config reload (anomalyco#52333)

Filter denied providers directly in CatalogV2.provider.available() based on
active policy statements so that policy enforcement fails closed immediately
during config or plugin hot-reloads.
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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.

config: [security] provider.use deny policies are bypassed during config hot-reload — session traffic can silently go to a third-party free provider

2 participants