Skip to content

Read ruin dossiers with more than 50 YAML aliases - #31

Merged
ryanbarlow97 merged 1 commit into
mainfrom
fix/dossier-aliases
Oct 14, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
fix/dossier-aliases

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

Bukkit's YamlConfiguration saves the shared empty cell lists in a ruin site as YAML aliases (&id001 [], *id001) and reads them back with no alias limit. The ownership parser in SiteDocuments kept SnakeYAML's default cap of 50 aliases. On Dev, every site file with more than 50 aliases (nine of them, all created around 19 September) failed to parse, was held unmigrated and appeared in wills as <uuid>.yml (held: Invalid dossier YAML).

The parser now lifts the alias cap to match Bukkit. Recursive values and deep nesting are still rejected by the existing key walk. Will entries now show the site's title and short ID (Site in desert 225fdad8) instead of its file name.

Tests: bukkitAliasedEmptyListsBeyondSnakeYamlDefaultLimitMigrate fails without the fix and passes with it; tfmc-mvn -o -B clean verify passes.

After release and restart, the held Dev sites migrate on the next load. Their originals are already archived under ownership/source/.

🤖 Generated with Claude Code

Bukkit saves shared empty cell lists as YAML aliases and reads them back
without a limit, but the ownership parser kept SnakeYAML's default cap of
50. Nine Dev sites crossed it, stayed unmigrated and showed in wills as
"Invalid dossier YAML". Wills now name a site by its title and short ID
rather than its file name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size:XS 0-9 effective changed lines (tests excluded in mixed PRs). label Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 802eb246-1795-43a1-9e2b-923c37f20cb4
📥 Commits

Reviewing files that changed from the base of the PR and between f20bcd3 and 61da0b5.

📒 Files selected for processing: 5
  • src/main/java/net/tfminecraft/archaeo/ownership/SiteDocuments.java
  • src/main/java/net/tfminecraft/archaeo/ownership/SiteEstates.java
  • src/test/java/net/tfminecraft/archaeo/ownership/SiteEstatesTest.java
  • src/test/java/net/tfminecraft/archaeo/ownership/SiteOwnershipTest.java
  • src/test/java/net/tfminecraft/archaeo/site/SiteStorageBoundaryTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • New Features
    • Site listings now use the site’s name where available, followed by a short ID for identification. Sites without a usable name are labelled “Ruin site” with the same short ID.
  • Bug Fixes
    • Site documents containing many cells that share an aliased empty list can now be loaded beyond the previous alias limit. Existing validation checks remain in place.

Site document parsing now permits more collection aliases. Site estate listings now show a document name or a fallback label with an abbreviated site ID.

Changes: YAML alias loading

Layer / File(s) Summary
Alias limit and site loading
src/main/java/net/tfminecraft/archaeo/ownership/SiteDocuments.java, src/test/java/net/tfminecraft/archaeo/ownership/SiteOwnershipTest.java
Parsing permits up to Integer.MAX_VALUE collection aliases. A test checks that a site with 61 cells sharing an aliased empty list loads all cells and remains unheld after migration.

Estate site labels

Layer / File(s) Summary
Formatted site labels
src/main/java/net/tfminecraft/archaeo/ownership/SiteEstates.java, src/test/java/net/tfminecraft/archaeo/ownership/SiteEstatesTest.java, src/test/java/net/tfminecraft/archaeo/site/SiteStorageBoundaryTest.java
Site listings use the document’s non-blank name, or Ruin site, followed by up to eight characters of the site ID. Tests check recipient and held-site labels.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 61da0

The alias allowance addresses the reported site-migration issue, and held sites retain fallback labels. No supported merge-blocking regression remains; the PR is mergeable subject to normal checks.

- [ ] 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

Comment @coderabbitai help to get the list of available commands.

@ryanbarlow97

Copy link
Copy Markdown
Contributor Author

Reviewed by Muse (muse-wonder-full-1.0): VERDICT OK. Non-blocking notes: lifting the alias cap could expand a hand-crafted nested alias graph exponentially in checkKeys/same, but dossiers are server-written only and Bukkit aliases only shared empty leaf lists; parsed aliased lists stay shared after copy, and no code mutates parsed lists in place. Merging without waiting on CodeRabbit.

@ryanbarlow97
ryanbarlow97 merged commit 0f73cf0 into main Oct 14, 2026
3 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/dossier-aliases branch October 14, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant