commit bc7920d0e51500d86b5afd56dfea0f1c88d9f5d3
parent 8449f09587061b9eaa795f89fe550a1b9506e703
Author: anon <anon@example.com>
Date: Tue, 3 Nov 2026 08:39:25 +0000
Reopen closed mission loot source before retrying isolation check
Diffstat:
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/TODO.md b/TODO.md
@@ -3660,6 +3660,14 @@ with payloads and known client/server provenance.
without loosening wear admission. Both original failures are retained; the
corrected fixtures pass in the 34-root / 144-result ordinary and race checks.
Evidence: `local/fixture-database-audit/`.
+- [x] [P1] Repair the mission-isolation loot regression's stale-window retry.
+ Cross-world pickup closes the invalid corpse window; returning to the owning
+ world must reopen it before retry. Check: exact item, XP and cash survive cold
+ loading, reopening never pays twice, and the foreign world remains unchanged.
+ The original fixture fails in isolation. The repair passes 9 roots/15 results,
+ the related race run passes 20/49, and the short two-client WASM refusal check
+ retains all 32 identities through stale/expired rejection, native page replay
+ and cold database loading.
- [ ] [P3] Reproduce stale shop interaction state after a live control-panel
inventory edit. In the restoration smoke run, a nearby original terminal
reported "Too far away" after the edit, while a fresh page could use it.
diff --git a/server/mission_boundaries_test.go b/server/mission_boundaries_test.go
@@ -264,10 +264,19 @@ func TestMissionBoundariesCombatAndLootCannotReachAnotherWorld(t *testing.T) {
if err := world.handleInventory(client, lootTakeRequest()); err != nil {
t.Fatal(err)
}
- if len(npc.corpse.items) != 1 || world.items[item].Template != 42640 {
- t.Fatal("stale loot window transferred its item across worlds")
+ if client.lootCorpse != 0 || len(npc.corpse.items) != 1 || world.items[item].Template != 42640 {
+ t.Fatal("stale loot window transferred its item across worlds or remained open")
}
+
+ // Reopen the closed source before retrying from its owning world.
player.playfield = 65536
+ binary.BigEndian.PutUint32(request[20:24], 3)
+ if err := world.handleLootUse(client, request); err != nil {
+ t.Fatal(err)
+ }
+ if client.lootCorpse != npc.id || npc.corpse.credits != 0 || player.inventory.Credits != 5 {
+ t.Fatal("same-world corpse reopening failed or paid its cash twice")
+ }
if err := world.handleInventory(client, lootTakeRequest()); err != nil {
t.Fatal(err)
}