Skip to content

fix(admin): scope memory provenance by tenant#277

Merged
smaramwbc merged 1 commit into
smaramwbc:mainfrom
skarL007:codex/fix-admin-memory-provenance-tenant-scope
Jul 8, 2026
Merged

fix(admin): scope memory provenance by tenant#277
smaramwbc merged 1 commit into
smaramwbc:mainfrom
skarL007:codex/fix-admin-memory-provenance-tenant-scope

Conversation

@skarL007

@skarL007 skarL007 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • applies the optional tenant filter to admin memory provenance lookups
  • scopes source episodes and sibling memories to the requested tenant
  • adds a regression test covering all three provenance queries

Tests

  • PYTHONUTF8=1 python -m pytest tests/test_admin_memory_provenance_tenant_scope.py tests/test_admin_compiler_trace_tenant_scope.py -q
  • PYTHONUTF8=1 python -m pytest tests/test_tenant_scoping_invariant.py tests/test_route_limits_invariant.py tests/test_no_raw_tokenization.py -q
  • PYTHONUTF8=1 python -m ruff check server/api/admin.py tests/test_admin_memory_provenance_tenant_scope.py

@smaramwbc smaramwbc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Verified: tenant scoping applied to all 3 provenance queries (memory, source episodes, siblings), matches the established admin route pattern, new unit test passes locally, ruff clean, CI green. Cross-tenant provenance leak fix for shared subjects.

@smaramwbc
smaramwbc merged commit 2d4434c into smaramwbc:main Jul 8, 2026
5 checks passed
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