Repository navigation
feat(platform): let a project's dispatch work other projects' boards - #5001
Merged
Merged
Conversation
A dispatch names other projects' boards as sources (TASK-R70 to R76): its pool takes their ready work in one order with its own, its agents, standing roles' agents and reviewers are assigned to, started on and work those boards' tasks while the dispatch reaches them, its reviewers review its pool's work there, a run there follows both projects' instructions and records the agent's own project, and a board says which dispatches serve it. Each source is judged at every use on the right of whoever last saved the dispatch, and skipped with why when it is gone, archived or that right is lost. Published in the dispatch readback, the settings tools and managed configuration.
A run of another project's agent on a board that project's dispatch serves was judged on the board's project alone, so someone who edits only the served board got the agent's standing workspace, its secrets and brokered credentials, and task tools across every board the dispatch serves. Such a run now gets the agent's full equipment only while its starter may act in both projects and the agent still reaches the board; anyone else's run is confined to its task in a workspace of its own. A run's task tools reach only the served boards its starter may act in, besides its own task's; a run the dispatch started keeps the dispatch's whole reach. Stated as TASK-R79.
…its readers Everyone who reads a project reads its dispatch, and the readback listed its agents' runs on every board it serves with their task titles and numbers, the served projects' names, and the serving projects' names in the other direction. A run on a board the reader may not read is now counted and not listed, and a source, a serving dispatch or a serving agent's project the reader may not read answers name null; the Dispatch page reads "A project you cannot open" and links nothing. Stated as TASK-R80.
The assignee picker read "this project has no agents" from every agent it lists, and those now include the agents other projects' dispatches put on the board. A served board without agents of its own therefore stopped offering the organization's standard agent and the Create agent row. The picker now judges that from the project's own agents, counts the agents as loading until the serving agents are read too, and names a serving project the viewer may not read as "another project's dispatch".
…rved Deleting a project agent cleared its assignments on its own project's board only, so a task its dispatch had handed it on a served board kept pointing at an agent that no longer exists: the board showed the raw id and a retry started an agent that cannot exist. The delete now clears the agent from every board of the organization, records each task's assignee.changed line in that task's own project, and hints every board that lost it. Deleting a project does the same for its agents, and stops their live runs on the boards its dispatch served (PROJ-R12, PROJ-R16).
The connector task listing joined the assignee agent on the task's own project, so a served board's task assigned to an agent of the serving project listed its assignee without a name. It now joins the agent by its id in the organization, as the board's actor catalog does.
…Postgres The dispatch-across-projects lane now judges people who edit only one of the two projects: Bea, who edits Billing alone, starts the Coder on a Billing task and gets a confined run in a workspace of her own, Dan, who edits Development alone, would too, and the owner's run takes the standing workspace (TASK-R79). Dan, outside Billing's team, reads Development's dispatch with the Coder's Billing runs counted, not listed, and Billing unnamed; Bea is not told whose dispatch serves her board (TASK-R80). Deleting the Coder at the end clears it from the Billing cards it held, with Billing's own history lines (PROJ-R12).
…dits memberEditableProjects read only the caller's teams, so a project's own API key with the Editor role counted as an editor of every project its role reached. A run it started on a served board could then pass as started by an editor of both projects. The edit right now honours the key's project scope, as the acting audience already does elsewhere.
A dispatch serves another board on the right of whoever saved it last. Once that person lost the right, an unchanged declaration converged, so apply never saved it again and the board stayed skipped. The readback's servesAgain now counts as drift, and the apply saves the same document on the caller's right (TASK-R72).
…edit both kickAgentRun is the door every person-started run passes through without a chosen workspace: Start agent, a comment, a move to In progress, their run's retry and a delegated start. Bea, who edits only Billing, and Dan, who edits only Development, get member workspaces; Ada, who edits both, gets the standing one (TASK-R79).
…s is lost The app's editor sends the stored sources back with every save, and the save refused any source that was archived, deleted or beyond the writer's right. Once a served board was archived, or a project admin lacked edit rights on one, every save was refused, switching the dispatch off included. A source kept exactly as stored is no longer checked again, since every use judges it on the last saver's right, and a save that only switches the dispatch off is never refused (TASK-R70). The documented remedy for a board skipped for want of authority, saving the dispatch again even unchanged, could not be reached: the editor enabled Save only when dirty, and the settings tools read an unchanged document as converged. The configuration readback now says servesAgain when the caller's save would serve such a board again; the editor then offers Save unchanged with a notice, and the settings tools treat the same document as a change (TASK-R72).
Main shipped 3.47.0, so this change takes 3.48.0: the history paragraph now states which source changes a save checks, the switch-off and serve-again rules and how a person's run reaches served boards. The OpenAPI document, both contract fingerprints, the MCP skill snapshot and the API reference's 'since contract' sentence follow, and the reference names the null project names a reader outside a project receives.
The dispatch readback built four rows by spreading inside map callbacks, which the type-aware lint refuses (oxc/no-map-spread). One helper now keeps a row's project name for a reader who may read that project and nulls it for anyone else. The lane's switch-off check and a test helper's typing follow the same lint and the typecheck.
The domain-specs guard holds a rule's heading to 80 characters; the card's body keeps the rest.
3 of 5 tasks
…odule runStarterActingProjects and runStarterMayActWithAgent are used only inside run-authority.ts; knip refuses them as unused exports.
yannickmonney
force-pushed
the
feat/dispatch-across-projects
branch
from
October 15, 2026 15:02
025a022 to
97d4020
Compare
A run a person started, woke, moved, retried or handed on, on a board another project's dispatch serves, now finds and reads tasks, documents and knowledge only of the projects that person may read: the agent's own project drops out of task_find, task_get, document_find and rag_search/rag_fetch when they may not read it. A run the dispatch started keeps the agent's project and every board it serves, acting for whoever last saved the dispatch (TASK-R82).
A reader who may not read a board a dispatch serves no longer reads the labels that select its work, in the Dispatch page's readback, the REST readback, managed configuration and the settings tools; a gate shows only labels of projects they read, and a gate left with none is not shown. Whoever may administer the dispatch reads it whole, since a save writes it back (TASK-R80).
yannickmonney
marked this pull request as ready for review
October 15, 2026 16:43
yannickmonney
added a commit
that referenced
this pull request
Oct 15, 2026
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.
What
A project's dispatch can now serve the boards of other projects of the same organization. The use case: owner projects (one per product or client) receive intake on their own boards, and one central Development project's pool ("Coder", up to 256 workers) and its Reviewer work all of those boards.
@tale/shared/schemas/project-dispatch): optionalsources: [{projectId, statuses?, labels?{include, exclude}}](at most 20, each project once, never the dispatch's own) andreviewers: [agentId](at most 10, agents of the project grantedtask_review). A dispatch without either reads, hashes and behaves as before; the managed-configuration hash test holds this.POST …/dispatch/by-project/{id}/configuration/check, so a refused cross-project dispatch stops the whole declaration before anything is written. A source kept exactly as stored is not checked again, and a save that only switches the dispatch off is never refused for what it names (TASK-R70). Every pass, start and tool call judges each source again on the right of whoever last saved the dispatch. A source that is missing, archived or no longer editable is skipped (source_missing/source_archived/source_no_authorityin the pass,skippedin the readback), and no other person's right is used in its place. A save by another writer re-anchors the dispatch to that person's right, even if the document is unchanged; the editor, the settings tools and the CLI offer that save when it would serve a skipped board again (TASK-R72).backend/domains/tasks/dispatch-reach.ts). The agent's home project's dispatch must list the task's project and still reach it, and the agent must be in that dispatch's pool, its standing roles or its reviewers. Everything that lets an agent near a task uses this check: assignment (assertAssigneeValid),lockAgentForStart(so run-start and delegated-start),kickAgentRun(every start), the task-tool scope (task_find/get/comment/update_status/update_metadata/review/delegate_review; no creates and notask_start_agenton a served board), and review eligibility and routing. Independence rules are unchanged: a reviewer never reviews its own work.task_find,task_get,document_findandrag_search/rag_fetchleave that project out (ownProjectExcluded,runProjectScopeinrun-authority.ts). Its task tools reach the other served boards only as far as that person may edit them. A run a schedule began reads the agent's project only while the schedule may act there.0216_agent_run_home_project.sql, nullableagent_project_id). Occupancy,perAgentConcurrencyandmaxConcurrentRunscount an agent's runs on every board. A run that ends asks for a pass of both projects' dispatches. The turn gets both projects' instructions with an explicit precedence: the board's project decides its board's conventions, and the agent's own project decides how the agent works. Both digests are recorded.CANDIDATES_PER_PASS(500) across all of them. Gates govern by label name across every served board.GET /api/app/tasks/dispatch/by-project/{id}/serving-agentslets a served board name those agents and offer them as assignees and reviewers ("From 's dispatch"); mentions still reach only the project's own agents. Another project, and the runs on its board, are named only to a reader who may read it. A reader who may not read a served board also does not see the labels that select its work, and a gate shows only labels of projects they read (a gate left with none is not shown). This holds in the Dispatch readback,GET /api/v1/projects/{id}/dispatch, the managed-configuration readback and the settings tools. Whoever may administer the dispatch reads it whole, because a save writes it back under its hash (TASK-R80).sources,reviewers,servedByand each listed run'sprojectIdonGET /api/v1/projects/{id}/dispatch, withname: nullfor a project the caller may not read.public/openapi.json, both contract fingerprints and the MCP skill snapshot are regenerated.TASK-R70–TASK-R76,TASK-R79–TASK-R82indomains/tasks/spec.md(main holds R61–R69 and R77/R78);PROJ-R12/PROJ-R16updated for agent deletion. Docs in EN/DE/FR: dispatch, project agents, task automation (reviews), API reference, settings tools. Messages in EN/DE/FR (+ de-CH where it overrides). Manual boxesPROJ-F71–PROJ-F73,PROJ-B25–PROJ-B29, and an automation row for the review fixes.Also fixed on this branch: an assignment can outlive the dispatch's reach. Until now only the dispatch's own pass and delegated starts judged reach, so Start agent, a move to In progress, a late comment's run or an automatic retry could still start the agent on a board its tools could no longer touch.
kickAgentRunnow refuses such an agent before writing anything (AGENT_NOT_ALLOWED_IN_PROJECT). Start agent answersagent_out_of_reachbefore the card moves (worded in EN/DE/FR). The status move still happens but starts no run. The late comment answers with a refusal. The retry is retired and its watchers are told.Review fixes
An independent review found one blocker, three major and three minor issues. All are fixed, each with tests:
run-authority.tsnow judges a run of another project's agent by both projects and by current reach (runStarterMayActWithAgent), and limits a person-started run's tool scope to the boards its starter may edit (runReachedProjects). Every door goes through it: Start agent, comment wake, move to In progress, automatic retry and delegated start all kick throughkickAgentRun→sessionIdForAgentRun; the launch (agent-turn-shim) and every tool call (shim.ts) useisTaskRunConfined; the worker claim re-chooses the family. A project's own API key now edits only its own project in this judgement (edit-right.ts). Unit tests (run-authority.test.ts,agent-runs.test.ts,shim.dispatch-reach.test.ts,edit-right.test.ts) fail with the fix removed (10 failures checked); the Postgres lane covers Bea (Billing only), Dan (Development only) and an editor of both.servedByand serving agents' projects answername: null; the UI reads "A project you cannot open" / "From another project's dispatch" (TASK-R80).assignee.changedin that task's own project and hints every affected board (PROJ-R12, PROJ-R16).servesAgainwhen the caller's save would serve a board skipped forno_authority; the editor then shows a notice and enables Save unchanged, the settings tools plan the same document as a change, andtale config applytreats it as drift and saves it (TASK-R72).Review fixes, round 2
An independent re-review of
97d4020a44left two blockers and one minor finding. All three are fixed, each with tests:backend/jobs/task-list.agent-retry.test.tsdid not answerreadAgentHome, so the retry path read the agent as another project's and askedproject_dispatch, which the fake did not answer. The fake now answers with the agent's own project (ef4fcba69a). The whole platform server project now passes: 1471 files and 22853 tests (2 files and 19 tests skipped). No other fake fails this way.memberReadableProjectsinedit-right.ts,runProjectScopeinrun-authority.ts,ownProjectExcludedinshim.ts→resolveTargetProject/loadTaskInScopeinworkspace_domain_tools.ts, andresolveKnowledgeToolAccessnow judges the task run its token names: an ended or revoked run reads no knowledge, and a run whose starter may not read the agent's project gets only the organization's shared knowledge); (c)enabledgates reach, so a switched-off dispatch serves nothing (984a2343a5). Tests fail without each part: Bea, who cannot read Development (run-authority.test.ts,shim.dispatch-reach.test.ts,workspace_tools_bridge.test.ts, and the Postgres lane's Bea/Dan/owner/dispatch scopes); the switched-off dispatch (dispatch-reach.test.ts,reviews.dispatch.test.ts, and the lane switching off and on); and the dispatch-started run. SpecTASK-R81andTASK-R82, docs (EN/DE/FR) and manual boxesPROJ-B28andPROJ-B29are added.readDispatchAsReader(indispatch-readback.ts) withholds a hidden source's labels, and the gate labels that name only labels of hidden boards. It applies to the status readback and to the configuration readback (dispatch-config.ts). The Dispatch page shows "—" for those labels, not "Every ready task". Tests:dispatch-readback.test.tsandproject-dispatch-tab.test.tsx.Why
Before this change a dispatch was single-project. Its candidates, pool and roles had to belong to the project, an agent belonged to exactly one project, starts and task tools required agent and task in the same project, and review routing was same-project. So the fleet's central pool could not work the intake boards.
Deviations from the brief
Undecided:whether a served board's administrators may refuse being served (today: remove the writer's right or archive the project).How tested
Round 1 on
97d4020a44; round 2 on the final tree (77c0f8e6a0, onorigin/main5ddb7e1457; main has not moved, contract stays 3.48.0):@tale/platform,@tale/sharedand@tale/cli;tsc --noEmitfor all three: green.knip --workspace services/platformreports only three unused exports in files this branch does not touch.servervitest project, 1471 files and 22853 tests, green (2 files and 19 tests skipped). Platform UI project for all ofapp/features: 701 files and 7782 tests. One test inautomations/.../version-compare-page.test.tsxtimed out at 5 s under load (load average about 36). This branch does not touch that file, and it passes when rerun alone (11/11).tsc --noEmitfor platform (8 GiB heap), shared and cli: green. Type-aware oxlint on the 80 changed platform files and on the changed shared files: green. The CLI's ownoxlinton its changed files: green. oxfmt on every changed file: green.@tale/shared: 55 files and 1038 tests, green.@tale/cliconfig tests: 324, green.lint:manual,lint:linksand the domain-spec guard: green.knip --workspace services/platformreports only the same three unused exports in files this branch does not touch.backend/domains/{tasks,projects,sandbox,connectors},backend/rest,tests/guards(domain specs included),lib/mcp,scripts/openapiandlib/i18n: 259 files and 5001 tests, green.app/features/{projects,tasks}and the dispatch adapter: 115 files, 1157 tests, green.@tale/shared: 55 files, 1038 tests, green.@tale/cliconfig tests: 324 tests, green.lint:manualandlint:linksgreen.check-guideon the projects suite reports onlytasks.detail.comments, which is already on main; the tasks suite is clean.backend:integration, which needs a Postgres from thetale-dbimage (no tale-db on this host). Round 2 adds two checks to the lane: the read scopes of Bea, Dan, the owner and the dispatch, and switching off and on again. Neither has run on Postgres yet; the reviewer's local 14/14 run predates them. The lanecheckDispatchAcrossProjectscovers authority at save, one order across boards, run ownership and home project, occupancy across boards, both instructions, assign/lock across projects, review routing, served-by and serving agents, skipping on a lost right and on archive, the Start agent refusal after reach is lost, person-started runs by editors of one or both projects, readback names for a reader outside a source's team, re-serving on an unchanged save, switching off with an archived source, and agent deletion across boards. It runs in the merge queue's Backend integration check.Upgrade facts
0216adds a nullable column; the previous image writes NULL and readerscoalesceit to the run's project.sourcesorreviewersas one saved by a newer version (its schema is strict). It shows it as such and makes no pass for it until the new image serves. Dispatches without the new fields are unaffected.sources/reviewersthrough managed configuration needs a CLI at this version. The declaring key needs the right to edit every source it adds or changes; the CLI's pre-apply check names the refused path.no_authorityshows the unchanged dispatch as an update and saves it.GET /api/v1/projects/{id}/dispatchmay answername: nullfor a source or serving dispatch, and count runs it does not list, for a caller who cannot read that project. For a caller who also may not administer the dispatch, that source'slabelsis null, the source is absent fromconfig.sources[].labels, gate labels only on hidden boards are dropped, a gate left with none is omitted, andhashis the hash of what the caller reads. Contract shape unchanged.run_ended/schedule_revokedfor a task run that ended or may no longer act, as its task tools already did.agent_out_of_reach, and its reviewers stop receiving routed reviews.Not done
backend:integrationnot run locally (see How tested), including the two lane checks added in round 2..github/release-notesfile (the release session prepares them); the facts above are for it.