Skip to content

feat: support signed player-start coordinates - #34

Merged
jasoncavinder merged 2 commits into
devfrom
codex/signed-player-start-coordinates
Aug 10, 2026
Merged

feat: support signed player-start coordinates#34
jasoncavinder merged 2 commits into
devfrom
codex/signed-player-start-coordinates

Conversation

@jasoncavinder

Copy link
Copy Markdown
Owner

Summary

  • mark maintainer-approved ADR 0014 as Accepted
  • change stored player-start X/Y values from u32 to signed i64 throughout the core summary and validation APIs
  • treat negative coordinates as the existing contextual OutOfBounds finding
  • describe zero-map/nonzero-coordinate states as editor-preserved and ambiguous
  • advance the executable-wide CLI JSON schema from version 1 to 2
  • update the public documentation, compatibility matrix, capability roadmap, and evidence ledger

Why

A controlled RPG Maker MZ 1.10.0 save preserved startX = -1 and startY = -1. The unsigned projection therefore rejected an observed saved state before contextual validation could run. ADR 0014 corrects the representation without treating editor persistence as semantic validity or expanding the unrelated map-ID domain.

Contract

  • editMapId and startMapId remain strict unsigned u32 scalars.
  • startX and startY accept strict integer lexemes in the inclusive i64 range.
  • Fractional, exponent-form, and out-of-range values remain typed structural errors.
  • Exact 0, 0, 0 remains MissingPlayerStart.
  • Negative or upper-bound coordinates on a catalog-selected map produce OutOfBounds.
  • Raw documents and unknown properties remain untouched.

Compatibility impact

This is an intentional pre-1.0 Experimental Rust API change: coordinate accessors and finding fields change from u32 to i64. All CLI JSON commands now emit schema version 2 because the executable uses one global schema number. Human output accepts and displays signed values without changing command syntax.

Verification

  • generated synthetic tests cover -1, i64::MIN, i64::MAX, both overflow directions, signed mixed-zero states, negative and upper bounds, raw-byte preservation, human/JSON output, and schema version 2
  • a read-only differential audit matched all six retained controlled cases and their expected finding arrays (6/6)
  • cargo fmt --all --check
  • cargo check --workspace --all-targets --all-features
  • cargo test --workspace --all-targets --all-features
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps

All checks passed locally.

Non-claims

This does not establish general project validity, editor rejection, runtime success, passability, broader MZ numeric limits, mutation safety, persistence support, or later-version compatibility.

@jasoncavinder
jasoncavinder marked this pull request as ready for review August 10, 2026 07:47
@jasoncavinder

Copy link
Copy Markdown
Owner Author

Independent pre-merge review completed with no actionable findings. I reviewed the exact pushed diff against dev, including the accepted ADR migration, field-role-specific parsing and errors, signed boundary arithmetic, finding precedence, raw-byte preservation, global CLI schema-version transition, documentation claims, and synthetic plus retained-corpus coverage.

Verification: the complete local workspace gate passes (110 core tests and 80 CLI tests), and the retained controlled differential audit matches 6/6 cases. GitHub Linux, Windows, CodeQL, dependency review, and PR policy checks pass. The macOS job remains queued and has not started; local verification was performed on macOS.

PR #34 is ready for maintainer review. Wait for the queued macOS check to pass before merging.

@jasoncavinder

Copy link
Copy Markdown
Owner Author

Follow-up: the queued macOS job and final aggregate Rust quality check have now completed successfully. All required GitHub checks are green.

Copy link
Copy Markdown
Owner Author

Independent review completed against head 534a82f with no actionable findings. I checked the signed-coordinate public API migration, field-specific integer parsing, validation precedence and bounds logic, raw-byte preservation, the executable-wide schema v2 transition, ADR/docs consistency, and regression coverage. The full local Rust quality gate passed (fmt, workspace check, 110 core tests and 80 CLI tests, clippy -D warnings, and rustdoc with warnings denied). PR #34 is ready to merge.

@jasoncavinder
jasoncavinder merged commit c3ae3f9 into dev Aug 10, 2026
8 checks passed
@jasoncavinder
jasoncavinder deleted the codex/signed-player-start-coordinates branch August 10, 2026 22:53
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