You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(platform): bound the knowledge scopes' readable projects #5202
Split from #5193, which was split from #5156 (item 4 of 7 of #4708). The change for #5193 (TALE-283, branch perf/join-readable-projects-readers, on its way to feature-train) joins readableProjectsSql in the document search, the create-task fallback and the chat hand-over; this issue takes the knowledge access scopes.
What the reads do now
Two scopes read every project the caller may read with listProjects and hand the id list to the knowledge database:
callerScope in services/platform/backend/domains/knowledge/routes.ts (active projects);
the knowledge scope in services/platform/backend/domains/chat/shim.ts (archived projects included, and their ids again as archivedProjectIds), which the chat tools, the MCP door and the sandbox bridge resolve.
The knowledge database filters by that list (d.project_id = ANY($n) in backend/core/knowledge/corpus.ts). It cannot join app.projects, so readableProjectsSql does not reach it as things stand.
What to do
Decide and record a design that bounds what crosses to the knowledge database. Two starting points: hand the knowledge read the caller's audience (admin, teams, a key's project) and resolve the readable projects where the documents' project is known; or send only the readable projects that hold indexed documents.
Keep each scope's rule for archived projects.
Done means:
neither scope reads an unbounded project list, and neither sends the caller's whole project-id list as ANY(<ids>);
tests cover the visibility rules (PROJ-R1, PROJ-R2) for both scopes.
Split while working this issue (TALE-287). The change for this issue makes two changes:
it bounds both knowledge scopes to the readable projects that hold a document, in one statement through readableProjectsSql;
it checks a single project with readableProjectsAmong.
The chat tools' work legs (tasks and projects search and listing) also took the full readable list from the chat knowledge scope. Their part is filed as #5207. Until #5207 lands, those legs read their list through their own query, unchanged.
Landed on release/0.6 with feature train #5221 (merged by rebase on 2026-10-31 at 20:26:51 UTC) as commit f5ac166 (perf(platform): bound the knowledge scopes' readable projects). It ships with Tale 0.6.0. GitHub closes issues only for commits on main, so the feature-train role closes this one. Task: TALE-287.
Activity
perf(platform): join readable projects in three server readers
tale-code-bot commentedon Oct 31, 2026
Split while working this issue (TALE-287). The change for this issue makes two changes:
readableProjectsSql;readableProjectsAmong.The chat tools' work legs (tasks and projects search and listing) also took the full readable list from the chat knowledge scope. Their part is filed as #5207. Until #5207 lands, those legs read their list through their own query, unchanged.
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
tale-code-bot commentedon Oct 31, 2026
Landed on
release/0.6with feature train #5221 (merged by rebase on 2026-10-31 at 20:26:51 UTC) as commit f5ac166 (perf(platform): bound the knowledge scopes' readable projects). It ships with Tale 0.6.0. GitHub closes issues only for commits onmain, so the feature-train role closes this one. Task: TALE-287.perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
21 remaining items
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in three server readers
perf(platform): bound the knowledge scopes' readable projects