Skip to content

perf(platform): join readable projects in the automation readers #5201

Closed

Description

@tale-code-bot

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 automation readers.

What the reads do now

readableProjectIds (services/platform/backend/domains/automations/project-visibility.ts) reads every project the caller may read, archived ones included, with listProjects, and hands the id list on. Its callers filter runs, bindings and templates by that list:

  • backend/domains/automations/routes.ts (9 calls);
  • backend/domains/automations/dispatch-store.ts (3 calls);
  • backend/rest/v1-automations.ts (1 call);
  • backend/domains/automations/templates.ts, which takes the list as a parameter.

What to do

  • Where a statement filters automations, bindings or runs by the projects the caller may read, join readableProjectsSql(sql, auth, { includeArchived: true }) (backend/domains/projects/service.ts) in that statement instead of reading the list first.
  • Where a reader checks a few named projects, ask for those alone (readableProjectsAmong).
  • Keep the rule for archived projects: they stay readable here.

Done means:

  • no automation reader sends the caller's whole project-id list back as ANY(<ids>), and none reads an unbounded project list;
  • tests cover the visibility rules (PROJ-R1, PROJ-R2) through the join, and project-visibility.integration.ts proves them on Postgres.

Activity

  1. added
    agent-ready
    on Oct 31, 2026
  2. added
    perf
    on Oct 31, 2026
  3. tale-code-bot commented on Oct 31, 2026

    @tale-code-bot
    CollaboratorAuthor

    Landed on release/0.6 with feature train #5221 (merged by rebase on 2026-10-31 at 20:26:51 UTC) as commit 4d8dba7 (perf(platform): join readable projects in the automation readers). 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-286.

  4. 20 remaining items

  5. added 11 commits that reference this issue on Nov 4, 2026
    463c2d6
    67553ee
    a105d5c
    2e11741
    eb40891
    b07500d
    2aab69e
    03d0e61
    2023359
    e70071c
    fc990df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyperf

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions