Skip to content

Extract shared reward configuration reads with Bukkit compatibility - #318

Merged
BenCodez merged 4 commits into
masterfrom
codex/shared-reward-configuration
Sep 12, 2026
Merged

BenCodez merged 4 commits into
masterfrom
codex/shared-reward-configuration

Conversation

@BenCodez

@BenCodez BenCodez commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Task 1 of the Fabric/Forge/NeoForge preparation: make AdvancedCore consume SimpleAPI's platform-neutral reward-configuration APIs without moving storage or reward execution.

  • Add core.rewards.RewardConfigReader, using StructuredConfigView for command lists, chance, delays/timing, reward type, flags, and nested read views/literal definition keys.
  • Add bukkit.rewards.BukkitRewardConfigReader to preserve Bukkit's implicit default-tree getters and raw-list behavior.
  • Make 21 existing RewardFileData read methods delegate to the shared implementation. Resolve the existing virtual getConfigData() lazily so reloads, replacements, and subclasses keep working.
  • Add 14 JUnit regression cases plus a JDK-only behavioral fixture covering defaults, casing, raw-list identity/casts, nested definitions, replacement/reload/subclass behavior, isolated loading, and real Bukkit/Configurate parity.
  • Use SimpleAPI 1.0.2-SNAPSHOT as requested by the maintainer. Remove only simpleApiDependencyUsesImmutableSnapshotBuild(); retain the separate Javadoc workflow security test.

Compatibility and scope

Existing public constructors/method signatures, native section getters, deprecated item getters, setters, file I/O, generated reward snapshots, and reward-derived permission-default evaluation are unchanged. The legacy ArrayList casts and their failure behavior are deliberately preserved; this extraction does not silently coerce/filter command lists or change their mutability.

One existing Maven project, core/bukkit packages, no modules or new workflows. No user/cache/storage/schema/FLAT changes, no reward execution or async queue changes, no mod loader or new artifact packaging. #314 stays closed. This does not modify #317's execution implementation; coordinate the dependency/build changes when combining the branches.

Snapshot preference update

Commit 4b3e2437e22a1068f08874db49c76bad16e50e91 replaces the timestamped SimpleAPI dependency with 1.0.2-SNAPSHOT, removes its timestamp-pinning test method, and updates the dependency documentation. The Nexus repository already enables snapshots with updatePolicy set to always; no repository or workflow change was needed.

The Javadoc action-revision/permissions checks and all reward-configuration tests remain unchanged. No tests were disabled or skipped; the one explicitly unwanted dependency-policy test was removed. Validation should record the actual timestamped snapshot Maven resolves, since future published snapshots can change the build inputs.

Java CI with Maven — run 578 was in progress when this description was updated. The previous green run below does not establish the result of this new commit.

For this follow-up, verified the test/documentation baseline against their Git blob hashes, checked that the Javadoc test body is unchanged, ran local git diff --check on those two files, and inspected the complete published three-file commit diff. The POM change is exactly the dependency-version line. A full local Maven build was not run: Maven is absent and the container cannot resolve external dependency hosts. These static checks are not represented as JUnit or full-build execution.

Previous build-failure diagnosis and CI evidence

The original SimpleAPI pin, 1.0.2-20260905.234759-10, predates the structured configuration APIs and caused missing-package/class compilation errors in run 571.

A diagnostic snapshot build successfully resolved 1.0.2-20260910.221115-20 from Nexus. Commit a222e28840201a15d33a3e366cd5b9bd36a4bede then pinned that version and updated the test's expected timestamp. That dependency policy has now been superseded by the maintainer's request above.

Java CI with Maven — run 576 passed for that previous commit. Its completed build log showed:

  • mvn -B -f AdvancedCore/pom.xml package on Temurin Java 21.0.12.
  • 320 tests run, 0 failures, 0 errors, 0 skipped.
  • RewardConfigBukkitCompatibilityTest: 12 passed, including real Bukkit/Configurate parity.
  • RewardConfigReaderTest: 2 passed, including the isolated no-Bukkit fixture.
  • BuildInputPinningTest: 2 passed at that revision; the SimpleAPI method is removed in the current candidate.
  • The exact timestamped SimpleAPI POM/JAR downloaded with no restored Maven cache.
  • AdvancedCore/target/AdvancedCore.jar generated and shading completed with BUILD SUCCESS.
  • Tested integration merge e151144b4cdb9967ae6addfd8be91a6599fd9cd1, combining candidate a222e28840201a15d33a3e366cd5b9bd36a4bede with base 48ae122cfd7d7dc59d5cd3f1b1e6f31c6703fe4b.

These are GitHub Actions results, not a local Maven build. Shade emitted minimization/overlap warnings; successful packaging does not replace packaged-runtime/linkage inspection.

Other validation and outstanding gates

Initial implementation checks verified the original RewardFileData.java blob, compiled the shared reader against fetched SimpleAPI interfaces, and passed 10 JDK-only behavioral scenarios. Public facade signatures and non-read method bodies were compared with the baseline. These component checks are not full project builds.

The PR remains draft. Full local SimpleAPI -> AdvancedCore -> VotingPlugin validation against the candidate artifacts, final shaded-JAR runtime/linkage inspection, live-server tests, and a fresh independent source-read-only review remain outstanding. Source inspection so far is same-context; no independent clean verdict is claimed.

Base: 48ae122cfd7d7dc59d5cd3f1b1e6f31c6703fe4b.
Current candidate: 4b3e2437e22a1068f08874db49c76bad16e50e91.

No merge, release, deployment, or manual external Codex review request is included.

AI assistance: ChatGPT assisted with implementation, test authoring, build-failure diagnosis/fix, the requested snapshot-policy update, same-context source inspection, and this PR description.

@BenCodez
BenCodez marked this pull request as ready for review September 12, 2026 20:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 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-12T20:49:41.398220Z 4b3e243 Draft marked ready
🔒 Security Review ✅ Completed 2026-09-12T20:54:42.408893Z 4b3e243 Draft marked ready
ℹ️ 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.

@BenCodez
BenCodez merged commit 977a3f1 into master Sep 12, 2026
4 checks passed
@BenCodez
BenCodez deleted the codex/shared-reward-configuration branch September 12, 2026 20:58
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