summaryrefslogtreecommitdiff
path: root/spec/test_progress.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/test_progress.lua')
-rw-r--r--spec/test_progress.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/test_progress.lua b/spec/test_progress.lua
index 06509bf..5788998 100644
--- a/spec/test_progress.lua
+++ b/spec/test_progress.lua
@@ -20,6 +20,32 @@ local function plain(lines)
end
return {
+ { "startup replay stays in transcript order while live calls pin", function()
+ progress.reset()
+ progress.begin_replay()
+ local pins = {}
+ local function claim(id)
+ progress.claim({
+ id = id,
+ tool_name = "subagents.workflow",
+ set_component = function()
+ return {
+ alive = function() return true end,
+ invalidate = function() end,
+ set_pinned = function(_, value) pins[#pins + 1] = value end,
+ }
+ end,
+ })
+ end
+ claim("historical")
+ assert(#pins == 0, "replayed workflows must never pin")
+ progress.begin_live_turn()
+ claim("live")
+ assert(pins[1] == true, "a live workflow pins while it runs")
+ progress.reset()
+ assert(pins[2] == false, "reset releases the live workflow")
+ end },
+
{ "concurrent boards pin independently until their matching result", function()
progress.reset()
local pins = { a = {}, b = {} }