Repository navigation
feat: turn off a plugin pack for one chat - #241
Conversation
|
@codex review
|
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: 68c95af7ec
ℹ️ 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".
Merge gates on head 68c95af:
|
With the
fork-plugin-packsexperiment on, a chat owner can now turn off a plugin pack for one chat, even when the chat's project enables it. A pack turned off on a chat stays off for that chat and its subagents, and turning it off wins over every enablement.chat_excluded_plugin_packs(requires the enablement node). Rows cascade with the chat, the organization and the pack. A trigger rejects a row whose chat is in another organization than the pack.InsertChatExcludedPluginPack,DeleteChatExcludedPluginPackandGetExcludedPluginPacksByChatID, with dbauthz (the same chat update and read checks as the chat's own enablements) and dbmetrics wrappers.GET /api/v2/chats/fork/{chat}/excluded-plugin-packsandPUT/DELETE .../{pluginPack}, plus the SDK methodsForkChatExcludedPluginPacks,ExcludeForkChatPluginPackandIncludeForkChatPluginPack. A pack in another organization answers 404.enabledPacksinchatd/fork_plugin_gate.godrops every pack turned off on the chat or any ancestor. If that lookup fails it returns no packs, so the gate fails closed. Resource filtering, cleanup, the materializer and the agent catalog all useenabledPacks, so they follow it.ARCHITECTURE.mdgets one TODO for the new table.The composer toggle comes in a follow-up PR stacked on this one.
Validation on 04879c5 (this head adds only the ARCHITECTURE.md TODO):
coderd/enterprise/codersdk, vet,TestForkQuerier,TestSQLCSchemaOrder,TestFilterPackResources,TestForkPluginPackEnablement,TestForkChatRoutes,EndpointsDocumentedandTestSwagger. All pass.enabledPacksignores exclusions,TestFilterPackResources/Enablementfails.