Skip to content

Remove deprecated FLAT user storage - #320

Merged
BenCodez merged 1 commit into
masterfrom
codex/remove-flat-user-storage
Sep 12, 2026
Merged

BenCodez merged 1 commit into
masterfrom
codex/remove-flat-user-storage

Conversation

@BenCodez

@BenCodez BenCodez commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

First of the two requested users/storage PRs for native-platform preparation. Remove FLAT now; do not add another migration system.

  • Remove UserStorage.FLAT and the normal flat-file read/write, existence/deletion, enumeration, column-copy/wipe, and startup paths.
  • Remove deprecated UserData.getData(String) and the per-player file CRUD helpers from FileThread.ReadThread; retain generic file utilities and their existing runner.
  • Reject explicit DataStorage: FLAT with instructions to convert on the previous version rather than silently selecting an empty SQLite database. Reject a null backend at loadUserAPI.
  • Retain SQLite/MySQL operations, existing SQL-to-SQL conversion, UUIDs, schemas, cache ownership, fetch modes, queued changes, write scheduling, and reward execution.
  • Add two storage-selection tests and three SQL read/write/delete compatibility cases.

Upgrade and compatibility

This is the explicitly requested removal, including the deprecated FLAT-only public APIs. Servers still using FLAT must complete the existing conversion process on the previous version before upgrading. No new migration, automatic conversion, automatic storage switch, or deletion of existing Data/*.yml files is introduced. Normal configuration YAML support remains.

One Maven project. No dependency, POM, workflow, reward-queue, or loader-packaging changes. SimpleAPI stays 1.0.2-SNAPSHOT; the removed dependency-pinning test stays removed. #314 remains closed.

Follow-up: #321. Merge this PR first. #321 builds on this commit and separates SQL user access from Bukkit-facing ownership. Coordinate both changes with #317's user/cache changes; this PR does not modify or merge #317.

Verified GitHub Actions build

Java CI with Maven — run 602 passed. Inspected completed build job 103631354043 and its Maven log:

  • mvn -B -f AdvancedCore/pom.xml package on Temurin Java 21.0.12.
  • 337 tests run, 0 failures, 0 errors, 0 skipped.
  • UserStorageTest: 4 passed, including the two new SQL-only/FLAT-rejection cases.
  • SqlOnlyUserDataTest: all 3 new SQL read/write/delete compatibility cases passed.
  • Existing user-data, fetch-mode, cache, reward, lifecycle, and platform-service tests passed.
  • Maven refreshed snapshot metadata and resolved SimpleAPI 1.0.2-20260912.212854-22. This records the tested input; the POM remains 1.0.2-SNAPSHOT.
  • AdvancedCore/target/AdvancedCore.jar generated; shading completed; BUILD SUCCESS.
  • Tested integration merge 220a7172d432dcf851859d802e36b319a8b3be6d for candidate e0f56679b12b0f0d7e67c655383e0f33b628d938 and base b03cb7f8a26c22e1e35b0c1a44ac1df7d5d8098d.

These are GitHub Actions results, not a full local Maven build. Shade emitted overlap/minimization warnings; successful packaging does not establish packaged runtime compatibility.

Local checks

  • Verified the exact original AdvancedCorePlugin.java against Git blob 1bed9a5cafc4f4ebbe892a6d63beb2e2211cfa3b; its change is confined to the storage loader.
  • Compiled the new UserStorage with Java 21 and ran a JDK-only selection probe: SQL choices retained, unknown/null inputs unchanged, FLAT variants rejected with upgrade guidance.
  • Parsed all seven changed/added Java files with the JDK compiler: syntax passed. This is not full dependency/type checking.
  • Plugin-file git diff --no-index --check produced no whitespace diagnostics; reviewed the SQL branch removals and checked uploaded production blob hashes against the local candidates.

Draft validation limits

Maven is absent and dependency/repository host DNS is unavailable in the editing container. Full local Maven and downstream SimpleAPI -> AdvancedCore -> VotingPlugin builds, actual database/server tests, packaged-linkage validation, and a fresh independent review have not been run. Same-context source inspection is not an independent clean verdict. Keep the PR draft until the required checks are complete.

Base: b03cb7f8a26c22e1e35b0c1a44ac1df7d5d8098d.
Candidate: e0f56679b12b0f0d7e67c655383e0f33b628d938.

No merge, release, deployment, or manual external review request was performed.

@BenCodez
BenCodez marked this pull request as ready for review September 12, 2026 22:51
@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-12T22:54:26.720885Z e0f5667 Draft marked ready
🔒 Security Review ✅ Completed 2026-09-12T22:54:22.660291Z e0f5667 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 36c71fe into master Sep 12, 2026
4 checks passed
@BenCodez
BenCodez deleted the codex/remove-flat-user-storage branch September 12, 2026 22:56
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