Skip to content

Delayed loot-roll START can recreate a resolved roll #441

Closed

Description

@Mathih13

A delayed Loot Roll START can recreate a roll after its first resolution. PR #439 prevents concurrent promotion from creating two live rows, which satisfies #63. Resolution still removes the row that promotion uses for deduplication.

The current path is:

  1. Two Gateways read the same staging roll in gateway/src/world/loot.rs::promote_one.
  2. Gateway A promotes it. Votes, the deadline sweep, or a group disband resolve it in Realm-core.
  3. module/src/loot/rolls.rs::cleanup_roll deletes the roll and its votes.
  4. Gateway B sends the START it read earlier. insert_roll_rows finds no row for the corpse and slot and inserts fresh votes.

Choose how to identify a roll across resolution and how long that identity must remain. Creature guids and loot slots can be reused on a later kill, so permanently refusing the same corpse and slot would also prevent valid future rolls. Keeping resolved rows until a timeout only prevents replays within that timeout. Assess a generation identifier or a promotion acknowledgement protocol before choosing storage and cleanup rules. Follow docs/danger-zones.md if the decision changes schema.

Done when a durable integration test resolves a promoted roll, replays its original START, and verifies through SQL that no new active roll or vote set appears. Also prove that a later valid roll on the same corpse and slot can start, and test the chosen cleanup boundary. Keep the existing settlement grant Gate intact.

This was generated by AI during triage.

Activity

  1. Mathih13 commented on Sep 7, 2026

    @Mathih13
    ContributorAuthor

    Implemented in #461, merged as 5f42e5a after human schema approval, all seven checks and current-commit CodeRabbit review.

    Six durable cases prove that resolved START replays create no active roll or votes, later valid generations can reuse the same corpse and slot, and permanent source receipts preserve the boundary across cleanup and additive publication. The existing settlement grant Gate remains intact. The tested upgrade and pinned CLI checkpoint are documented in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions