Skip to content

Add the estate API (stage 6b) - #46

Merged
ryanbarlow97 merged 3 commits into
mainfrom
stage6b/estates
Oct 13, 2026
Merged

ryanbarlow97 merged 3 commits into
mainfrom
stage6b/estates

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Adds the stage 6b estate API (design rule E5) in net.tfminecraft.tlibs.character.estate, plus CharacterRevivedEvent in net.tfminecraft.tlibs.character. Everything is additive; no existing API changes.

RPCharacters registers an EstateService and decides each estate. SimpleFactions registers an EstateFallback for guild answers. Each plugin that moves a dead character's records registers an EstateParticipant. All three are ServicesManager services, so the plugins keep no hard dependency on each other.

  • EstateDecision holds the death, testator, death time (empty for legacy deaths), heir, death guild and realm, the four part recipients and a revision. The constructor refuses a recipient a part cannot have (money: ACCOUNT or FROZEN; property and guild locks: CHARACTER, WAITING or FROZEN; letters: CHARACTER or SENDER).
  • Recipient and Outcome are sealed types with factories, constants and a kind() enum for storage. Outcome.done(counts, movedIds) carries the IDs of every record moved.
  • DeathGuild (UNAVAILABLE, NONE, GUILD) and GuildLookup (UNAVAILABLE, GONE, LIVE) keep "cannot tell now" apart from "no guild" and "gone". Realm UUIDs are the realm's ruling-guild incarnation, so guild(realm) gives the realm treasury.
  • The Estates facade follows Characters: main thread only, services looked up on every call, empty answers without a service, and UNAVAILABLE guild answers without a fallback. Estates.guardHolds(decision) is the participant guard: testator DEAD with the decision's deathId, estate DECIDED with this exact decision current. Null answers from a broken service read as empty.
  • EstateDecidedEvent and CharacterRevivedEvent are synchronous wake-ups; their Javadoc says delivery is not durable.

Intended release: TLibs 2.6.0 (not tagged; installed locally from 654f780 for the dependent stage 6b builds).

Gate: tfmc-mvn -o -B clean verify, 232 tests, 0 failures, JaCoCo line gate (0 missed lines) met; the new classes have no missed lines or branches.

Docs: TF-Minecraft/Docs#212

🤖 Generated with Claude Code

ryanbarlow97 and others added 2 commits October 13, 2026 13:53
Fires on the main thread after a dead character has been saved as alive
again, carrying the character and the death it came back from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add net.tfminecraft.tlibs.character.estate for stage 6b estates:
EstateDecision with typed Recipient parts, EstateParticipant with
Outcome and Holdings, EstateFallback with DeathGuild and GuildLookup
answers that keep UNAVAILABLE apart from NONE and GONE, EstateService
and EstateState, EstateDecidedEvent, and the Estates facade.

The facade looks services up on every call, enforces the main thread,
answers UNAVAILABLE without a fallback and offers guardHolds, the
participant guard: testator DEAD with the decision's deathId and the
estate DECIDED at that revision.

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

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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.

guardHolds now requires the service's current decision to equal the one
the participant holds, not only its revision, and the testator's saved
ref to match the decision's. report refuses a blank participant ID and
a negative revision. The facade reads null answers from a broken
service as empty, and participants() no longer promises an order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryanbarlow97
ryanbarlow97 marked this pull request as ready for review October 13, 2026 18:12
@ryanbarlow97
ryanbarlow97 merged commit 3d1e98c into main Oct 13, 2026
5 of 6 checks passed
@ryanbarlow97
ryanbarlow97 deleted the stage6b/estates branch October 13, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant