Repository navigation
feat: let members run workflows in their own chats - #261
Conversation
The fork-workflows tools, the run list and detail API and the stop path no longer require the chat owner to hold the deployment owner role. A run belongs to its chat, so the chat's access rules cover it: the owner of a chat runs, awaits, reads and stops its runs, and nobody reaches the runs of a chat they cannot read. The Workflows tab shows for members too.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9dc852f6e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A run ID of a chat the caller cannot read failed authorization in the run detail and answered 500 with the denial; it now answers 404 like a missing run. A Vitest covers the Workflows tab on a member's root chat.
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Merge evidence for head
|
Part of #226
Members can now run workflows in their own chats. Until now the
fork-workflowstools and the run API worked only when the chat owner held the deployment owner role (#242). This PR removes that role check, so a run follows the access rules of its chat:run_workflowandawait_workfloware offered on every root chat turn outside plan mode and explore mode, whatever role the chat owner holds.await_workflowand the stop still resolve a run only through its own chat ID, so one chat never reads or stops another chat's run.ExtractChatParamalready authorizes the chat read through dbauthz, so whoever cannot read the chat gets a 404, and the stop still authorizes as a chat update first.Everything stays behind
fork-workflows. Saved workflows are not onmainyet, so they need no tier rules here.docs/fork/pstack-adapter.mdsays nothing about workflow access, so it is unchanged.Tests
TestForkWorkflowToolsGate/MemberRunsAndStopsOnlyInOwnChat: a plain member gets both tools and starts a run throughrun_workflow. Another member's chat cannot await or stop that run. The owner of the chat stops it, andawait_workflowthen readsstopped.TestForkWorkflowRunsRoutes/MemberOwnChatOnly: a member lists and reads the runs of their own chat and stops a running run (the journal saysstopped). Another member gets a 404 on the list, the detail and the stop, and the run staysrunningafter that refused stop. The member also gets a 404 on the deployment owner's chat.