Builtin Library
README.md
world_vcs.worldReady
Counts the times a world's content finishes landing (engine.onWorldReady: boot, world swap, branch checkout), so a call that swaps what the session is bound to waits for the swap to land.
armWorldReadyTicker()subscribes the counter, once for the module's lifetime.ticks()answers the count, which a caller records before it swaps.waitForWorldReady(before, timeoutSeconds)waits until the count moves pastbefore, answering false when the timeout passes first.
local WorldReady = require("modules.world_vcs.worldReady")
WorldReady.armWorldReadyTicker()
local before = WorldReady.ticks()
-- swap the session's branch here
local landed = WorldReady.waitForWorldReady(before, 30)