You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preserve VoteLog query failures in Control inspections - #1767
A VoteLog query that failed after the readability probe could look like an empty history or a zero count in Control. Control inspections now return UNAVAILABLE when a search, trace, aggregate or service-health query fails. Genuine empty results still succeed, and ordinary VoteLog callers retain their fallbacks. The wire schema and configuration are unchanged.
Hosted Maven validated head 403ee8ff with 3,375 unit tests with one skip and eight packaged-artifact checks passed. There were zero failures or errors. Build log The focused JDBC regression suite reproduced five failures on the original source. The corrected inspection/protocol suite passed all 64 focused tests in local validation. Live database and server acceptance remain unverified.
Summary by CodeRabbit
Bug Fixes
Vote-log inspections now report Unavailable when a query fails, rather than showing a misleading empty result or zero value. Genuine empty results remain successful.
Other vote-log reads retain their existing fallback behavior.
Documentation
Clarified inspection results and the limits of the readability check.
Updated deployment guidance with the required authentication headers.
No actionable comments were generated in the recent review.
Walkthrough
VoteLog inspection reads now return unavailable when a later SQL query fails. The read scope is limited to the inspection worker and restored on exit. Ordinary VoteLog callers retain their existing fallback results. The deployment contract also updates its artifact request example.
Changes: VoteLog inspection read failures
Layer / File(s)
Summary
Scope and report VoteLog query failures VotingPlugin/src/main/java/com/bencodez/votingplugin/votelog/VoteLogReadScope.java, VotingPlugin/src/main/java/com/bencodez/votingplugin/votelog/VoteLogMysqlTable.java
VoteLogReadScope installs a worker-local failure callback and restores the previous scope on exit. VoteLog SQL failure paths notify the active scope before returning their existing fallback values.
Apply strict scope to inspections VotingPlugin/src/main/java/com/bencodez/votingplugin/control/ControlInspectionService.java, VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/control/VoteLogQueryFailureTest.java, AGENTS.md, docs/control-agent-contract.md
Inspection dispatch runs inside the read scope and throws InspectionUnavailableException when a query fails. Tests cover probe and query failures, recovery, fallback behavior, scope restoration, and thread isolation. The guidance and contract describe the strict scope and its point-in-time probe. Genuine empty results remain successful.
VoteLog inspections now report later SQL failures as unavailable instead of returning empty or zero results. Ordinary callers keep their existing fallbacks. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "Preserve VoteLog query failures in Control inspections" matches the main change. The changeset makes VoteLog SQL read failures during Control inspections return UNAVAILABLE through a new wo…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title "Preserve VoteLog query failures in Control inspections" matches the main change. The changeset makes VoteLog SQL read failures during Control inspections return UNAVAILABLE through a new worker-local read scope, instead of silently falling back to empty or zero results. The title is specific, short, and names the affected area. The objectives describe the same behavior.
Finishing Touches
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.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
Recent review details
Context from checks skipped due to timeout: 3
GitHub Check: build
GitHub Check: Analyze (java-kotlin)
GitHub Check: Analyze (actions)
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 2
Source excerpt: VotingPlugin is the vote-processing data plane for Bukkit/Paper and BungeeCord/Velocity networks.
Source excerpt: All Java project tests and test-only helpers belong under `VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/`, with package `com.bencodez.votingplugin.tests` or a meaningful subpackage.
[grammar] ~184-~184: Use a hyphen to join words.
Context: ...ead failure returns UNAVAILABLE, never successful empty/zero data. Restore the ...
(QB_NEW_EN_HYPHEN)
This branch has not been deployed
No deployments
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
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.
A VoteLog query that failed after the readability probe could look like an empty history or a zero count in Control. Control inspections now return
UNAVAILABLEwhen a search, trace, aggregate or service-health query fails. Genuine empty results still succeed, and ordinary VoteLog callers retain their fallbacks. The wire schema and configuration are unchanged.Hosted Maven validated head
403ee8ffwith 3,375 unit tests with one skip and eight packaged-artifact checks passed. There were zero failures or errors. Build log The focused JDBC regression suite reproduced five failures on the original source. The corrected inspection/protocol suite passed all 64 focused tests in local validation. Live database and server acceptance remain unverified.Summary by CodeRabbit
Bug Fixes
Documentation