Skip to content

Pass research stations on with the estate (stage 6b) - #18

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

ryanbarlow97 merged 8 commits into
mainfrom
stage6b/estates

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

When RPCharacters settles a dead character’s estate, Research transfers each station owned by that character to the property recipient, saving the new account and character atomically. A per-death journal preserves moved station IDs across crashes; failed saves restore the in-memory owner and answer RETRY. Waiting or frozen property moves nothing. Transfers require Estates.guardHolds, and reconciliation runs on the first tick and hourly with per-estate failure isolation.

Stations saved without a character receive their account’s reviewed legacy heir once at startup. This pass inventories persisted JSON ownership metadata independently of recipe/output/world validation, so unloadable stations are covered. Its durable plan fixes the original account and heir before changes; original station bytes are backed up durably, and atomic writes change only owner_character_id, preserving all other JSON fields. Replay checks location/account identity and existing claims. Invalid, missing or changed files are logged and listed for staff alongside accounts without heirs. A failed read, backup, write or completion marker leaves the plan for the next boot; completed runs are a no-op. Loaded station objects receive the same assignment.

Pins TLibs 2.6.0; capability probes preserve loading on older TLibs. Unreleased dependency pins can prevent CI resolution until publication. Related documentation: TF-Minecraft/Docs#218. Umbrella: TF-Minecraft/RPCharacters#89.

Validation: TFMC_MVN_REMOTE=1 tfmc-mvn -o -B --no-transfer-progress clean verify on the CachyOS PC passes at integrated head 8b1578acc9b6a4ea177abb43eec37fc55b68995a with 296 tests, no failures/errors, and zero missed lines. The focused regression fails before the ownership inventory fix and passes afterward. Tests cover estate transfer/replay, atomic saves, unloadable station ownership, unknown field preservation, exact original backups, immutable heir replay, changed account/claim refusal, invalid ownership reporting, write/marker failures, and subsequent-boot no-op. The previously installed/lab-confirmed 1.3.0 candidate from 44a35f1 passed its full 295-test gate before local Maven installation; the root workflow owns the final release build after this source integration.

The separately reviewed filesystem-order fix #19 is merged at c65892d47a79b426938c0a3f8ef083d0a2b33259 and included here through a normal merge from main. Combined tree 19c5ff8a8dbd8af654b0a18a5da6a6358c6e2fdb exactly matches the earlier isolated combined proof, and the fresh full CachyOS gate passes. This PR remains draft pending publication of TLibs 2.6.0 and current-head CI verification by the root workflow.

ryanbarlow97 and others added 3 commits October 13, 2026 14:38
StationStore writes a temporary file, flushes it, moves it over the station
file and flushes the folder, instead of truncating the file with a plain
FileWriter. saveStation reports whether the station was saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The research estate participant gives each station whose ownerCharacterId
is the testator to the property recipient, account and character, and saves
it atomically. A failed save puts the old owner back and answers RETRY. A
journal per death (data/estates/<deathId>.json) is written before the first
station changes, so a crash is finished at the next settle and DONE always
carries every moved station key. Waiting and frozen property answers DONE
with nothing moved; the participant acts only while the estate guard holds.
describe() lists the character's stations.

It registers after stations load, only when TLibs has the estate API,
reconciles on the first tick and hourly over decided estates, and reports
changed outcomes with the revision answered. Pins TLibs 2.6.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size:L 100-499 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.

ryanbarlow97 and others added 3 commits October 13, 2026 14:51
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A journal whose death or testator does not match the estate is refused
(RETRY), so another death's stations cannot join this one. describe() no
longer throws for a station whose world is unloaded or whose project is
missing, and one failing estate no longer stops the hourly reconcile of
the others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A one-time startup backfill, as 6a did for locks and vehicles. Once
TLibs' reviewed heirs are ready, every station with no recorded character
is planned to its account's legacy heir (plan.json, written before any
station changes and reused after a crash), its original file is kept in
backup/, and it is saved atomically through StationStore. Accounts without
a heir keep their stations unassigned, as before, and are logged for
staff. done.json records the counts and unresolved stations; later boots
do nothing. If heirs are not ready, or a station cannot be saved, the
backfill tries again at the next boot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added size:XL 500-999 effective changed lines (tests excluded in mixed PRs). and removed size:L 100-499 effective changed lines (tests excluded in mixed PRs). labels Oct 13, 2026
@ryanbarlow97
ryanbarlow97 marked this pull request as ready for review October 13, 2026 18:26
@ryanbarlow97
ryanbarlow97 merged commit 6314ae0 into main Oct 13, 2026
3 of 4 checks passed
@ryanbarlow97
ryanbarlow97 deleted the stage6b/estates branch October 13, 2026 18:26
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