Skip to content

fix(evals): update multitenant eval tests for OGX rename#5637

Open
varshaprasad96 wants to merge 2 commits intoogx-ai:mainfrom
varshaprasad96:eval/rename-to-ogx
Open

fix(evals): update multitenant eval tests for OGX rename#5637
varshaprasad96 wants to merge 2 commits intoogx-ai:mainfrom
varshaprasad96:eval/rename-to-ogx

Conversation

@varshaprasad96
Copy link
Copy Markdown
Contributor

@varshaprasad96 varshaprasad96 commented Apr 27, 2026

Summary

Update the multitenant security eval tests in tests/evals/multitenant/ for the OGX rename.

Changes

  • Imports: llama_stackogx, llama_stack_apiogx_api
  • conftest.py: Use EmbeddedChunk for add_chunks (API change), add chunk_id to Chunk constructor
  • test_resource_access_control.py: Fix PUBLIC_MODEL to use owner=None for unowned resources
  • bench_e2e_latency.py: Rename --llama-stack-url--ogx-url, update comments
  • bench_predicate_pushdown.py: Update imports

Verified

$ uv run pytest tests/evals/multitenant/ -q
51 passed in 1.45s

Signed-off-by: Varsha Prasad Narsing varshaprasad96@gmail.com

🤖 Generated with Claude Code

- Fix imports: llama_stack -> ogx, llama_stack_api -> ogx_api
- Fix bench scripts: rename CLI args and comments
- Fix conftest: use EmbeddedChunk for add_chunks (API change)
- Fix PUBLIC_MODEL: use owner=None for unowned resources
- Add chunk_id to Chunk constructor (now required)
- Make bench scripts executable (pre-commit requirement)

All 51 tests pass.

Signed-off-by: Varsha Prasad Narsing <vnarsing@redhat.com>
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
PUBLIC_MODEL = _MockResource(
resource_type="model",
identifier="llama-3-base",
owner=User(principal="system", attributes={}),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why change this test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

IIUC - there is a "resource is unowned" rule (

when=["resource is unowned"],
) which checks "not resource.owner". With the old owner=User(principal="system", attributes={}), the
resource is truthy (owned but with empty attributes), so it doesn't match the unowned rule or any attribute matching rules (which is why we get access gets denied for everyone). Setting owner=None makes it correctly match the resource is unowned rule, which permits access to all authenticated users.

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.

2 participants