feat(plugins): add source-aware evidence and recording timelines
This commit is contained in:
1 parent
72ff342605
commit
ef7af9988e
61 files changed
+3847
-108
No files matched your search
@@ -426,6 +426,7 @@ async def run_validation_loop(node, state: State) -> dict:
|
||||
incident: dict | None = None
|
||||
success = False
|
||||
index = 0
|
||||
step_pre_image_valid = True
|
||||
|
||||
while actions_to_execute:
|
||||
action_item = actions_to_execute.pop(0)
|
||||
@@ -450,8 +451,16 @@ async def run_validation_loop(node, state: State) -> dict:
|
||||
post_image_name = None
|
||||
plugin_action = bool(outcome.action_item.get("plugin_id"))
|
||||
mixed_plugin_action = (
|
||||
plugin_action and getattr(ctx, "execution_target", "android") == "mixed"
|
||||
plugin_action and getattr(ctx, "execution_target", "android") != "computer"
|
||||
)
|
||||
if (
|
||||
plugin_action
|
||||
and not mixed_plugin_action
|
||||
and not outcome.action_item.get("pre_image_valid", False)
|
||||
):
|
||||
# The turn began on another window/geometry. Keep that observation
|
||||
# out of the step's before/after evidence pair and archive exports.
|
||||
step_pre_image_valid = False
|
||||
if outcome.post_screenshot_b64 and not mixed_plugin_action:
|
||||
post_image_name = _absorb_post_screenshot(ctx, state, outcome.post_screenshot_b64)
|
||||
last_screenshot_b64 = outcome.post_screenshot_b64
|
||||
@@ -498,6 +507,8 @@ async def run_validation_loop(node, state: State) -> dict:
|
||||
"burst": burst,
|
||||
"incident": incident,
|
||||
}
|
||||
if not step_pre_image_valid:
|
||||
report["pre_image_valid"] = False
|
||||
|
||||
# Determine if a distinct post-action screenshot was captured
|
||||
distinct_post_image_name = (
|
||||
|
||||
Reference in new issue
Block a user