Scope workspace roots per account

This commit is contained in:
Hamza Ayed
2026-10-03 01:44:00 +03:00
parent 1b56f70aa6
commit 4345e43e29
10 changed files with 250 additions and 54 deletions
@@ -38,7 +38,13 @@ class MixedPdfKnowledgeIntegrationTests(unittest.TestCase):
try:
with (
patch.object(database, "DATABASE_PATH", database_path),
patch.dict(os.environ, {"KNOWLEDGE_EMBEDDING_MODEL": "granite-embedding:278m"}),
patch.dict(
os.environ,
{
"KNOWLEDGE_EMBEDDING_MODEL": "granite-embedding:278m",
"SOVEREIGNAI_ALLOWED_WORKSPACES": str(data_dir),
},
),
patch("app.main.embeddings.embed_texts", new=AsyncMock(side_effect=fake_embeddings)),
):
database.initialize_database()