Repository navigation
feat: let projects take tickets from several Linear teams - #331
Conversation
A project's Linear choice keeps its first team where it was and the others in more_teams. Delegations of any of them start its sessions, agents' ticket calls reach all of them, and the Tickets tab lists them.
…team list With several teams, a label or a state that only another team has is refused naming the ticket's team and what it has. The scope names a team's Linear project without nested parentheses, the Add a team list shows a plus, and the hint is shorter.
A ticket filed with a parent now has its title and description checked before fctl asks Linear for the parent, and a place that names no team of the project's is refused naming them as a choice.
|
Partly addressed as of fctl reviewed Three independent reviews found no high-severity bugs; stored single-team settings, older clients and the generated types all hold up. The findings below are low-severity. On lines the diff doesn't show:
Reviewed by fctl · Review agent settings |
| .transpose()?; | ||
| let parent = match parent.as_deref() { | ||
| Some(p) => Some(linear_issue(client, l, p).await?), | ||
| None => None, |
There was a problem hiding this comment.
--in now fails on one-team Linear projects
Low severity. TicketRequest::Create used to ignore place for Linear (place: _). Now tk::linear_place rejects anything that isn't the team's key or name, so an agent or script that passes fctl ticket create --in owner/name to a single-team Linear project starts failing with "isn't a team of this project's".
Found by fctl review in 0beb37e.
There was a problem hiding this comment.
Intended, so no change. A place that names no team of the project is refused rather than ignored so that a ticket never lands somewhere other than the agent asked: with one team, ignoring --in DES would file it in ENG without a word. Agents are told about --in only where it chooses something (GitHub Issues of several repositories, Linear of several teams), fctl ticket exists only in sandboxes, and the refusal says where to file instead ("OPS isn't a team of this project's: file the ticket in ENG"), so an agent that passes it anyway recovers in its next call.
…e KEY: … Undoing teams taken off puts each back after the teams that came before it as saved, so that undoing every change gives the saved list in any order, and the Save bar counts only which team comes first. The CLI tries --linear-project's whole text as a project's name when the KEY: reading finds none, and the workspace's Linear tab says teams.
|
On the review's fourth finding (the copy in the workspace's Linear tab, which has no thread): fixed in 8915e05, which says "Each project chooses the Linear teams it takes tickets from". |
…88) ## Summary The privacy policy's Linear entry now says what fctl does there as it works today: it moves a ticket on through its team's workflow as its session works (to In Progress, In Review and Done, as the project lets it), which it has done since hyperstructure/fctl#322, rather than only to its first started state. It also says agents reach "the tickets their project takes from Linear" instead of "the tickets of their project's team", which stays true once a project can take tickets from several teams (hyperstructure/fctl#331), so this can merge before, with or after that pull request. What fctl stores and who receives it don't change; `updated` moves to today. - hyperstructure/fctl#331 [fctl session](https://app.fctl.sh/s/ses_01M63YR66H5WGRSBA13X57VW9B) --------- Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
…328) ## Summary The Linear integration showed and let through more than people and agents should reach: - The workspace's Linear tab and a project's Tickets tab listed every project that takes a Linear workspace's tickets, with its name and address, to members who can't see those projects. They now list the ones the person sees, within an access token's places. - Any member could list a connected Linear workspace's teams, workflows and open projects, at a cost of thousands of points against an API that every fctl workspace connected to it shares. Now only the workspace's admins and its projects' maintainers, who choose teams, can; the web app asks only for them. - A Linear team kept while the tracker was GitHub's, and never checked, was taken unchecked when only the tracker turned to Linear (`fctl_domain::tickets::linear_changed`). - A ticket call that failed gave its place within its limit back, though it had asked Linear or GitHub all the same, so a sandbox could loop failing writes without end and use up a shared Linear API. Failed writes now count against a limit of their own, 60 an hour, which every write needs room in, and a call names at most 20 labels, since GitHub takes each label removed in a request of its own. - A comment's `reply_to` went to Linear unchecked; it now has to be one of the ticket's own comments. A delivery for a Linear agent session also moves on only a thread of its own Linear workspace. Verified in `cargo xtask dev` with its Linear stand-in: a member without a role in a project doesn't see it in the lists, and only admins and maintainers list teams; turning only the tracker to Linear checks the team; the 61st failing update in an hour is refused while reads go on; a reply under another comment and a 25-label update are refused; and a viewer's Tickets tab shows the saved team, and names the states as what they are, without asking for the teams. New tests cover the tracker check, the label limit and what a viewer sees. With `main` merged in, the checks and limits hold for projects of several Linear teams (#331), whose Tickets tab already lists the teams only for those who choose them; the domain, CLI and web tests pass on the merge. The other fixes from the same security pass: - #325 - #326 - #327 - #329 ## Worth confirming - **Decision:** members who neither administer the workspace nor maintain one of its projects can no longer list a connected Linear workspace's teams; they see their projects' saved teams instead. - **Decision:** a session's agent writes nothing more to its tracker after 60 writes that failed in an hour, and a call names at most 20 labels. [fctl session](https://app.fctl.sh/s/ses_01M62HVCXZDZV6GJJP8DDQGDFF) --------- Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com> Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
Summary
A project whose tracker is Linear now takes tickets from one team or several of its Linear workspace (at most 20), each of all its issues or of one of its Linear projects. Delegating an issue of any of them to fctl, or mentioning fctl on one, starts a session of the project. Agents'
fctl ticketcalls list and view the tickets of all of them, file new ones in the first team unless they name another (fctl ticket create --in DES; a sub-ticket goes to its parent's team), and take each ticket's states and labels from its own team, saying which team when one lacks what they asked for.fctl projects set --linear-team ENG,DES, and--linear-projecttakesDES:Website(or a name that only one of the teams has, orDES:all), repeatable.LinearTicketsfields and the others go in a new optionalmore_teams, so older hosts, CLIs and control planes read a project of several teams as one of its first team. An update that leavesmore_teamsout keeps the stored teams, so an older CLI or a tab opened before the deploy can't drop them;[]clears them. Saving asks Linear only about teams that changed. ADR 0065 (docs/adr/0065-projects-take-tickets-from-several-linear-teams.md) records the design.I verified it with new unit tests (domain, CLI, web) and
cargo xtask check. I also ran it end to end incargo xtask devwith the Linear stand-in: delegating DES-1 started a Playground session and moved the issue to In Progress; agent calls listed both teams' tickets, filed tickets in each team (by--in, by parent, by default), refused a ticket outside a team's Linear project, and named the team for a missing label or state; settings updates sent as an older client and as a newer one behaved as described.cargo xtask linear checkconfirms that Linear's schema takes the new queries (orfilters,teams(filter: { id: { in } })).This touches the same functions as #328 (
tickets.rs, the Tickets tab,check_linear), so whichever of the two merges second needsmainmerged in. A matching sentence in fctl.sh's privacy policy changes in:Screenshots
At 0beb37e, from
cargo xtask devwith the Linear stand-in's Acme workspace, 1280 px wide unless noted.One team, as most projects have, before and after:
Two teams, Design narrowed to its Brand refresh project, with where agents file new tickets:
Editing before a save: Platform added (New), Design taken off (Undo), and the states Platform's workflow adds ("Code review"):
The Add a team list, and a phone at 390 px:
Worth confirming
--in; the Tickets tab's "Agents file new tickets in" makes the chosen team the first.fctl session