From 7566197269a4a1767df1ce4d39f8fad6844ec587 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 14:32:23 +0200 Subject: Expose diagnostic full reset --- tests/run.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'tests/run.lua') diff --git a/tests/run.lua b/tests/run.lua index e00f694..d4535ef 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -8415,6 +8415,32 @@ test("ActionFacade Reset applies public cleanup and returns neutral", function() falsy(host:timers()[timer].active) end) +test("Diagnostic full reset is available only through diagnostic API", function() + local state, transitions = fresh_sequence_state() + transitions:BeginAcquisition("n", "f") + transitions:CommitAcquiredTarget("n", target("a"), 10) + transitions:CommitCommandSuccess( + "n", + domain.Position.new(1, 2), + domain.Direction.FORWARD + ) + local host = MemoryHost.new({ cursor = { line = 1, byte_column = 2 } }) + local root = composition_root.new({ host = host }) + local activation = root:activate() + + same(nil, activation.actions.DiagnosticFullReset) + local outcome = root:diagnostic_full_reset() + same(domain.ActionKind.NEUTRAL, outcome.kind) + same(nil, state:get_previous_descriptor("n")) + same(nil, state:get_previous_target("n")) + same(nil, state.last_input_context) + falsy(state.moved_forward) + falsy(state.moved_forward_initialized) + fails(function() + host:invoke_action("DiagnosticFullReset") + end, "not registered") +end) + test("Same-direction explicit coordination reads current-context state", function() local _, transitions = fresh_sequence_state() local normal_target = target("a") -- cgit v1.2.3