feat(agent): add learn action flow and grounding guards
This commit is contained in:
@@ -104,11 +104,12 @@ def test_replay_session_pipeline_skips_redundant_tab_switch(tmp_path):
|
||||
|
||||
# 1) Setup auto reconnaît Notepad et génère ses actions
|
||||
assert app_info.get("primary_app") == "Notepad.exe"
|
||||
assert app_info.get("has_neutral_window_title") is True
|
||||
setup_actions = _generate_setup_actions(app_info, setup_id_prefix="setup_sess")
|
||||
assert setup_actions, "le setup auto doit injecter des actions Notepad"
|
||||
action_ids = {a.get("action_id", "") for a in setup_actions}
|
||||
assert any("click_start" in aid for aid in action_ids)
|
||||
assert any("click_result" in aid for aid in action_ids)
|
||||
setup_steps = [a.get("_setup_step", "") for a in setup_actions]
|
||||
assert "open_run_dialog" in setup_steps
|
||||
assert "ensure_fresh_document" in setup_steps
|
||||
|
||||
# 2) Trim : le clic intra-Notepad redondant doit disparaître
|
||||
trimmed = _trim_redundant_setup_events(raw_events, app_info)
|
||||
|
||||
Reference in New Issue
Block a user