Skip to content

feat: collect permission manifests#4

Merged
lusu007 merged 1 commit into
mainfrom
feat/permissions-query-commands
Jul 9, 2026
Merged

feat: collect permission manifests#4
lusu007 merged 1 commit into
mainfrom
feat/permissions-query-commands

Conversation

@lusu007

@lusu007 lusu007 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

Adds read and refresh commands under /permissions and /perm, with per-command authorization and completion for commands, online players, and scopes.

Reworks the catalog path into a central Velocity collector. At startup, the permissions plugin discovers every active Velocity plugin manifest at META-INF/grounds/permissions.json, validates it, and registers each valid manifest through the existing catalog gRPC service with bounded retries. Missing or malformed manifests do not block startup.

The local command nodes now come from the same standardized manifest. The collector has parser, discovery, retry, and invalid-manifest regression coverage.

Dependency Order

  1. grounds-minestom-runtime#11 exposes installed module provider origins.
  2. service-permissions#20 persists registered runtime catalog entries for Portal.
  3. After those releases, this PR needs one small follow-up commit to consume the released runtime API and run the same collector for active Minestom modules.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • ♻️ Refactoring
  • 📚 Documentation
  • 🔧 Chore

Related Issues

  • None

Testing

  • Unit tests pass: ./gradlew test
  • Manual testing completed
  • New tests cover command routing, autocomplete, manifest validation, Velocity discovery, and registration retries
  • Formatting: ./gradlew spotlessApply
  • Build: ./gradlew build

Checklist

  • I have performed a self-review of my own code
  • Tests have been added/updated and pass (if needed)
  • Documentation has been updated (if needed)

@lusu007 lusu007 marked this pull request as ready for review July 9, 2026 18:52
Copilot AI review requested due to automatic review settings July 9, 2026 18:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@lusu007 lusu007 merged commit a461a71 into main Jul 9, 2026
2 checks passed
@lusu007 lusu007 deleted the feat/permissions-query-commands branch July 9, 2026 18:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e155a063f9

ℹ️ 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".

PermissionCommandService(
snapshots = snapshots,
permissions = permissions,
refreshSnapshot = listener::loadSnapshot,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't reuse login fallback for manual refresh

When the backend fetch fails for an online player with a valid disk cache, PermissionLoginListener.loadSnapshot returns allowed(cached) so logins can continue. Wiring the refresh command to that same method means /perm refresh <player> and refresh all report success/policyVersion while only reloading cached data, so operators can think a permission change was refreshed even though the backend was unavailable.

Useful? React with 👍 / 👎.

@lusu007 lusu007 changed the title feat: add permission query commands feat: collect permission manifests Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants