Skip to content

[3552 by Claude Opus 5.5] Plugin slash commands: write authorization, handler commands and shared command ownership - #3581

Merged
propr-dev[bot] merged 4 commits into
3542-epic-plugin-system-xu8from
3552/claude-opus-5-5-plugin-slash-commands-wri-20261116-0911-db6
Nov 16, 2026
Merged

propr-dev[bot] merged 4 commits into
3542-epic-plugin-system-xu8from
3552/claude-opus-5-5-plugin-slash-commands-wri-20261116-0911-db6

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3552

Branch: 3552/claude-opus-5-5-plugin-slash-commands-wri-20261116-0911-db6
Commits: ✅ Changes committed (f8853e4)


AI Processing Completed

Execution Details:

Summary:
Plugin commands can now use write access, call a handler, and share a name across plugins. Everything I ran passes: the plugin, extension and OpenAPI suites, the 21 root suites that load the changed comment-intake and job code, plugins:check, the Plugins page UI tests, typechecks for every package, and zero-warning lint on the changed files. I did not run the full repository suite or the Playwright suite (the Plugins page end-to-end tests).

Write access (needsWrite)

  • Such a command runs only when two things hold:
    • An administrator switched on "Allow this command to use write access" for it on the Plugins page. It is off at install.
    • The commenter has write, maintain or admin permission on the repository.
  • Otherwise ProPR replies saying which of the two is missing, and nothing starts.
  • When the command is accepted, ProPR records a write grant tied to that plugin, command, repository and issue or PR number. The run uses it up when it starts, through the extension library's existing write-authorization path. A retry of the run or a later follow-up finds it used and gets read servers only.
  • The grant covers only the plugin's own write servers that the command names. I added an optional writeServers limit to the extension request so other write servers in the library stay out. Without that, switching write on would also have brought in every other auto-applied write server.

Handler commands (kind: 'handler')

  • The comment's repository, number, commenter and argument are queued as a delivery of kind command and shown in the plugin's Activity.
  • The delivery id comes from the comment id, so a redelivered comment is queued once.
  • A new runner in the daemon runs these deliveries with the same retry schedule as events, and waits while the plugin's deliveries are paused. The handler gets the full ctx, so it can comment back through ctx.propr and call out with ctx.http.
  • Failed command deliveries have no Retry button; posting the command again runs it again.

Shared command names

  • A command can be marked shared. The manifest check and plugins:check require each plugin that does so to also declare a specific command of the same kind.
  • Enabling two plugins with the same name is allowed only when both mark it shared.
  • The plain name runs the only enabled plugin offering it, or the owner an administrator chose. With several and no owner, it replies naming the specific commands.

Plugins page

  • A new Commands section has the write switch and the shared-owner choice, with who changed each and when.
  • Both changes are recorded in the audit trail. An owner change is also recorded on the previous and new owner plugins.
  • The Install step explains which commands can use write access and that they start off.
  • Two new admin-only routes back this: PUT …/commands/<name>/write and PUT …/commands/<name>/owner.
  • One new migration holds the command settings, shared owners, write grants and the command delivery input.

The example plugin gains /example-status, a handler command that logs who ran it and where. Two fixture plugins, fixture-deploy-one and fixture-deploy-two, each offer a shared /deploy, and the first also has a needsWrite command with a write server. I checked that the main write test fails if the writeServers limit is removed. Previews of the Commands section, the install text and a command delivery in Activity are attached.

Acceptance criteria

  • AC1: met — packages/core/src/plugins/pluginCommands.ts, pluginCommandSettings.ts, src/jobs/pluginCommandTask.ts, packages/shared/src/extensionLibrary.ts; packages/core/test/pluginCommandAuthorization.test.ts, test/pluginCommandWriteGrant.test.ts
  • AC2: met — packages/core/src/plugins/pluginCommandDeliveries.ts, intake in issueCommentCommands.ts and commentEventHandler.ts; pluginCommandAuthorization.test.ts (handler gets repo, number, commenter and argument, comments back through ctx.propr, delivery shows in Activity), test/pluginCommandIntake.test.ts, PluginActivity.test.tsx
  • AC3: met — choosePluginCommand and sharedCommandChoiceMessage in pluginCommands.ts, scripts/check-plugins.mjs; pluginCommandAuthorization.test.ts (two plugins share /deploy), test/checkPlugins.test.mjs, packages/shared/test/plugins.test.ts
  • AC4: met — PluginStore.setCommandWrite and setSharedCommandOwner, packages/api/routes/pluginRoutes.ts, propr-ui/src/pages/PluginsPage/PluginCommandSettings.tsx; packages/api/test/pluginCommandRoutes.test.ts (admin only, audited), PluginCommandSettings.test.tsx
  • AC5: met — docs/docs/features/pr-commands.md and docs/docs/features/plugins.md

Review digest

