create_quest_definition materializes its instances (#235)

This commit was merged in pull request #235.
This commit is contained in:
2026-09-25 07:22:59 -04:00
parent 64a56389ad
commit f23fadb13f
7 changed files with 83 additions and 18 deletions
+4
View File
@@ -468,7 +468,11 @@ async def _materialize_with_change(
proceeds with the snapped presence). This deterministically
exercises the snapshot-to-insert gap that a config edit can
interleave into.
``create_quest_definition`` already materializes its horizon, so the
table is cleared first: the gated walk must be the only writer.
"""
await database.execute("DELETE FROM quest_instances")
original_upsert = QuestInstancesDao.upsert_if_valid
entered = asyncio.Event()
release = asyncio.Event()