Fix bank config API for multi-tenant schema isolation#417
Merged
nicoloboschi merged 2 commits intomainfrom Feb 20, 2026
Merged
Conversation
- Use fq_table() in config_resolver.py to schema-qualify bank table queries - Add authenticate_and_resolve_schema() to bank config API handlers in http.py Without these fixes, bank config operations in multi-tenant mode hit public.banks instead of tenant_xxx.banks, causing "column config does not exist" errors.
…hema The MemoryEngine method is _authenticate_tenant(), not authenticate_and_resolve_schema(). This was causing AttributeError on all bank config API requests.
r0gig0r
pushed a commit
to r0gig0r/hindsight
that referenced
this pull request
Feb 23, 2026
…ptimization Upstream changes (5 commits): - vectorize-io#417: Fix bank config API for multi-tenant schema isolation - vectorize-io#420: Add ZeroEntropy reranker provider support - vectorize-io#421: Fix reflect based_on population and enforce full hierarchical retrieval - vectorize-io#423: Improve memory footprint of recall (drop embedding from retrieval pipeline) - vectorize-io#424: Include doc metadata in fact extraction prompts Conflict resolution: - fact_extraction.py: kept both our bank_mission and upstream's metadata params - search/types.py: re-added optional embedding field for recall_exp diversity clustering (upstream removed it from standard recall path for memory savings) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_authenticate_tenant()calls to all 3 bank config API handlers (GET/PATCH/DELETE) so the_current_schemacontextvar is set before database queries runfq_table("banks")inconfig_resolver.pyto generate schema-qualified table names (e.g.,tenant_xxx.banks) instead of barebanksWithout these fixes, bank config operations in multi-tenant deployments query the wrong schema (public instead of tenant-specific), causing "column not found" errors.
Test plan
cd hindsight-api && uv run pytest tests/ -v