Acceptance criteria (5 of 5 met, as stated by the agent)

  • ✅ AC1 (met): `needsWrite` commands are refused unless the administrator switch is on and the commenter has write permission; when allowed, the write server is exposed to that run only (not to a retry or a later follow-up). — `packages/core/src/plugins/pluginCommands.ts`, `pluginCommandSettings.ts`, `src/jobs/pluginCommandTask.ts`, `packages/shared/src/extensionLibrary.ts`; `packages/core/test/pluginCommandAuthorization.test.ts`, `test/pluginCommandWriteGrant.test.ts`
  • ✅ AC2 (met): A `handler` command invokes the handler with repository, number, commenter and argument; the handler can comment back through `ctx.propr`; the delivery appears in Activity. — `packages/core/src/plugins/pluginCommandDeliveries.ts`, intake in `issueCommentCommands.ts` and `commentEventHandler.ts`; `pluginCommandAuthorization.test.ts` (handler gets repo, number, commenter and argument, comments back through `ctx.propr`, delivery shows in Activity), `test/pluginCommandIntak…
  • ✅ AC3 (met): With two plugins offering a shared command: specific commands work, the plain name follows the instance setting, and with no setting the reply names the specific commands. — `choosePluginCommand` and `sharedCommandChoiceMessage` in `pluginCommands.ts`, `scripts/check-plugins.mjs`; `pluginCommandAuthorization.test.ts` (two plugins share `/deploy`), `test/checkPlugins.test.mjs`, `packages/shared/test/plugins.test.ts`
  • ✅ AC4 (met): The per-command write switch and the shared-command owner are editable on the Plugins page by administrators only and recorded in the audit trail. — `PluginStore.setCommandWrite` and `setSharedCommandOwner`, `packages/api/routes/pluginRoutes.ts`, `propr-ui/src/pages/PluginsPage/PluginCommandSettings.tsx`; `packages/api/test/pluginCommandRoutes.test.ts` (admin only, audited), `PluginCommandSettings.test.tsx`
  • ✅ AC5 (met): Docs: `docs/docs/features/pr-commands.md` and `docs/docs/features/plugins.md`. — `docs/docs/features/pr-commands.md` and `docs/docs/features/plugins.md`

Risk-tiered paths

  • High risk (1 file)
    • packages/core/src/db/migrations/20261116120000_plugin_command_settings.js (added, +62/−0): database migration
  • Normal risk (35 files)
    • packages/api/openapi/routeDocsPlugins.ts (+8/−2)
    • packages/api/openapi/schemasPlugins.ts (+21/−7)
    • packages/api/pluginRouteRegistry.ts (+2/−0)
    • packages/api/routes/pluginRoutes.ts (+5/−0)
    • packages/client/src/generated/apiTypes.ts (+77/−13)
    • packages/core/src/agents/types.ts (+2/−0)
    • packages/core/src/extensions/extensionLaunch.ts (+2/−1)
    • packages/core/src/extensions/extensionProfileStore.ts (+3/−2)
    • packages/core/src/index.ts (+10/−1)
    • packages/core/src/plugins/pluginCommandDeliveries.ts (added, +187/−0)
    • packages/core/src/plugins/pluginCommandSettings.ts (added, +144/−0)
    • packages/core/src/plugins/pluginCommands.ts (+139/−30)
    • packages/core/src/plugins/pluginStore.ts (+29/−1)
    • packages/core/src/webhook/commentEventHandler.ts (+17/−5)
    • packages/core/src/webhook/issueCommentCommands.ts (+13/−2)
    • packages/plugins/example-pack/handlers.ts (+12/−1)
    • packages/plugins/example-pack/manifest.json (+7/−0)
    • packages/shared/src/extensionLibrary.ts (+9/−1)
    • packages/shared/src/pluginDeliveries.ts (+6/−4)
    • packages/shared/src/pluginInstallations.ts (+31/−1)
    • packages/shared/src/pluginSdk.ts (+11/−1)
    • packages/shared/src/plugins.ts (+60/−11)
    • propr-ui/src/api/pluginsApi.ts (+8/−0)
    • propr-ui/src/pages/PluginsPage/PluginActivity.tsx (+12/−5)
    • propr-ui/src/pages/PluginsPage/PluginCommandSettings.tsx (added, +88/−0)
    • propr-ui/src/pages/PluginsPage/PluginContributions.tsx (+8/−4)
    • propr-ui/src/pages/PluginsPage/PluginDetail.tsx (+3/−1)
    • propr-ui/src/pages/PluginsPage/pluginFixtures.testUtils.tsx (+1/−1)
    • propr-ui/src/pages/PluginsPage/pluginUi.ts (+13/−1)
    • propr-ui/src/pages/PluginsPage/usePluginDetail.ts (+6/−2)
    • scripts/check-plugins.mjs (+8/−5)
    • src/daemon/pluginEventDispatch.ts (+10/−6)
    • src/jobs/issueJob/agent.ts (+4/−2)
    • src/jobs/pluginCommandTask.ts (+46/−0)
    • src/jobs/processPullRequestCommentJob.ts (+6/−3)
  • Low risk (25 files)
    • docs/docs/features/plugins.md (+112/−14)
    • docs/docs/features/pr-commands.md (+28/−4)
    • docs/static/openapi/propr-api.yaml (+287/−12)
    • packages/api/test/pluginActivityRoutes.test.ts (+2/−1)
    • packages/api/test/pluginCommandRoutes.test.ts (added, +119/−0)
    • packages/api/test/pluginRoutes.test.ts (+2/−1)
    • packages/api/test/pluginWebhookRoutes.test.ts (+2/−1)
    • packages/core/test/fixtures/plugins/fixture-deploy-one/handlers.ts (added, +21/−0)
    • packages/core/test/fixtures/plugins/fixture-deploy-one/manifest.json (added, +22/−0)
    • packages/core/test/fixtures/plugins/fixture-deploy-two/handlers.ts (added, +21/−0)
    • packages/core/test/fixtures/plugins/fixture-deploy-two/manifest.json (added, +22/−0)
    • packages/core/test/fixtures/plugins/registry.json (+3/−1)
    • packages/core/test/helpers/pluginHandlerFixture.ts (+2/−1)
    • packages/core/test/pluginCommandAuthorization.test.ts (added, +274/−0)
    • …and 11 more

Validation evidence

  • No repository validation commands ran.

Diff size: 61 files changed, +2,297/−158 lines

Detailed Logs:

  • Conversation: 40 messages
  • Session: ad0a2f5c-a562-4a09-aa04-b75987034793

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3552-2026-11-16T09-47-55-845Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3552-2026-11-16T09-47-55-845Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: Plugin commands can now use write access, call a handler, and share a name across plugins. Everything I ran passes: the plugin, extension and OpenAPI suites, the 21 root suites that load the changed c...


This PR was created automatically by ProPR after processing issue #3552.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

Command delivery in Activity

Command delivery in Activity

A handler command delivery (command.example-status to reportCommand) in the plugin's Activity, with the repository and the pull request it was posted on.

Full-size original

Install step explains write access

Install step explains write access

Before installing, What it adds says the needsWrite command stays off until an administrator allows it, and describes handler and shared commands.

Full-size original

Commands section on the plugin page

Commands section on the plugin page

The new Commands section after an administrator switched on "Allow this command to use write access" for /example-release and chose which plugin the shared /deploy runs; What it added now shows handler commands, shared names and the write state.

Full-size original

Commands section on a phone

Commands section on a phone

The Commands section and a command delivery in Activity at 390 px width.

Full-size original

… name across plugins. Everything I ran passes: the plugin, extension and OpenAPI suites, the 21 root suites that load the changed comment-intake and job code, `plugins:check`, the Plugins page UI tests, typechecks for every package, and zero-warning lint on the changed files. I did not run the full repository suite or the Playwright suite (the Plugins page end-to-end tests).

Write access (`needsWrite`)
- Such a command runs only when two things hold:
  - An administrator switched on "Allow this command to use write access" for it on the Plugins page. It is off at install.
  - The commenter has write, maintain or admin permission on the repository.
- Otherwise ProPR replies saying which of the two is missing, and nothing starts.
- When the command is accepted, ProPR records a write grant tied to that plugin, command, repository and issue or PR number. The run uses it up when it starts, through the extension library's existing write-authorization path. A retry of the run or a later follow-up finds it used and gets read servers only.
- The grant covers only the plugin's own write servers that the command names. I added an optional `writeServers` limit to the extension request so other write servers in the library stay out. Without that, switching write on would also have brought in every other auto-applied write server.

Handler commands (`kind: 'handler'`)
- The comment's repository, number, commenter and argument are queued as a delivery of kind `command` and shown in the plugin's Activity.
- The delivery id comes from the comment id, so a redelivered comment is queued once.
- A new runner in the daemon runs these deliveries with the same retry schedule as events, and waits while the plugin's deliveries are paused. The handler gets the full `ctx`, so it can comment back through `ctx.propr` and call out with `ctx.http`.
- Failed command deliveries have no Retry button; posting the command again runs it again.

Shared command names
- A command can be marked `shared`. The manifest check and `plugins:check` require each plugin that does so to also declare a specific command of the same kind.
- Enabling two plugins with the same name is allowed only when both mark it shared.
- The plain name runs the only enabled plugin offering it, or the owner an administrator chose. With several and no owner, it replies naming the specific commands.

Plugins page
- A new Commands section has the write switch and the shared-owner choice, with who changed each and when.
- Both changes are recorded in the audit trail. An owner change is also recorded on the previous and new owner plugins.
- The Install step explains which commands can use write access and that they start off.
- Two new admin-only routes back this: `PUT …/commands/<name>/write` and `PUT …/commands/<name>/owner`.
- One new migration holds the command settings, shared owners, write grants and the command delivery input.

The example plugin gains `/example-status`, a handler command that logs who ran it and where. Two fixture plugins, `fixture-deploy-one` and `fixture-deploy-two`, each offer a shared `/deploy`, and the first also has a `needsWrite` command with a write server. I checked that the main write test fails if the `writeServers` limit is removed. Previews of the Commands section, the install text and a command delivery in Activity are attached.

Acceptance criteria
- AC1: met — `packages/core/src/plugins/pluginCommands.ts`, `pluginCommandSettings.ts`, `src/jobs/pluginCommandTask.ts`, `packages/shared/src/extensionLibrary.ts`; `packages/core/test/pluginCommandAuthorization.test.ts`, `test/pluginCommandWriteGrant.test.ts`
- AC2: met — `packages/core/src/plugins/pluginCommandDeliveries.ts`, intake in `issueCommentCommands.ts` and `commentEventHandler.ts`; `pluginCommandAuthorization.test.ts` (handler gets repo, number, commenter and argument, comments back through `ctx.propr`, delivery shows in Activity), `test/pluginCommandIntake.test.ts`, `PluginActivity.test.tsx`
- AC3: met — `choosePluginCommand` and `sharedCommandChoiceMessage` in `pluginCommands.ts`, `scripts/check-plugins.mjs`; `pluginCommandAuthorization.test.ts` (two plugins share `/deploy`), `test/checkPlugins.test.mjs`, `packages/shared/test/plugins.test.ts`
- AC4: met — `PluginStore.setCommandWrite` and `setSharedCommandOwner`, `packages/api/routes/pluginRoutes.ts`, `propr-ui/src/pages/PluginsPage/PluginCommandSettings.tsx`; `packages/api/test/pluginCommandRoutes.test.ts` (admin only, audited), `PluginCommandSettings.test.tsx`
- AC5: met — `docs/docs/features/pr-commands.md` and `docs/docs/features/plugins.md`
@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=10
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 16, 2026
@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements write grants, handler command delivery, shared command ownership, and administrator controls with substantial test coverage. It needs changes before merging because paused deliveries can block unrelated plugins, and shared-command redelivery can execute the same comment twice.

✅ Scoped write access — Write grants are consumed once, and writeServers limits authorization through extension resolution to the named servers.

✅ Administrator controls — The new routes enforce administrator access, validate requests, and audit changes, including shared-owner changes on affected plugins.

✅ Current checks pass — The supplied authoritative status reports 35 passed checks, no failures, and no pending checks.

This review uses static analysis of the supplied diff and context; no commands or tests were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Paused deliveries starve unrelated plugins

  • Category: correctness

  • Required behavior: Pausing one plugin must not prevent accepted commands belonging to other enabled plugins from executing.

  • Evidence: packages/core/src/plugins/pluginCommandDeliveries.ts:119–136, passOnce; packages/core/src/plugins/pluginCommandDeliveries.ts:163, attempt.

    1. Plugin A has paused deliveries, and at least 20 command comments are accepted for it. Enqueueing checks whether A is enabled but permits recording commands while it is paused.
    2. A command for enabled, unpaused plugin B is recorded afterward.
    3. passOnce selects the oldest 20 due records globally before checking their plugins’ pause state.
    4. Each selected A record reaches paused() and returns without changing its status or due time.
    5. Every subsequent pass selects the same 20 records. B’s command never reaches execution until A is resumed or those records otherwise leave the selection.

    The per-record claim does not prevent this: paused records return before claiming, and there is no pagination or eligibility filter that advances beyond them. This blocks unrelated plugins indefinitely. static trace: verified against the new enqueue, selection, and pause paths; the default batch size is 20.

  • Minimum fix: Exclude paused installations before applying the batch limit, or advance through candidates so paused records cannot repeatedly occupy the entire batch. Preserve those records for execution after Resume.

F2: 🔴 Shared-owner changes defeat comment deduplication

  • Category: correctness

  • Required behavior: A redelivered handler-command comment must be recorded and executed only once.

  • Evidence: packages/core/src/plugins/pluginCommandDeliveries.ts:32–42, enqueuePluginCommandDelivery; packages/core/src/webhook/issueCommentCommands.ts:166–173; packages/core/src/plugins/pluginCommands.ts, choosePluginCommand.

    1. Plugins A and B both offer shared /deploy on issues, with A selected as owner.
    2. An issue comment containing /deploy is accepted and delivered to A. Its record is keyed by A’s plugin ID and cmd-issue-<comment id>.
    3. An administrator changes the shared owner to B.
    4. The original issue-comment event is redelivered. Resolution consults the current owner and selects B.
    5. The issue handler branch directly enqueues B’s delivery. The conflict key is (plugin_id, delivery_id), so A’s existing record does not conflict, and B executes the same comment again.

    This can perform a second deployment through a different plugin without a new user command. The issue handler branch returns before the later issue-command claim machinery, so that machinery cannot prevent this sequence. No concurrency is necessary. static trace: verified through shared-owner resolution, the issue handler’s early return, and the enqueue conflict key.

  • Minimum fix: Persist a comment-level acceptance binding independent of the selected plugin, atomically with enqueueing. Redelivery must retain the original routing decision or return duplicate even after the shared owner changes.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Explicit shared-command alternatives

pluginSharedCommandSiblings treats every non-shared command of the same kind and compatible target coverage as an alternative. The new schema test therefore advertises /notify as an alternative to /deploy. An explicit association would make refusal messages more useful for plugins offering several unrelated commands. This is optional because the stated manifest contract currently requires only matching kind and target coverage.

Score

The implementation covers the main features and has passing current-head checks, but two reproducible delivery defects require localized corrections before merge.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 2s
  • Tokens: 111,779 (110,505 in / 1,274 out)
  • Cost: $1.06

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 F2 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit e44fd22

Addressed 1 AI review comment (IDs: 6913608124)

Addressed findings F1, F2

Summary of Changes

I fixed both findings. The new tests pass, and each one fails when I take its fix back out.

F1: paused plugins no longer block other plugins' commands

  • In packages/core/src/plugins/pluginCommandDeliveries.ts, the runner now drops command deliveries of any plugin whose deliveries are paused before it takes the batch of 20. A paused plugin's records can no longer fill every batch.
  • Those records stay pending and run after Resume. The existing pause check inside attempt is still there, for a pause that lands after the batch was read.

F2: a redelivered command comment runs once, even after the shared owner changes

  • The migration now adds a plugin_command_acceptances table. It is keyed by the comment's delivery id only (cmd-<target>-<comment id>), not by plugin, and records which plugin got the command.
  • enqueuePluginCommandDelivery writes this row in the same transaction as the delivery. If the row already exists, the comment counts as a duplicate and nothing is recorded, whichever plugin the command resolves to now.
  • Both routes for handler commands go through this one function: the issue branch the finding names, and the pull request branch. On pull requests, the existing Redis claim only blocked a redelivery until that claim expired.
  • Uninstalling a plugin deletes its delivery records but not these rows, so a redelivery after an uninstall is also a duplicate.
  • The hourly cleanup (prunePluginDeliveries) now also deletes these rows once they are past the 14-day retention and have no delivery record left.
  • I checked the other comment-command routes. They already key their duplicate checks by comment, not by plugin, so they don't have this defect.

Tests (in packages/core/test/pluginCommandAuthorization.test.ts)

  • F1: a paused plugin has more due commands than one batch holds, all older than another plugin's command. The other plugin's command still runs, and the paused ones all run after Resume.
  • F2: the owner of /deploy is changed from Deploy one to Deploy two. Redelivering the original comment is a duplicate and Deploy two records nothing. It is still a duplicate after Deploy one is uninstalled, and a new comment is accepted as normal.
  • Cleanup: a row whose delivery records are gone is deleted after retention, and one whose delivery is still pending is kept.

Checks run

  • That test file plus the three plugin dispatcher suites.
  • test/pluginCommandIntake.test.ts, test/pluginCommandWriteGrant.test.ts, and the API plugin route suites (commands, activity, plugins, webhooks).
  • Core typecheck, and zero-warning lint on the changed source files.

The root suites hit the container's read-only /tmp/git-processor on the first run. I reran them with writable clone and worktree paths and they passed. I did not run the full repository suite.

Separate issue, not fixed: a delivery id is cmd-<target>-<comment id>. GitHub numbers pull request review comments separately from conversation comments. If review comments ever run plugin commands, a review comment and a conversation comment with the same number on a pull request would share an id. This predates these fixes and I left it alone.

The change has nothing visible in the UI, so there are no previews.

Review digest

Risk-tiered paths

  • High risk (1 file)
    • packages/core/src/db/migrations/20261116120000_plugin_command_settings.js (+16/−0): database migration
  • Normal risk (2 files)
    • packages/core/src/plugins/pluginCommandDeliveries.ts (+15/−3)
    • packages/core/src/plugins/pluginDeliveries.ts (+11/−1)
  • Low risk (1 file)
    • packages/core/test/pluginCommandAuthorization.test.ts (+61/−1)

Validation evidence

  • No repository validation commands ran.

Diff size: 4 files changed, +103/−5 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 6m 14s
  • Tokens: 1,627,215 (1,615,140 in / 12,075 out)
  • Cost: $0.95
  • Subscription usage: Weekly +1%, Fable +2%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…ls when I take its fix back out.

I fixed both findings. The new tests pass, and each one fails when I take its fix back out.

**F1: paused plugins no longer block other plugins' commands**
- In `packages/core/src/plugins/pluginCommandDeliveries.ts`, the runner now drops command deliveries of any plugin whose deliveries are paused before it takes the batch of 20. A paused plugin's records can no longer fill every batch.
- Those records stay pending and run after Resume. The existing pause check inside `attempt` is still there, for a pause that lands after the batch was read.

**F2: a redelivered command comment runs once, even after the shared owner changes**
- The migration now adds a `plugin_command_acceptances` table. It is keyed by the comment's delivery id only (`cmd-<target>-<comment id>`), not by plugin, and records which plugin got the command.
- `enqueuePluginCommandDelivery` writes this row in the same transaction as the delivery. If the row already exists, the comment counts as a duplicate and nothing is recorded, whichever plugin the command resolves to now.
- Both routes for handler commands go through this one function: the issue branch the finding names, and the pull request branch. On pull requests, the existing Redis claim only blocked a redelivery until that claim expired.
- Uninstalling a plugin deletes its delivery records but not these rows, so a redelivery after an uninstall is also a duplicate.
- The hourly cleanup (`prunePluginDeliveries`) now also deletes these rows once they are past the 14-day retention and have no delivery record left.
- I checked the other comment-command routes. They already key their duplicate checks by comment, not by plugin, so they don't have this defect.

**Tests** (in `packages/core/test/pluginCommandAuthorization.test.ts`)
- **F1:** a paused plugin has more due commands than one batch holds, all older than another plugin's command. The other plugin's command still runs, and the paused ones all run after Resume.
- **F2:** the owner of `/deploy` is changed from Deploy one to Deploy two. Redelivering the original comment is a duplicate and Deploy two records nothing. It is still a duplicate after Deploy one is uninstalled, and a new comment is accepted as normal.
- **Cleanup:** a row whose delivery records are gone is deleted after retention, and one whose delivery is still pending is kept.

**Checks run**
- That test file plus the three plugin dispatcher suites.
- `test/pluginCommandIntake.test.ts`, `test/pluginCommandWriteGrant.test.ts`, and the API plugin route suites (commands, activity, plugins, webhooks).
- Core typecheck, and zero-warning lint on the changed source files.

The root suites hit the container's read-only `/tmp/git-processor` on the first run. I reran them with writable clone and worktree paths and they passed. I did not run the full repository suite.

**Separate issue, not fixed:** a delivery id is `cmd-<target>-<comment id>`. GitHub numbers pull request review comments separately from conversation comments. If review comments ever run plugin commands, a review comment and a conversation comment with the same number on a pull request would share an id. This predates these fixes and I left it alone.

The change has nothing visible in the UI, so there are no previews.

PR: #3581
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements write authorization, handler deliveries, shared command ownership, and administrator controls with substantial coverage. It needs a localized correction before merge: shared-command alternatives can point users to unrelated operations.

✅ Scoped write access — Grant consumption is single-use, and writeServers restricts authorization to the command’s named plugin servers.

✅ Durable handler deduplication — Acceptance and delivery records are written transactionally; acceptance survives owner changes and uninstall.

✅ Protected administration — Both new settings routes enforce administrator access and record changes in the audit trail.

The supplied current-head checks report 35 passed, none failed, and none pending. This review uses static analysis only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F3: 🔴 AC3 alternatives can invoke unrelated commands

  • Category: correctness

  • Required behavior: AC3 requires specific commands as alternatives to the shared command. Those alternatives must perform the corresponding plugin operation.

  • Evidence: packages/shared/src/plugins.ts, pluginSharedCommandSiblings; packages/core/src/plugins/pluginCommands.ts, sharedCommandChoiceMessage.

    1. A plugin declares shared /deploy with handler deploy, plus nonshared /status with handler reportStatus, both usable on pull requests.
    2. pluginSharedCommandSiblings accepts /status as the specific alternative because it checks only kind, shared status, name, and targets. Manifest validation therefore accepts this plugin without any specific deployment command.
    3. Enable another plugin offering shared /deploy, leaving the owner unset.
    4. Posting /deploy produces a refusal directing the user to /status as this plugin’s alternative. Following that instruction invokes reportStatus, not deploy; the requested deployment has no specific command.

    static trace: The sibling predicate never checks handler identity or an explicit alias relationship. Its output directly supplies manifest validation, public specific lists, administrator candidate descriptions, and ambiguity replies. The added shared-command test even expects unrelated /notify to appear among /deploy alternatives, so current coverage preserves this invalid association.

  • Minimum fix: Establish an explicit relationship between each shared command and its specific alternatives, or otherwise verify equivalent execution definitions. Use that relationship consistently in validation and displayed alternatives. Add a regression ensuring an unrelated same-kind command cannot satisfy the specific-command requirement.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Clarify delivery versus execution deduplication

The new handler documentation says redelivery “does not call the handler twice,” while the runner intentionally provides at-least-once execution and retries failures. Clarify that comment redelivery does not create another delivery, but one delivery may execute repeatedly; recommend using deliveryId for idempotent external operations. This documentation clarification is optional because the implementation already documents its at-least-once contract internally.

Score

The implementation has strong authorization and persistence protections, broad tests, and passing current-head checks. Incorrect shared-command alternatives remain a localized merge blocker.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 14s
  • Tokens: 114,133 (112,726 in / 1,407 out)
  • Cost: $1.09

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F3 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 08a5508

Addressed 1 AI review comment (IDs: 6914259958)

Addressed finding F3

Summary of Changes

I fixed F3. A shared command now lists its alternatives itself, and ProPR no longer guesses them. Before, any command of the same kind that worked in the same places counted as an alternative, so /status could stand in for /deploy.

The fix (packages/shared/src/plugins.ts)

  • New specific field: a shared command must list its alternatives in it, for example "shared": true, "specific": ["deploy-one"].
  • What counts as an alternative: each command listed must exist in the same plugin and not be shared itself. It must also be of the same kind and work everywhere the shared name does. For handler commands it must also call the same handler, so /status calling reportStatus is refused as an alternative for /deploy calling deploy. Listing the same command twice is refused. A command that isn't shared can't have a specific list.
  • One source everywhere: pluginSharedCommandSiblings now returns only the listed alternatives that pass those checks. It feeds every place that shows alternatives, so they all agree: manifest validation, plugins:check, the plugin's public command list, the owner choices on the Plugins page, and the reply ProPR gives when several plugins offer the name.

Fixtures and docs

  • Both deploy fixtures now list their own deploy command in specific.
  • fixture-deploy-one gains /deploy-one-status, a handler command calling a different handler that is not an alternative to /deploy.
  • docs/docs/features/plugins.md and the comment in scripts/check-plugins.mjs describe the new field.

Tests

  • packages/shared/test/plugins.test.ts: the old test expected the unrelated /notify among the /deploy alternatives. It now expects only the listed command, and one rule-breaking case per check above is refused. A new test checks that a same-kind command with another handler is not accepted as an alternative, whether or not it is listed.
  • test/checkPlugins.test.mjs: plugins:check now refuses a plugin whose only other command is unrelated.
  • packages/core/test/pluginCommandAuthorization.test.ts was not edited, but with the new fixture command it now catches the bug. When I put the old matching back, its check on the ambiguity reply and the owner choices fails, because /deploy-one-status shows up there.
  • packages/api/test/pluginCommandRoutes.test.ts: the expected command list now includes the new fixture command.

What I ran, all passing

  • Shared plugin tests, checkPlugins.test.mjs (23) and plugins:check.
  • The core plugin suites: 112 tests, plus 33 dispatcher tests.
  • The API plugin route tests and test/pluginCommandIntake.test.ts (57).
  • The Plugins page command settings UI test (3), and typechecks for shared and core.

The dispatcher and intake files only run with Node's test module mocks turned on, and the intake file also needs a writable git clone directory in this container. The API route tests finish their checks but the process then doesn't exit, so I cut those runs off with a timeout after reading the results.

The Plugins page looks the same, so I made no previews.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (2 files)
    • packages/shared/src/plugins.ts (+45/−8)
    • scripts/check-plugins.mjs (+1/−1)
  • Low risk (7 files)
    • docs/docs/features/plugins.md (+8/−5)
    • packages/api/test/pluginCommandRoutes.test.ts (+1/−1)
    • packages/core/test/fixtures/plugins/fixture-deploy-one/handlers.ts (+6/−0)
    • packages/core/test/fixtures/plugins/fixture-deploy-one/manifest.json (+3/−2)
    • packages/core/test/fixtures/plugins/fixture-deploy-two/manifest.json (+1/−1)
    • packages/shared/test/plugins.test.ts (+26/−10)
    • test/checkPlugins.test.mjs (+7/−4)

Validation evidence

  • No repository validation commands ran.

Diff size: 9 files changed, +98/−32 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 24m 37s
  • Tokens: 3,890,524 (3,889,111 in / 1,413 out)
  • Cost: $1.20

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…elf, and ProPR no longer guesses them. Before, any command of the same kind that worked in the same places counted as an alternative, so `/status` could stand in for `/deploy`.

I fixed F3. A shared command now lists its alternatives itself, and ProPR no longer guesses them. Before, any command of the same kind that worked in the same places counted as an alternative, so `/status` could stand in for `/deploy`.

**The fix** (`packages/shared/src/plugins.ts`)
- **New `specific` field:** a shared command must list its alternatives in it, for example `"shared": true, "specific": ["deploy-one"]`.
- **What counts as an alternative:** each command listed must exist in the same plugin and not be shared itself. It must also be of the same kind and work everywhere the shared name does. For handler commands it must also call the same handler, so `/status` calling `reportStatus` is refused as an alternative for `/deploy` calling `deploy`. Listing the same command twice is refused. A command that isn't shared can't have a `specific` list.
- **One source everywhere:** `pluginSharedCommandSiblings` now returns only the listed alternatives that pass those checks. It feeds every place that shows alternatives, so they all agree: manifest validation, `plugins:check`, the plugin's public command list, the owner choices on the Plugins page, and the reply ProPR gives when several plugins offer the name.

**Fixtures and docs**
- Both deploy fixtures now list their own deploy command in `specific`.
- `fixture-deploy-one` gains `/deploy-one-status`, a handler command calling a different handler that is not an alternative to `/deploy`.
- `docs/docs/features/plugins.md` and the comment in `scripts/check-plugins.mjs` describe the new field.

**Tests**
- `packages/shared/test/plugins.test.ts`: the old test expected the unrelated `/notify` among the `/deploy` alternatives. It now expects only the listed command, and one rule-breaking case per check above is refused. A new test checks that a same-kind command with another handler is not accepted as an alternative, whether or not it is listed.
- `test/checkPlugins.test.mjs`: `plugins:check` now refuses a plugin whose only other command is unrelated.
- `packages/core/test/pluginCommandAuthorization.test.ts` was not edited, but with the new fixture command it now catches the bug. When I put the old matching back, its check on the ambiguity reply and the owner choices fails, because `/deploy-one-status` shows up there.
- `packages/api/test/pluginCommandRoutes.test.ts`: the expected command list now includes the new fixture command.

**What I ran, all passing**
- Shared plugin tests, `checkPlugins.test.mjs` (23) and `plugins:check`.
- The core plugin suites: 112 tests, plus 33 dispatcher tests.
- The API plugin route tests and `test/pluginCommandIntake.test.ts` (57).
- The Plugins page command settings UI test (3), and typechecks for shared and core.

The dispatcher and intake files only run with Node's test module mocks turned on, and the intake file also needs a writable git clone directory in this container. The API route tests finish their checks but the process then doesn't exit, so I cut those runs off with a timeout after reading the results.

The Plugins page looks the same, so I made no previews.

PR: #3581
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR substantially implements write authorization, handler deliveries, shared command ownership, and administrator controls. It needs a localized correctness fix before merging.

✅ Restricted write grants — Grants are consumed once, and writeServers limits authorization to the command’s plugin servers.

✅ Administrative controls — Both settings routes enforce durable administrator authorization and record changes in the audit trail.

✅ Shared command validation — Shared names require explicit, valid specific commands, with tests covering ownership and ambiguity.

This review used static analysis of the supplied code; no commands were run. Current checks report 29 passed, five pending, and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F4: 🔴 Distinguish GitHub comment resource types

  • Category: correctness

  • Required behavior: Each distinct handler-command comment must receive its own delivery; deduplication must suppress only redeliveries of that same comment.

  • Evidence: packages/core/src/plugins/pluginCommandDeliveries.ts:pluginCommandDeliveryId and packages/core/src/webhook/commentEventHandler.ts:processPluginCommandComment

    1. A top-level PR issue comment with ID N invokes a handler command. Intake supplies target: 'pull_request', producing acceptance key cmd-pull_request-N.
    2. A distinct line-level PR review comment with the same numeric ID invokes a handler command. Issue comments and review comments are separate GitHub resource types; their numeric IDs are not a shared identity namespace.
    3. The new intake branch again supplies target: 'pull_request' and ID N, discarding the available eventType.
    4. The global acceptance insert conflicts, and the second command is returned as duplicate_delivery. Its handler never runs, even if it belongs to another plugin or repository.

    The transaction and unique key enforce the incorrect identity rather than preventing the collision. The existing queue contract explicitly preserves comment resource type as 'review' | 'issue', but the new handler context does not. Supplied tests cover repeated IDs within one comment type, not distinct resource types. Verification provenance: static trace; this scenario was not executed.

  • Minimum fix: Carry the originating comment resource type through handler intake and include it in the acceptance and delivery identity. Preserve deduplication for existing acceptance records during migration, and add coverage showing that equal numeric IDs from issue comments and review comments both run while redeliveries remain suppressed.

Suggestions

These are optional follow-ups and are not sent to /fix.

S3: 🟢 Clarify at-least-once handler execution

The documentation says redelivery “does not call the handler twice,” while the runner intentionally retries failures and recovers stale running attempts. Clarify that comment acceptance is deduplicated but handler execution is at least once, and recommend using deliveryId to make external effects idempotent. This is an optional documentation clarification of the implemented retry model.

Score

The implementation has substantial coverage and clear authorization boundaries, but comment identity collisions can silently discard legitimate commands. The remaining checks are pending, with no reported failures.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 3s
  • Tokens: 113,567 (112,378 in / 1,189 out)
  • Cost: $1.07

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F4 S3

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 30bb794

Addressed 1 AI review comment (IDs: 6915176887)

Addressed finding F4

Summary of Changes

I fixed F4. An issue comment and a pull request review comment with the same number are now two separate commands, each gets its own delivery, and a redelivery of either one is still dropped.

What changed

  • Intake: a handler command now passes along which kind of comment it came from: issue (on an issue or a PR's conversation) or review (a PR line comment). On a pull request this is worked out with the existing isReviewComment check (commentEventHandler.ts:813); comments on an issue are always issue (issueCommentCommands.ts).
  • Delivery id: the id, which is also the acceptance key, now includes the comment kind: cmd-issue-<id> or cmd-review-<id> (pluginCommandDeliveries.ts).
  • Existing acceptance records: issue ids are unchanged, so old records still match exactly. The old pull request id cmd-pull_request-<id> is never written now. If one already exists, a new comment of either kind with that number is treated as a duplicate. Those old records can't say which kind of comment they were, so I chose to drop a possible repeat rather than risk running it twice. No new migration was needed.
  • Docs: I updated the delivery-id format in the SDK comment, the OpenAPI description (regenerated the client types and the YAML), the migration comment and docs/docs/features/plugins.md. I also updated a delivery id in the UI test fixture.

Tests

  • New core tests (in pluginCommandAuthorization.test.ts):
    • An issue comment and a review comment with the same number, for different plugins and repositories, both get accepted and both handlers run. Each redelivery is dropped, even when it would now go to a different plugin.
    • An old cmd-pull_request-<id> record still blocks both kinds of comment, and an old cmd-issue-<id> record is still the same record.
  • New intake test (in test/pluginCommandIntake.test.ts): a review comment numbered like an earlier issue comment is accepted as review. Its redelivery is dropped even when the Redis claim is gone, because the recorded acceptance still blocks it.
  • I checked each new test fails when its fix is taken back out.
  • Results:
    • pluginCommandAuthorization.test.ts passes (12 of 12).
    • pluginCommandIntake.test.ts passes (58 of 58). It needs writable GIT_CLONES_BASE_PATH/GIT_WORKTREES_BASE_PATH in this container.
    • The PluginActivity UI test passes.
    • The TypeScript checks for shared, core and the root project pass.
    • gen:openapi:check passes.
    • Lint with zero warnings is clean on the changed core and api files.
    • I did not run the full repository suite.

Separate issue (not fixed): before the database check, the PR comment intake takes a Redis claim keyed pr-comment-processed:<owner>:<repo>:<pr>:<comment id>, which doesn't include the comment kind. So on the same pull request, a review comment whose number matches an earlier issue comment would still be dropped there. That key existed before this PR and is shared with the built-in commands and comment polling, which rely on it to avoid handling a comment twice. Changing it only for plugin commands would break that, so this needs its own fix across all of those paths. The new intake test uses a second pull request for that reason.

There's nothing visible to preview, so I made no preview images.

Review digest

Risk-tiered paths

  • High risk (1 file)
    • packages/core/src/db/migrations/20261116120000_plugin_command_settings.js (+1/−1): database migration
  • Normal risk (6 files)
    • packages/api/openapi/schemasPlugins.ts (+1/−1)
    • packages/client/src/generated/apiTypes.ts (+1/−1)
    • packages/core/src/plugins/pluginCommandDeliveries.ts (+36/−11)
    • packages/core/src/webhook/commentEventHandler.ts (+3/−1)
    • packages/core/src/webhook/issueCommentCommands.ts (+1/−1)
    • packages/shared/src/pluginSdk.ts (+5/−2)
  • Low risk (5 files)
    • docs/docs/features/plugins.md (+5/−2)
    • docs/static/openapi/propr-api.yaml (+1/−1)
    • packages/core/test/pluginCommandAuthorization.test.ts (+51/−8)
    • propr-ui/src/pages/PluginsPage/PluginActivity.test.tsx (+1/−1)
    • test/pluginCommandIntake.test.ts (+17/−4)

Validation evidence

  • No repository validation commands ran.

Diff size: 12 files changed, +123/−34 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (high)
  • Requested By: @propr-ultrafix
  • Time: 8m 51s
  • Tokens: 3,239,520 (3,213,525 in / 25,995 out)
  • Cost: $1.66

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…ent with the same number are now two separate commands, each gets its own delivery, and a redelivery of either one is still dropped.

I fixed F4. An issue comment and a pull request review comment with the same number are now two separate commands, each gets its own delivery, and a redelivery of either one is still dropped.

**What changed**
- **Intake:** a handler command now passes along which kind of comment it came from: `issue` (on an issue or a PR's conversation) or `review` (a PR line comment). On a pull request this is worked out with the existing `isReviewComment` check (`commentEventHandler.ts:813`); comments on an issue are always `issue` (`issueCommentCommands.ts`).
- **Delivery id:** the id, which is also the acceptance key, now includes the comment kind: `cmd-issue-<id>` or `cmd-review-<id>` (`pluginCommandDeliveries.ts`).
- **Existing acceptance records:** issue ids are unchanged, so old records still match exactly. The old pull request id `cmd-pull_request-<id>` is never written now. If one already exists, a new comment of either kind with that number is treated as a duplicate. Those old records can't say which kind of comment they were, so I chose to drop a possible repeat rather than risk running it twice. No new migration was needed.
- **Docs:** I updated the delivery-id format in the SDK comment, the OpenAPI description (regenerated the client types and the YAML), the migration comment and `docs/docs/features/plugins.md`. I also updated a delivery id in the UI test fixture.

**Tests**
- New core tests (in `pluginCommandAuthorization.test.ts`):
  - An issue comment and a review comment with the same number, for different plugins and repositories, both get accepted and both handlers run. Each redelivery is dropped, even when it would now go to a different plugin.
  - An old `cmd-pull_request-<id>` record still blocks both kinds of comment, and an old `cmd-issue-<id>` record is still the same record.
- New intake test (in `test/pluginCommandIntake.test.ts`): a review comment numbered like an earlier issue comment is accepted as `review`. Its redelivery is dropped even when the Redis claim is gone, because the recorded acceptance still blocks it.
- I checked each new test fails when its fix is taken back out.
- **Results:**
  - `pluginCommandAuthorization.test.ts` passes (12 of 12).
  - `pluginCommandIntake.test.ts` passes (58 of 58). It needs writable `GIT_CLONES_BASE_PATH`/`GIT_WORKTREES_BASE_PATH` in this container.
  - The `PluginActivity` UI test passes.
  - The TypeScript checks for shared, core and the root project pass.
  - `gen:openapi:check` passes.
  - Lint with zero warnings is clean on the changed core and api files.
  - I did not run the full repository suite.

**Separate issue (not fixed):** before the database check, the PR comment intake takes a Redis claim keyed `pr-comment-processed:<owner>:<repo>:<pr>:<comment id>`, which doesn't include the comment kind. So on the *same* pull request, a review comment whose number matches an earlier issue comment would still be dropped there. That key existed before this PR and is shared with the built-in commands and comment polling, which rely on it to avoid handling a comment twice. Changing it only for plugin commands would break that, so this needs its own fix across all of those paths. The new intake test uses a second pull request for that reason.

There's nothing visible to preview, so I made no preview images.

PR: #3581
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements write-authorized prompt commands, durable handler deliveries, shared command ownership, and administrator controls. The supplied diff supports AC1–AC5. No merge blocker was verified through static review; merge readiness is conditional on the three pending checks completing successfully.

✅ Scoped write authorization — Grants are consumed once, and writeServers restricts authorization to the command’s named plugin servers.

✅ Durable command deduplication — Transactional acceptances prevent handler redelivery across shared-owner changes and uninstall, while distinguishing issue comments from review comments.

✅ Administrative controls — Both settings routes enforce administrator authorization, validate their inputs, and record audited changes.

No commands or tests were run during this review, as requested.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S4: 🟢 Exercise competing command runners

Add coverage for two PluginCommandRunner instances claiming the same delivery and for recovery of a stale running attempt. The conditional updates in pluginCommandDeliveries.ts provide ownership protection, but the added tests primarily exercise sequential passes. These tests would strengthen confidence in restart and concurrency behavior; static inspection did not establish a defect requiring them before merge.

Score

The implementation addresses the requested behavior with substantial authorization, delivery, API, and UI coverage. The supplied current-head status reports no failures, with three checks still pending.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 50s
  • Tokens: 116,327 (115,517 in / 810 out)
  • Cost: $1.09

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S4

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 16, 2026
@propr-dev

propr-dev Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

ℹ️ GitHub auto-merge is turned off for this repository, so ProPR merges this PR itself once it is ready (checks passed or no CI configured, and the review goal met).

To let GitHub merge it the moment required checks pass, enable Settings → General → Pull Requests → Allow auto-merge.

@propr-dev
propr-dev Bot merged commit 12c17f7 into 3542-epic-plugin-system-xu8 Nov 16, 2026
48 checks passed
@propr-dev
propr-dev Bot deleted the 3552/claude-opus-5-5-plugin-slash-commands-wri-20261116-0911-db6 branch November 16, 2026 12:01
@propr-dev propr-dev Bot changed the title 🔨 [3552 by Claude Opus 5.5] Plugin slash commands: write authorization, handler commands and shared command ownership [3552 by Claude Opus 5.5] Plugin slash commands: write authorization, handler commands and shared command ownership Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants