Repository navigation
Pass shops on with the estate (stage 6b) - #35
Merged
Merged
Conversation
Both trade directions refuse with "This shop's owner has died." when the owning character is not alive, and stay closed while the owner cannot be read. A revived owner's shop trades again. Pins TLibs 2.6.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Staff with bartershops.admin inspect the trade record that keeps a shop closed and clear it. A prepared trade whose posting is absent or refused clears at once while the ledger is ready; a prepared trade with an applied posting, a delivering or conflict record, or an unreadable one is shown and clears only with --confirm after staff put things right. Nothing clears while the ledger is not ready. Clearing removes the file and this process's copy. Every use is written to logs/staff-audit.log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bartershops estate participant gives each shop of the testator to the property recipient, character and account, rewriting Data/<shopId>.json in place through DurableFiles. A journal per death (estates/<deathId>.json) is written before the first shop changes, so a crash is finished at the next settle and DONE always carries every moved shop ID. Shops with an unfinished trade stay and answer BLOCKED; waiting and frozen property answers DONE with nothing moved. Settling waits for the shop migration and acts only while the estate guard holds. describe() lists the character's shops. The participant registers 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. 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 |
A shop planned before a crash is checked for an unfinished trade again before it moves, and is blocked if it has one. A journal whose death or testator does not match the estate is refused (RETRY), so another death's shops cannot join this one. Unreadable shop files are reported once each through the plugin logger instead of a stack trace on every pass, and one failing estate no longer stops the hourly reconcile of the others. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under Main's load order BarterShops enables before RPCharacters and turns ready on its five-second poll, after the first-tick estate reconcile has already returned early. Shops of estates decided at start-up then waited for the hourly pass. The poll now runs the reconcile once when it finds shops ready; the first-tick and hourly runs stay. 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, umbrella TF-Minecraft/RPCharacters#89): BarterShops becomes the
bartershopsestate participant.Pause at death. Both trade directions refuse with "This shop's owner has died." while the owning character is not alive. An owner who cannot be read keeps the shop closed. A revived owner's shop trades again.
Transfer. When RPCharacters decides an estate, each shop owned by the testator goes to the property recipient, character and account, rewritten in place in
Data/<shopId>.jsonthroughDurableFiles(the oldsaveShopalways minted a new file, so it is not used here). A journal per death,estates/<deathId>.json, is written before the first shop changes, so a crash is finished at the next settle and DONE always carries every moved shop ID (design M12). Waiting and frozen property answers DONE with nothing moved. The participant acts only whileEstates.guardHoldsholds and the shop migration has finished.describe()lists the character's shops.Leftover trades. A shop with a record in
trades/stays with the testator and the estate answers BLOCKED, naming it. The new staff command/bartershops intent <shopId> [clear [--confirm]](bartershops.admin, audit-logged tologs/staff-audit.log) follows the design's P1 table: only apreparedrecord whose posting is absent or REFUSED clears without--confirm, and only whileDenars.ready(); prepared + APPLIED,delivering,conflictand unreadable records are shown and needclear --confirmafter staff act by hand; nothing clears while the ledger is not ready. Clearing removes the file and the in-memory entry, so no restart is needed.Reconcile and probes. The participant registers only when TLibs has the estate API (
Class.forNameprobe), settles every decided estate on the first tick and hourly, and reports with the revision answered, only when the outcome changes. On TLibs 2.5.0 the plugin still enables (checked by loading and verifyingShopMainagainst the 2.5.0 jar) and simply does not take part.Pins TLibs 2.6.0, which is not released yet, so CI may fail resolving it until it is.
Docs: TF-Minecraft/Docs#214
Review. Muse's minor findings are addressed in b995f6f: journals from another death are refused, a reconcile failure on one estate no longer stops the others, plus the repository-specific items.
Tests.
tfmc-mvn -o -B --no-transfer-progress clean verify: 256 tests, 0 failures (no coverage gate is configured). New tests cover the pause in both directions, the in-place owner rewrite, the transfer, idempotent re-settles, crash replay after the plan and after the shop write, removed or given-away shops, blocked shops then retry, waiting and frozen property, guard and readiness, the reconcile's change-only reporting, chained estates, registration, the probe, and every row of the intent table.🤖 Generated with Claude Code