fix(multiplayer): persist arena identity on allocations

This commit is contained in:
Josh Creek
2026-09-01 21:16:42 +01:00
parent d4bde67e0f
commit 2ff348adf0
8 changed files with 27 additions and 15 deletions
@@ -0,0 +1,4 @@
-- Keep arena identity in the durable provider allocation record so retries
-- and provider recovery compare the complete match compatibility tuple.
ALTER TABLE allocations
ADD COLUMN arena_path TEXT;
@@ -0,0 +1,2 @@
ALTER TABLE allocations
DROP COLUMN IF EXISTS arena_path;
+5
View File
@@ -8,6 +8,7 @@ SQL = (Path(__file__).parent / "0001_initial.sql").read_text()
ASSIGNMENTS_SQL = (Path(__file__).parent / "0002_assignments.sql").read_text()
QUOTAS_SQL = (Path(__file__).parent / "0007_allocation_quotas.sql").read_text()
ARENAS_SQL = (Path(__file__).parent / "0008_match_arena_paths.sql").read_text()
ALLOCATION_ARENAS_SQL = (Path(__file__).parent / "0009_allocation_arena_paths.sql").read_text()
class MigrationTest(unittest.TestCase):
@@ -68,6 +69,10 @@ class MigrationTest(unittest.TestCase):
):
self.assertIn(fragment, ARENAS_SQL)
def test_provider_allocation_retains_arena_identity(self):
self.assertIn("ALTER TABLE allocations", ALLOCATION_ARENAS_SQL)
self.assertIn("ADD COLUMN arena_path TEXT", ALLOCATION_ARENAS_SQL)
if __name__ == "__main__":
unittest.main()