From bc7a88b9e2bd904111e59d5f8a70cf99bc7875e3 Mon Sep 17 00:00:00 2001 From: Marcos Paulo Date: Thu, 20 Aug 2026 15:08:41 -0300 Subject: [PATCH] chore: sync .pr-review.json with main --- .pr-review.json | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/.pr-review.json b/.pr-review.json index f5f311c..ad368f3 100644 --- a/.pr-review.json +++ b/.pr-review.json @@ -1,21 +1,30 @@ { - "languages": [ - "java", - "yaml", - "markdown" - ], "focus": [ - "thread-safety", - "paper-chunk-ticketing", - "item-loss-prevention", - "resource-cleanup", - "performance-and-chunk-loading", - "null-safety-and-unit-tests" + "correctness", + "security", + "performance" ], "exclude_paths": [ "target/**", - "*.bak*", - "docs/**" + "*.class" ], - "instructions": "Canalhandia is a Minecraft Paper 1.21.x server plugin written in modern Java 25. Enforce these core invariants:\n1. Thread Safety: Bukkit API, World, Entity, and Inventory mutations MUST run on the main server thread. Async threads only do pure calculation or async file I/O.\n2. Item & Inventory Safety: Never discard player items. Always handle full-inventory overflow by dropping excess items at the player's location. On multi-step container placement (e.g. chests), roll back blocks if not all items fit.\n3. Lifecycle & Cleanup: All registered chunk tickets, recipes, schedulers, and I/O executors must be cleanly flushed and unloaded in onDisable() and module toggles.\n4. Chunk Loading: Never trigger synchronous chunk generation or loading inside event handlers. Always check world.isChunkLoaded() before querying blocks.\n5. Test Coverage: All domain logic, coordinates math, parsers, and pure helpers must have corresponding JUnit tests in src/test/java." + "languages": [ + "java" + ], + "style": "balanced", + "require_tests": true, + "exclude_tests": false, + "max_findings": 15, + "severity_threshold": "low", + "patterns": { + "deny": [ + "**/README.md", + "**/*.md" + ] + }, + "cost_target": "claude-sonnet-5", + "additional_context_urls": [ + "http://nexus-service.nexus.svc.cluster.local:8081/repository/raw-hosted/canalhandia/architecture.md" + ], + "instructions": "Minecraft plugin (Paper 26.2, pt-BR, JDK 25 build). Chat-only — never touch gameplay. Watch thread-safety on event handlers (PlayerDeathEvent, PlayerInteractEvent) — the Bukkit main thread is single-threaded but async chunks/events cross it. Avoid main-thread I/O; defer expensive scans (chunk loading, spiral search) to scheduled tasks or async paths. Flag mutable shared state across listener invocations. Hard constraints: chat messages are immutable after send (counts baked into buttons freeze at send time); names go out as translatable components so the singular-form rule applies (number never agrees with the noun); Geyser/Bedrock cannot click and cannot show emoji (every click has a typed fallback); vanilla statistics are the only data source (offline path is /players/stats/.json, NOT /stats); reactions keep counting late (reacao-validade-minutos); Floodgate is optional runtime dep. Flag: real bugs, missing persistence of new settings, comando/permission not in plugin.yml, breaking Bedrock equivalent invariant, removing the frozen-at-send assumption, violating singular-form rule, missing Stats.resolve() on renames." }