diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:49:15 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:49:15 +0200 |
| commit | cd8b1dae826390bebf5a4566f69008246d705c7c (patch) | |
| tree | 7d1f814a0c9cd341e42bca06f24a32869768efc0 /tests/run.lua | |
| parent | 19904ba49a03a450e8a573358eb3417a3aafdb1f (diff) | |
Sample eager marker policy
Diffstat (limited to 'tests/run.lua')
| -rw-r--r-- | tests/run.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index 7947ab1..4290460 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -6929,6 +6929,32 @@ test("Activation installs eager hooks from sampled setup policy", function() same(0, map_size(disabled_host:event_registrations())) end) +test("Every eager event samples live character-marker policy", function() + fresh_sequence_state() + local host = MemoryHost.new({ + configuration = { + clean_labels_eagerly = true, + mark_char = false, + }, + }) + local feedback = feedback_service.new(host) + feedback:activate() + + for _, event_name in ipairs(feedback_service.EAGER_EVENTS) do + host:set_configuration("mark_char", false) + host:deliver_event(event_name, { window = "window-1" }) + local disabled = feedback:last_eager_decision() + same(event_name, disabled.event) + falsy(disabled.mark_char) + + host:set_configuration("mark_char", true) + host:deliver_event(event_name, { window = "window-1" }) + local enabled = feedback:last_eager_decision() + same(event_name, enabled.event) + truthy(enabled.mark_char) + end +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
