Skip to content

Extract shared executor runtime with a Bukkit lifecycle adapter - #313

Merged
BenCodez merged 1 commit into
masterfrom
codex/shared-runtime-lifecycle
Sep 8, 2026
Merged

BenCodez merged 1 commit into
masterfrom
codex/shared-runtime-lifecycle

Conversation

@BenCodez

@BenCodez BenCodez commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

Second requested platform-preparation PR. Extract the existing executor/lifecycle implementation into core/runtime and the Bukkit-specific cleanup hooks into bukkit/runtime, in the current single Maven project.

  • Introduce RuntimePlatform with JDK-only executor and cleanup contracts.
  • Move creation of the three background executor owners and shutdown sequencing into AdvancedCoreRuntime.
  • Keep AdvancedCoreLifecycle as the public compatibility facade. AdvancedCorePlugin already uses it, so the Bukkit path uses the extracted implementation immediately.
  • Preserve scheduler/executor identity, separate executor ownership, cleanup order, 2/2/2/1-second grace periods, reward shutdown position, interruption handling and warning/debug callbacks.
  • Retain existing lifecycle tests and add six tests for exact ordering, failure handling, identity and a real JDK-only runtime fixture.

Compatibility and scope

One POM, no submodules, no new workflows, no dependency/version changes, and no AdvancedCorePlugin public API changes. The existing BukkitScheduler/Folia behavior is untouched. This does not redirect entity/region work to a global executor.

This is the executor/lifecycle slice, not a complete native AdvancedCore service graph. User/storage/reward services and final native artifact packaging remain separate steps. There is no duplicate user cache or second service registry. Existing lifecycle serialization and synchronous cleanup behavior remain; the executor grace periods are not a global timeout for arbitrary cleanup callbacks.

Verified build

Existing Java CI with Maven — run 530 passed on Java 21. Inspected build job 101919368836 and its actual Maven log:

  • mvn -B -f AdvancedCore/pom.xml package — BUILD SUCCESS.
  • 284 tests, zero failures/errors/skips, including all six new tests and both original lifecycle tests.
  • The headless fixture passed with Bukkit and JUnit absent from its isolated runtime.
  • AdvancedCore.jar was generated and normal shading/minimization completed.
  • Tested PR merge ref dc303c9aeea529f58e9a6c1a950830e7f2602c34 for head 50eb4bec1a0e0c42c757d428fa3ce778af3e7cb2 and base 5fe205bca26236a92ee2fda1634f056639b307a3.

Local Java 21 compilation of the two shared production classes also passed. A local JDK-only smoke program ran a real task, checked independent executor owners and cleanup order, verified termination, and verified rejection after shutdown.

The editing container has no Maven/dependency network access. The full Maven result is from GitHub Actions, not a local Maven run. No current downstream VotingPlugin build, live-server test or live-database matrix was run. Source inspection was same-context; no independent reviewer execution is claimed.

Related work

These initial AdvancedCore PRs have disjoint production changes and independently target master. This lifecycle slice does not require SimpleAPI#78 to be published or merged.

Nothing is merged, deployed or published by this PR.

AI disclosure: This implementation and pull-request description were prepared with assistance from ChatGPT.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 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-08T02:57:26.196460Z 50eb4be Draft marked ready
🔒 Security Review ✅ Completed 2026-09-08T03:00:19.381889Z 50eb4be 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 a315bc5 into master Sep 8, 2026
4 checks passed
@BenCodez
BenCodez deleted the codex/shared-runtime-lifecycle branch September 8, 2026 22:42
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