Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
{
"provenance": {
"kind": "branch_local_witness",
"source": "captured_repair_then_completed_run.json cut after its second run",
"notes": "The capture's first two runs verbatim, both runtime block failures of one code block over changed code, with no later run. The latest run is the failing one, so the hand-back is a failed result. Each failed run's outcome lists its failed block in failed_block_labels, as the recorder sets it."
},
"reported_workflow_yaml": null,
"steps": [
{
"workflow_yaml": "title: Retrieve deferred freight quote total\nworkflow_definition:\n parameters: []\n blocks:\n - block_type: code\n label: calculate_and_extract_quote_total\n prompt: Open quote QF-4821, calculate its shipping-inclusive order total, and return the page-displayed total as a number.\n code: |\n await page.goto(\"http://localhost:8900/deferred_total_quote/\")\n quote_heading = page.get_by_text(\"Quote QF-4821\", exact=True)\n await quote_heading.wait_for(state=\"visible\", timeout=10000)\n total_panel = page.locator(\"div.totals\")\n await total_panel.wait_for(state=\"visible\", timeout=10000)\n await page.locator(\"#calculate-total\").click()\n await total_panel.locator(\"strong\").wait_for(state=\"visible\", timeout=10000)\n total_text = (await total_panel.locator(\"strong\").inner_text()).strip()\n normalized_total = total_text.replace(\"$\", \"\").replace(\",\", \"\").strip()\n order_total = float(normalized_total)\n return {\n \"quote_id\": \"QF-4821\",\n \"order_total\": order_total,\n \"displayed_total\": total_text,\n \"evidence_text\": (await total_panel.inner_text()).strip()\n }\n",
"staged_workflow_yaml": null,
"outcome": {
"phase": "persisted_block_run",
"attempted_tool": "update_and_run_blocks",
"attempted_block_label": "calculate_and_extract_quote_total",
"attempted_call_ref": "locator:div.totals",
"verdict": "repairable_failure",
"reason_code": "runtime_block_failure",
"workflow_run_id": "wr_569288173990568574",
"block_labels": [
"calculate_and_extract_quote_total"
],
"executed_block_labels": [
"calculate_and_extract_quote_total"
],
"structural_failure_identity": "code-block-exception:wr_569288173990568574",
"failed_block_labels": [
"calculate_and_extract_quote_total"
]
}
},
{
"workflow_yaml": "title: Retrieve deferred freight quote total\nworkflow_definition:\n parameters: []\n blocks:\n - block_type: code\n label: calculate_and_extract_quote_total\n prompt: Open quote QF-4821, calculate its shipping-inclusive order total, and return the page-displayed total as a number.\n code: |\n await page.goto(\"http://localhost:8900/deferred_total_quote/\")\n quote_heading = page.get_by_text(\"Quote QF-4821\", exact=True)\n await quote_heading.wait_for(state=\"visible\", timeout=10000)\n total_panel = page.locator(\"div.totals\")\n await total_panel.wait_for(state=\"visible\", timeout=10000)\n await page.locator(\"#calculate-total\").click()\n page_total = page.locator(\"#order-total\")\n await page_total.wait_for(state=\"visible\", timeout=10000)\n total_text = (await page_total.inner_text()).strip()\n normalized_total = total_text.replace(\"$\", \"\").replace(\",\", \"\").strip()\n order_total = float(normalized_total)\n return {\n \"quote_id\": \"QF-4821\",\n \"order_total\": order_total,\n \"displayed_total\": total_text,\n \"evidence_text\": (await total_panel.inner_text()).strip()\n }\n",
"staged_workflow_yaml": null,
"outcome": {
"phase": "persisted_block_run",
"attempted_tool": "update_and_run_blocks",
"attempted_block_label": "calculate_and_extract_quote_total",
"attempted_call_ref": "",
"verdict": "repairable_failure",
"reason_code": "runtime_block_failure",
"workflow_run_id": "wr_569288324314423984",
"block_labels": [
"calculate_and_extract_quote_total"
],
"executed_block_labels": [
"calculate_and_extract_quote_total"
],
"structural_failure_identity": "code-block-exception:wr_569288324314423984",
"failed_block_labels": [
"calculate_and_extract_quote_total"
]
}
}
],
"expect": {
"handback_ok": false,
"latest_verdict": "repairable_failure",
"prior_attempt_change_identity": {
"prior_workflow_run_id": "wr_569288173990568574",
"block_label": "calculate_and_extract_quote_total",
"changed": true,
"basis": "code_hash"
},
"history": [
{
"workflow_run_id": "wr_569288173990568574",
"verdict": "repairable_failure",
"reason_code": "runtime_block_failure",
"attempted_block_label": "calculate_and_extract_quote_total",
"attempted_block_signature": "d38636478712129a960e18a8e4c82d7e3cfcf05453fbc16372a4a4a906b58c31",
"attempted_block_code_hash": "0cddef90804f1492ba867612cf5db2d2751f7b53422a11638ab90f4ae0a6e766",
"executed_yaml_digests": {
"calculate_and_extract_quote_total": "5e7d6569e3d0c81b"
}
},
{
"workflow_run_id": "wr_569288324314423984",
"verdict": "repairable_failure",
"reason_code": "runtime_block_failure",
"attempted_block_label": "calculate_and_extract_quote_total",
"attempted_block_signature": "9598018020211662cee43dafac0b5a66bceaf36c968740898be09ec17f43ca1d",
"attempted_block_code_hash": "dde73d60cffd3459fd03230d669e8443112c8f3fdf0d4a312d9f8634fa90a4c8",
"executed_yaml_digests": {
"calculate_and_extract_quote_total": "ccca57d6e4e3dc93"
}
}
]
}
}