diff options
| author | t <t@tjp.lol> | 2026-08-18 16:37:31 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-08-18 16:37:40 -0600 |
| commit | 94e3fd8358bbdb5d6ed81aed475fab7fc73e2097 (patch) | |
| tree | b028540f25e1818fefe51cb4c05a4c2cd4e5708d /spec/test_progress.lua | |
| parent | cc69a2e431779528578211a5cb3385bb23e076bf (diff) | |
Fix workflow progress pin lifecycle
Diffstat (limited to 'spec/test_progress.lua')
| -rw-r--r-- | spec/test_progress.lua | 26 |
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 = {} } |
