Repository navigation
Unset removed permissions and retire empty attachments - #370
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Grant removal and handler cleanup AdvancedCore/src/main/java/com/bencodez/advancedcore/api/permissions/PlayerPermissionHandler.java, AdvancedCore/src/main/java/com/bencodez/advancedcore/api/permissions/PermissionHandler.java, AdvancedCore/src/test/java/com/bencodez/advancedcore/tests/api/permissions/ExplicitPermissionRemovalTest.java |
Permission removal unsets grants. Empty-handler checks and map removals are synchronized, and online attachments are cleared when their handler is removed. Tests cover live and queued grants, unknown permissions, expiration callbacks, and replacement handlers. |
Attachment retirement and expiration AdvancedCore/src/test/java/com/bencodez/advancedcore/tests/api/permissions/PermissionAttachmentRetirementTest.java |
Tests cover attachment removal, preservation of other grants, expiration cleanup, offline expiration, replacement grants, and stale-handler cleanup. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Merge Risk: 
Minimal · up to c7670
-
No actionable issue is identified that should prevent merging after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Codex Review SummaryThis 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. |
Explicit permission removal leaves a false attachment node, which can override grants from other attachments and retain idle handlers. Unset the node and retire the empty registered attachment while preserving unrelated grants and replacement handlers created by removal callbacks.
Existing permission APIs, persisted state and scheduling contracts are preserved. Offline expiry does not detach live attachments from an unowned context.
Validation:
The VotingPlugin validation JAR is 10,889,344 bytes, above its advisory 10 MiB target; the MCPerks JAR is 9,302,195 bytes. No live server or external permission-provider acceptance is claimed. Hosted checks for this new PR remain pending.
Created with assistance from OpenAI Codex.
Summary by CodeRabbit