Repository navigation
Conversation
Owners whose plugin is flagged, errored or unscanned can queue a new scan themselves instead of asking in an issue. Same path as the admin Rescan (status reset, queue, audit event with the owner as actor), gated by ownership, the permanent block, the current scan state, and the per-user scan rate limit that already caps create/update scans. Refs cursor#447.
|
@deanrie is attempting to deploy a commit to the Anysphere Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Summary
Implements the proposal in #447: a self-serve Re-run scan for plugin owners. Over the past weeks most owner issues here (#414, #422, #424, #430, #431, #435, #437, #448, #451, #456) are the same request: "the scan flagged / errored, I fixed the listing, please re-run it", which today only an admin can do.
actions/rescan-own-plugin.ts:authActionClientaction. Checks ownership, refusespermanently_blockedrows, only allowsflagged/error/unscanned(sopending/scanningcannot be double-queued andsafehas nothing to do), applies the existing per-userpluginScanLimitthat already caps create/update scans, then calls the samerescanPlugin()the admin action uses (status reset topending, queue, drain kick, cache invalidation, moderation event recorded with the owner as actor).plugin-owner-menu.tsx: a Re-run scan item, shown only when the same conditions hold client-side; toast on success androuter.refresh().No schema or RLS changes: the owner already has update rights on their own row (
toggle-plugin-listingrelies on that), andrescanPlugingoes through the server client like the other owner actions.Open questions for the maintainers
error/unscanned. I keptflaggedin because that is the case every one of the linked issues is about; the flag is a scan result, not a moderation decision, andpermanently_blocked(the moderation decision) stays admin-only.pluginScanLimitmeans re-scans share the hourly budget with edits. A separate, tighter id is a one-line change if scans need their own cap (they are billable SDK runs).Verification
biome checkon both files clean;tsc --noEmitinapps/cursorclean.rescanPlugin()unchanged, with the gates above in front of it.