Skip to content

Preserve equipment slots in serialized inventories - #94

Open
BenCodez wants to merge 2 commits into
mainfrom
fix/inventory-slot-roundtrip
Open

BenCodez wants to merge 2 commits into
mainfrom
fix/inventory-slot-roundtrip

Conversation

@BenCodez

@BenCodez BenCodez commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

The positional inventory encoder can map armour/offhand values onto occupied main-inventory positions and decode equipment under nonnegative keys. This gives negative slots distinct appended positions and records their original keys in an optional SLT1 suffix, preventing collisions and preserving placement identity on new round trips.

Legacy positional payloads remain readable with every surviving value and its existing nonnegative key, including positive slots above 35. The reader does not guess missing equipment identity or recover values already overwritten by older writes. It also reads the historical header-only empty payload and rejects partial, unknown or invalid suffix metadata instead of silently returning incorrect keys.

The payload gains an additive suffix; Java signatures, YAML/SQL columns, configuration, storage callers and runtime dependencies remain unchanged. There is no stored-data migration or rewrite. Older readers retain every value from new output but do not restore negative identities; rewriting through an older reader loses that placement information.

Validation at exact head 4e4833b9: deterministic regressions failed before the fix, and all 12 final tests pass. Maven package and shaded-artifact checks pass; exact-head hosted Maven CI is successful. CodeRabbit was skipped. Fresh independent source-read-only review approved the complete three-file snapshot after the malformed-suffix finding was corrected. Tests use synthetic serializable ItemStack labels through real Bukkit streams; live item metadata and live YAML/SQL restart behavior were not tested.

This is separate from #84 and #93. Existing corrupt-input caller fallback and broad persistence durability are outside this focused correction.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2b5ebc5c-aeaa-4da7-8678-a562a3b81bf0
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T00:00:24.929305Z 4e4833b Draft marked ready
🔒 Security Review ✅ Completed 2026-11-25T00:02:14.444661Z 4e4833b 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.

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