From 046e9e4ff39289cfb60141b2d26f1f174b1b5b05 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 13:48:53 +0200 Subject: Isolate explicit repeat workflow --- tests/run.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index 945d712..e5ac940 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7819,6 +7819,46 @@ test("Explicit repeat actions execute through the resolved motion path", functio same(2, resolution.invocation.count.value) end) +test("Explicit repeats bypass every primary-only coordinator stage", function() + local _, transitions = fresh_sequence_state() + transitions:BeginAcquisition("n", "F") + transitions:CommitAcquiredTarget("n", target("a"), 5) + transitions:CommitCommandSuccess("n", domain.Position.new(1, 3), false) + local host = MemoryHost.new({ + buffer_lines = { "ababa" }, + cursor = { line = 1, byte_column = 3 }, + fold_open_policy = { "all" }, + closed_fold_levels = 2, + time_values_ms = { 1000 }, + configuration = { + repeat_timeout_ms = 1, + mark_char = true, + highlight_timeout_ms = 20, + }, + emit_movement_events = false, + }) + local coordinator = sequence_coordinator.new({ host = host }) + + local outcome = coordinator:repeat_opposite_direction() + + same(domain.ActionKind.MOVEMENT, outcome.kind) + local operations = host:operations() + local forbidden = { + read_macro_state = true, + read_input = true, + read_time_ms = true, + open_fold = true, + create_highlight = true, + start_timer = true, + } + for _, operation in ipairs(operations) do + falsy(forbidden[operation.operation] == true, operation.operation) + end + same(2, host:read_fold_state().closed_levels) + same(nil, coordinator:last_primary_resolution()) + truthy(coordinator:last_explicit_resolution() ~= nil) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3