diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:38:06 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 13:38:06 +0200 |
| commit | b3cf7ada375183a24f238a3a377b7de2c5671e92 (patch) | |
| tree | 6ed1dcce6899ba1c49626fc32f4213db78145a54 /tests | |
| parent | a402497b8a75289ebd8b92c4641509ec4c30a020 (diff) | |
Evaluate primary repeat timeout
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index 7caeb6c..089f6dc 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7311,6 +7311,33 @@ test("Fresh primary resolution reuses acquired plans and marks empty motion", fu truthy(resolution.skip_destination) end) +test("Repeated primary coordination evaluates timeout before reuse", function() + local _, transitions = fresh_sequence_state() + local landing = domain.Position.new(1, 3) + transitions:BeginAcquisition("n", "f") + transitions:CommitAcquiredTarget("n", target("a"), 100) + transitions:CommitCommandSuccess("n", landing, true) + local host = MemoryHost.new({ + buffer_lines = { "aba" }, + cursor = landing, + time_values_ms = { 150 }, + configuration = { repeat_timeout_ms = 75 }, + }) + + local resolution = sequence_coordinator.new({ host = host }):primary("f") + + same("repeat", resolution.kind) + same(repeat_resolver.Decision.REPEAT, resolution.timeout.decision) + same(50, resolution.timeout.elapsed_ms) + local time_read + for index, operation in ipairs(host:operations()) do + if operation.operation == "read_time_ms" then + time_read = index + end + end + truthy(time_read ~= nil) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
