Repository navigation
Stage 6b: estates (death guild, vehicles, replay guard, upkeep pause) - #163
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Death capture records lockGuildRealm, the realm's ruling guild incarnation, beside lockGuildIncarnation, using the same ungated lookup and civil-war mapping (a moved rebel follows its origin guild in the host realm). Replay now checks the character first: the current death replays, a revived or re-dead character's journal is closed (remaining steps done, complete, closedBy) and claims whose cleanup never applied are cancelled in the same write, so wages are never paid twice. Unreadable characters wait. Succession never displaces a living seat holder. CharacterDeaths answers the death guild from the journal alone, with the realm from the stored rights plan for older journals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GuildEstateFallback answers TLibs' EstateFallback from the death journals and live guilds only: UNAVAILABLE until SimpleFactions is ready or while a referenced death has no journal, NONE, or the death guild with its live state, current leader and realm. Guild lookups give the treasury account and the realm as its ruling guild's incarnation, and never create a guild. EstateBridge probes the TLibs 2.6.0 estate classes once and keeps every call behind EstateCalls, so an older TLibs only means no estates. The fallback registers once factions start; the vehicles participant registers at the end of the vehicle stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cipient The simplefactions-vehicles participant finds vehicles by personal payer row or by VehicleFramework owner, writes vehicles/estates/<deathId>.json durably before the first change, then moves the payer row, the owner tag (HANDOVER) and the last owner as separate durable steps. Replay follows the observed row and tag, never rewrites a vehicle handed on since, and lists a vehicle for staff after three gone or unreadable reads without putting the dead owner's row back. No fee; no slot or battle-lock check. The hourly reconcile settles every decided estate again, which moves vehicles that appear later, and reports only changed outcomes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he estate While the payer is dead and its latest estate is OPEN, HELD or DECIDED, settlement marks no new unpaid day for its personal vehicles and the hourly upkeep deals them no damage. An unpaid marker set before the death stays until the recipient pays. The estate state is read through the probed bridge, which answers false on any failure, so no estate error can reach the financial failure path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
…ay guard - A MISSING character's journal waits for staff instead of replaying (E13). - Waiting or frozen property answers DONE before the readiness checks, so a degraded vehicle stage never holds back a revive. - A BLOCKED vehicle stays blocked: the participant's own reconcile leaves it alone and only a call from the estate provider (staff retry) reads it once more. Gone or unreadable reads count at most once an hour. - An entry planned for another recipient is listed rather than reported as moved. - The reconcile catches failures per estate, so one bad record does not hold back the rest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 6b (estates and wills) for SimpleFactions 4.2.0, on the TLibs 2.6.0 estate API. SimpleFactions answers which guild a character died in, hands dead owners' personal vehicles to the estate recipient, stops its death journal from acting on a revived or re-dead character, and pauses upkeep while vehicles wait for an estate. Design: stage 6b v2.3, rules E10 and E12, the SimpleFactions participant section and review items M1, M5, M11, N2, N3 and P2–P4.
Death realm. Death capture records a new optional journal field,
lockGuildRealm: the incarnation of the death guild's realm's ruling guild, taken from the same ungated lookup and civil-war mapping aslockGuildIncarnation(a moved rebel follows its origin guild in the host realm). Journal validation accepts it andclosedBy.Replay guard. Before an incomplete journal replays, the character is read. If it is still DEAD with that death ID, the journal replays as before. If it is ALIVE, or dead with another death ID, the journal is closed: remaining steps are marked done unapplied,
complete=trueandclosedBy: revive|redeath. Claims whose cleanup step never applied are cancelled in the same durable write by settingpaid = cents, because their wage bucket and dividend eligibility were never cleared, so nothing is paid twice. An unreadable or MISSING character is skipped for now (staff decide MISSING characters). Older jars read a closed journal as complete and its cancelled claims as paid, and their Gson ignores the new fields. A succession step never displaces a living seat holder but still fills a blank seat.EstateFallback, registered once factions start (beforeSimpleFactionsReadyEvent):deathGuild(character, deathId): UNAVAILABLE while SimpleFactions is not ready or a referenced death has no journal yet; NONE for a guildless death; otherwise the death guild with its live state, current leader (Guild.getLeader(), the realm's for a ruling guild) and the realm recorded at death. For older journals the realm comes from the one stored rights plan that lists the guild;snapshot()is never re-run.guild(incarnation)andguildByName(name): UNAVAILABLE, GONE, or LIVE with the treasuryguild:<incarnation>and the realm as its ruling guild's incarnation.guildByNamealso accepts an incarnation; a name two guilds share answers UNAVAILABLE.Vehicles participant
simplefactions-vehicles, registered at the end of the vehicle stage. It finds vehicles by personal payer row or VehicleFramework owner, writesvehicles/estates/<deathId>.jsondurably before the first change, then moves the payer row (payments.personal), the owner (VehicleOwnerWrites.write(HANDOVER)) and the last owner (fee store's durable save) as separate durable steps. The estate gate checks a known type, not faction-owned, payments ready and not blocked, and notVehicleQuarantine.held. There is no fee, slot or battle-lock check. Replay follows the observed row and tag:fromnortototo, tagfromto, tagto, beforelastOwnerto, tagto,lastOwnerNOT_FOUND or an unreadable vehicle is BLOCKED after three checks at least an hour apart, and the dead owner's row is not put back. A blocked vehicle stays blocked until the estate provider calls again (staff
/estate retry), which reads it once more. An entry planned for another recipient is BLOCKED rather than reported moved. Waiting or frozen property answers DONE even while the vehicle stage is down. Other owner-change failures put the previous row back and retry. DONE carries the count and every moved vehicle ID. A boot and hourly reconcile overEstates.decided()catches vehicles that appear later, such as a build finishing for the dead payer; failures are caught per estate.Upkeep pause. While the payer is dead and its latest estate is OPEN, HELD or DECIDED, settlement marks no new unpaid day and the hourly upkeep deals no damage. An unpaid marker set before the death stays.
Capability gate.
EstateBridgeprobes the TLibs 2.6.0 classes once. OnlyEstateCalls,GuildEstateFallbackand the participant touch them, and every call is caught, so on TLibs 2.5.0 SimpleFactions enables and simply takes no part in estates. No estate error can reachfailFinancialState.Docs: TF-Minecraft/Docs#219
Gate:
tfmc-mvn -o -B clean verify: 7,985 tests, 0 failures, 100% line coverage. Tests cover crash and replay at each vehicle step, claim cancellation without double payment, old-jar journal compatibility, the civil-war realm, and the absent and UNAVAILABLE paths. CI may 404 on the unreleased TLibs 2.6.0.🤖 Generated with Claude Code