Skip to content

Preserve point placeholder fences across callback and legacy arithmetic - #1741

Open
BenCodez wants to merge 2 commits into
masterfrom
vp-work/point-addition-publication-phase2-20261101
Open

BenCodez wants to merge 2 commits into
masterfrom
vp-work/point-addition-publication-phase2-20261101

Conversation

@BenCodez

@BenCodez BenCodez commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Preserves point-placeholder publication fences across callback-based additions and legacy arithmetic following #1739. Queued operations close rendered point values until their worker settles, and SQL execution ambiguity remains unavailable without automatically retrying the mutation. Known unstarted preparation failures can recover through ordinary worker snapshot refresh. Completion callbacks run after source reconciliation; existing public signatures, event behavior and durable replay-stage identity are preserved.

The follow-up uses explicit production local-variable types; tests and runtime behavior are unchanged.

Validation: 246 focused tests passed. Clean Maven package passed 3,079 unit tests with one optional diagnostic skipped and five packaged-artifact checks passed. Fresh independent concurrency, persistence, caching and platform-thread review plus the focused correction follow-up completed with no remaining findings. AdvancedCore138, SimpleAPI44 and the existing Jedis8.0.1 dependency identities are unchanged.

The downloadable JAR is 11,026,869 bytes, above the advisory 10 MiB target. Live distributed MySQL and Paper/Folia server acceptance remain unrun. Genuinely uncertain transactions still fail closed because generic refill cannot identify their terminal outcome. External menus that grant rewards before confirmed payment remain nontransactional; the nocache suffix does not force a fresh SQL transaction.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the reliability of displayed point totals when updates are delayed, rejected, or have an uncertain outcome.
    • Prevented point updates with uncertain results from being automatically retried, helping avoid duplicate changes.
    • Improved recovery of point displays after temporary cache or scheduling issues, including when a later refresh is needed.
    • Ensured failed or rejected point additions report an unsuccessful result rather than appearing to complete successfully.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b0753104-1442-4a19-9e92-8659ebfb9698
Commits

Reviewing files that changed from the base of the PR and between dd00514 and 6e26c9c.

Files selected for processing: 2
  • VotingPlugin/src/main/java/com/bencodez/votingplugin/user/SharedMysqlPointMutator.java
  • VotingPlugin/src/main/java/com/bencodez/votingplugin/user/VotingPluginUser.java
Files skipped from review as they are similar to previous changes: 1
  • VotingPlugin/src/main/java/com/bencodez/votingplugin/user/VotingPluginUser.java

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)
Walkthrough

Shared-MySQL point mutations now report admission and execution certainty to placeholder publication tracking. SQL update paths refresh point snapshots and distinguish rejected, confirmed, and indeterminate outcomes. Tests cover mutation outcomes, snapshot availability, and recovery.

Changes: Shared-MySQL Point Mutations

Layer / File(s) Summary
Mutation admission and callback completion
VotingPlugin/src/main/java/com/bencodez/votingplugin/user/SharedMysqlPointMutator.java, VotingPlugin/src/main/java/com/bencodez/votingplugin/user/VotingPluginUser.java, VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/user/SharedMysqlPointMutatorTest.java
Async add, cap, add-and-cap, and remove paths use runPointMutation to report admission and settlement. The shared-MySQL addition path releases admission based on persistence results, handles rejected submission, and guards callback completion against duplicate execution.
SQL outcomes and point publication
VotingPlugin/src/main/java/com/bencodez/votingplugin/user/SharedMysqlPointMutator.java, VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/placeholders/ColdOfflinePlaceholderCacheTest.java
SQL mutation paths track outcome certainty, refresh the affected point column, and finish publication with execution and refresh status. Tests cover confirmed, rejected, and uncertain outcomes, scheduler rejection, shutdown, cache-admission failures, and recovery.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant VotingPluginUser
  participant SharedMysqlPointMutator
  participant PlaceHolders
  participant MySQL
  VotingPluginUser->>SharedMysqlPointMutator: submit point mutation
  SharedMysqlPointMutator->>PlaceHolders: begin admission and publication tracking
  SharedMysqlPointMutator->>MySQL: execute point update
  SharedMysqlPointMutator->>PlaceHolders: refresh affected point column
  SharedMysqlPointMutator->>PlaceHolders: finish with execution and refresh status
Loading

Possibly related PRs

Merge Risk: Minimal · up to 6e26c

This change tracks shared-MySQL point mutation outcomes for placeholder publication. No concrete merge-blocking risk was identified in the supplied context. Live distributed MySQL and server acceptance testing has not been run.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: preserving point-placeholder publication fences across callback-based additions and legacy arithmetic.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 12 functions across 4 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
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.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T02:30:51.181244Z 6e26c9c New commits
🔒 Security Review ✅ Completed 2026-11-02T01:45:42.249018Z dd00514 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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.

1 participant