Skip to content

CraftEngine-first Mahjong 2.0 architecture - #131

Draft
TypeThe0ry wants to merge 75 commits into
devfrom
2.0
Draft

CraftEngine-first Mahjong 2.0 architecture#131
TypeThe0ry wants to merge 75 commits into
devfrom
2.0

Conversation

@TypeThe0ry

Copy link
Copy Markdown
Member

Summary

  • split the core into Java 21 rule SPI/TCK, domain, actor application, signed rule runtime, presentation, SQL, Paper, and CraftEngine modules
  • isolate every table behind a bounded single-writer actor, fair bounded rule CPU scheduling, per-table persistence outbox, and latest-only scene projection
  • add signed restart-only rule-pack installation/activation commands, version-pinned recovery, SQL event/snapshot storage, and CraftEngine bundle integrity handling
  • replace legacy global table/player watchdog scans with one-shot per-table and per-player scheduling
  • document the three independent official rule repositories and the staged LEGACY → SHADOW → RULE_PACK migration gates

Validation

  • ./gradlew check shadowJar
  • MCR: ./gradlew clean check jar javadoc — 97 tests
  • Riichi: ./gradlew clean check jar javadoc — 89 tests plus mahjong-utils verification
  • Sichuan: ./gradlew clean check jar javadoc — 35 tests
  • plugin SHA-256: B1693FB232A71C63064622208A2766801B6B4C8DFF039188952958B7636C4119

Cutover status

This PR establishes the 2.0 architecture and fail-closed runtime boundary. Existing matches remain on the legacy path until each independent rule repository implements the SPI provider, passes the TCK and accuracy gates, and advances through SHADOW at new-match boundaries.

Tag every spawned region entity with table/session/role/slot/generation
in its persistent data container, add /mahjong cleanup (orphan-only)
and debug entities listing, and scan for orphans at plugin startup so
leaked displays can be attributed to a table and removed without ever
touching unrelated Interaction/ItemDisplay entities.
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.

2 participants