Skip to content

Complete Mahjong Soul helper v0.3.0 - #1

Draft
farfromexact wants to merge 1 commit into
mainfrom
agent/complete-majsoul-helper-v0.3.0
Draft

Complete Mahjong Soul helper v0.3.0#1
farfromexact wants to merge 1 commit into
mainfrom
agent/complete-majsoul-helper-v0.3.0

Conversation

@farfromexact

Copy link
Copy Markdown
Owner

What changed

  • Refactored capture replay, protobuf parsing, configuration, diagnostics, readiness, and version handling into focused modules.
  • Added the current Unity WebGL position-dependent XOR decoder with complete protobuf and action-specific plausibility validation.
  • Restored real ActionNewRound, draw, discard, meld, kan, riichi, and round-state handling without inventing hidden information.
  • Hardened capture export/import, explicit browser downloads, event ordering, state discontinuity detection, and live/offline acceptance gates.
  • Regenerated the Tampermonkey userscript and updated the architecture, sampling, project-state, changelog, and TODO documentation.
  • Expanded regression, jsdom, safety-boundary, replay, configuration, and diagnostics coverage.

Why

The previous implementation mixed transport capture, protobuf parsing, replay, diagnostics, and UI concerns, relied on fixed-offset guesses for Unity payloads, and could merge state across an uncaptured round boundary. This made live state restoration fragile and the acceptance evidence difficult to trust.

Impact

The helper remains passive: realtime advice is off by default, no game actions are automated, and WebSocket messages are not mutated. Captures now provide stronger diagnostics and replay agreement, while discontinuous samples are rejected instead of producing impossible hands.

A manual Unity session reached the live 20/20 MVP gate and 15/15 preflight and verified JSON download. Its exported sample crossed a paused round boundary, so the strict real-page gate correctly remains pending until a clean uninterrupted capture is collected.

Validation

  • npm run verify
  • 24 test files, 317 tests passed
  • MVP check and smoke preflight passed
  • generated userscript and support scripts pass syntax checks
  • fixture strict replay and capture validation passed
  • git diff --check
  • staged secret/capture review found no credentials, private live capture, local absolute paths, or unrelated artifacts

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