Skip to content

Build standalone shared vote core artifact - #1615

Closed
BenCodez wants to merge 1 commit into
masterfrom
codex/standalone-vote-core
Closed

BenCodez wants to merge 1 commit into
masterfrom
codex/standalone-vote-core

Conversation

@BenCodez

@BenCodez BenCodez commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Build the existing com.bencodez.votingplugin.core.vote sources as a second, standalone Maven artifact for future Fabric and NeoForge adapters. VotingPluginCore compiles those same 12 source files with Java 21 and no production dependencies. The current VotingPlugin POM, shaded plugin JAR, and production vote/reward path are unchanged.

This follows the platform-neutral core in #1608 and the Bukkit policy use in #1614. It adds no native loader or runtime support yet. In particular, it does not switch Bukkit to SharedVoteProcessor or change reward APIs/YAML behavior.

Checks

  • mvn -B -f VotingPlugin/pom.xml clean package: 1,222 unit tests plus one packaged-artifact test, no failures/errors.
  • mvn -B -f VotingPluginCore/pom.xml clean package: compiles 12 shared sources; one package-phase artifact test passes.
  • The standalone JAR contains only shared vote classes and Maven metadata. All 13 class files match the same classes in the existing plugin JAR byte-for-byte.
  • jdeps reports only java.base; mvn dependency:tree -Dscope=compile has no compile dependencies.
  • git diff --check and ZIP integrity checks pass.

Artifacts: VotingPlugin/target/VotingPlugin.jar (21,711,129 bytes, SHA-256 1a32a9cedd24c9a0ba95aadb2b301801c6a87ca55cf853eac405f521b9c001f3) and VotingPluginCore/target/votingplugin-vote-core-7.1.2-SNAPSHOT.jar (23,898 bytes, SHA-256 67c7c873d64be7812e2f4ace8deb09f70f8fee916c3b6c14cf4ee007c299fcca).

Summary by CodeRabbit

  • New Features

    • Added a standalone Java 21 vote-core library artifact, separate from platform-specific integrations.
    • Added validation to ensure the packaged artifact contains only the intended shared voting functionality.
  • Documentation

    • Added guidance for building, testing, packaging, version alignment, and the scope of the standalone vote-core library.
  • Chores

    • Extended continuous integration to build and verify the standalone artifact.
    • Excluded generated build output from version control.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 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-09-20T21:52:28.546251Z 14f570f PR opened
🔒 Security Review ✅ Completed 2026-09-20T21:54:01.828866Z 14f570f 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.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1d46f3fd-83e3-424f-a437-32ee11ec636f

📥 Commits

Reviewing files that changed from the base of the PR and between 0930a85 and 14f570f.

📒 Files selected for processing (5)
  • .github/workflows/maven.yml
  • VotingPluginCore/.gitignore
  • VotingPluginCore/pom.xml
  • VotingPluginCore/src/test/java/com/bencodez/votingplugin/core/vote/VoteCoreArtifactTest.java
  • docs/platform-core.md

Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Analyze (java-kotlin)
🧰 Additional context used
🪛 ast-grep (0.45.3)
VotingPluginCore/src/test/java/com/bencodez/votingplugin/core/vote/VoteCoreArtifactTest.java

[warning] 27-27: Avoid user-generated class names for reflection
Context: Class.forName(entry.substring(0, entry.length() - 6).replace('/', '.'), false, loader)
Note: [CWE-470] Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection').

(unsafe-reflection-java)


📝 Walkthrough

Walkthrough

The PR adds a Java 21 Maven module for shared vote-core sources. It validates the packaged JAR, builds the module in CI, ignores build output, and documents the artifact boundary and build process.

Changes

Standalone vote-core artifact

Layer / File(s) Summary
Module definition
VotingPluginCore/pom.xml, VotingPluginCore/.gitignore
The new Maven module targets Java 21, compiles selected vote-core sources, declares JUnit dependencies, and ignores /target/.
Artifact validation
VotingPluginCore/pom.xml, VotingPluginCore/src/test/java/.../VoteCoreArtifactTest.java
The package lifecycle runs an artifact test that checks JAR entries and loads each packaged vote-core class with an isolated class loader.
CI and documentation integration
.github/workflows/maven.yml, docs/platform-core.md
CI packages the standalone module. Documentation describes its build commands, validation, dependency boundary, and platform scope.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Maven
  participant VoteCoreSources
  participant VoteCoreArtifactTest
  Maven->>VoteCoreSources: Compile selected vote-core sources
  Maven->>VoteCoreArtifactTest: Run package-level artifact test
  VoteCoreArtifactTest->>Maven: Inspect generated JAR
  VoteCoreArtifactTest->>VoteCoreSources: Load packaged vote-core classes
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (4 skipped: 4 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 and concisely describes the main change: adding a standalone shared vote core artifact.
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 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
✨ 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

Comment @coderabbitai help to get the list of available commands.

@BenCodez BenCodez closed this Sep 20, 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.

1 participant