fusiontest 0.2.45__tar.gz → 0.2.46__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fusiontest-0.2.45 → fusiontest-0.2.46}/PKG-INFO +1 -1
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/agent/verify.py +5 -1
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/suites/shop-hard.yaml +5 -1
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/action_model.py +13 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/goal_verifier.py +4 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest.egg-info/PKG-INFO +1 -1
- {fusiontest-0.2.45 → fusiontest-0.2.46}/pyproject.toml +1 -1
- {fusiontest-0.2.45 → fusiontest-0.2.46}/README.md +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/agent/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/agent/mcp_server.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/sites/shop/bugs.js +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/sites/shop/help.html +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/sites/shop/index.html +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/suites/diffs/order-retry.diff +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/suites/diffs/sale-banner.diff +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/suites/diffs/stock-check.diff +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/suites/shop-bugs.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/suites/shop-intent.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/suites/shop.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/bench/suites/todomvc.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/cli.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/app_errors.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/bugs.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/netguard.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/promise_checker.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/replay.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/reproduce.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/runner.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/screen_parser.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/secrets.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/shared_traces.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/core/tokens.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/demos/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/demos/fusiontest_dashboard.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/demos/github.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/demos/hacker_news.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/demos/httpbin.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/demos/todomvc.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/demos/wikipedia.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/desktop/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/desktop/macos_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/desktop/playwright_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/desktop/windows_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/discovery/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/discovery/goal_generator.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/discovery/intent.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/guardrails/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/guardrails/engine.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/mobile/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/mobile/android_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/mobile/ios_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/reporting/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/reporting/reporter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/training/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/training/data_collector.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/training/dataset_builder.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest/training/trainer.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest.egg-info/SOURCES.txt +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest.egg-info/dependency_links.txt +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest.egg-info/entry_points.txt +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest.egg-info/not-zip-safe +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest.egg-info/requires.txt +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/fusiontest.egg-info/top_level.txt +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.46}/setup.cfg +0 -0
|
@@ -316,7 +316,11 @@ def read_change(diff_path: str | None = None, git_range: str | None = None,
|
|
|
316
316
|
except FileNotFoundError as exc:
|
|
317
317
|
raise RuntimeError("git isn't installed: pass the change as a diff") from exc
|
|
318
318
|
if done.returncode != 0:
|
|
319
|
-
|
|
319
|
+
if "not a git repository" in done.stderr.lower():
|
|
320
|
+
raise RuntimeError(f"{Path(cwd or '.').resolve()} isn't a git repository: run from "
|
|
321
|
+
"your project, or pass the change as a diff file or goals")
|
|
322
|
+
first = (done.stderr.strip().splitlines() or ["no output"])[0]
|
|
323
|
+
raise RuntimeError(f"`{' '.join(args)}` failed: {first[:200]}")
|
|
320
324
|
if not done.stdout.strip():
|
|
321
325
|
raise RuntimeError(f"`{' '.join(args)}` is empty: nothing changed to verify "
|
|
322
326
|
"(give a git range for committed changes, or goals to check)")
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Cases run in order and share browser state. `expect: fail` cases are goals
|
|
5
5
|
# that are NOT satisfied on the page; a model that "passes" them is a false pass.
|
|
6
6
|
name: shop-hard
|
|
7
|
-
version:
|
|
7
|
+
version: 2 # v2: a verify-only goal the agent could make true by adding an item
|
|
8
8
|
description: Near-miss values, decoys, an image-only banner and a delayed answer on Acme Shop
|
|
9
9
|
platform: playwright
|
|
10
10
|
site: shop
|
|
@@ -31,6 +31,10 @@ cases:
|
|
|
31
31
|
expect: fail
|
|
32
32
|
- goal: "Verify the cart total is $27.00"
|
|
33
33
|
expect: pass
|
|
34
|
+
# The cart holds 2 items. Adding Notebook would make this true; a verify-only
|
|
35
|
+
# goal must look, not change the page (found in the 0.2.45 smoke test).
|
|
36
|
+
- goal: "Verify the cart link shows 'Cart (3)'"
|
|
37
|
+
expect: fail
|
|
34
38
|
# SPRING24 is refused as expired: claiming it applied is a false pass.
|
|
35
39
|
- goal: "Apply coupon SPRING24 and verify the coupon was applied"
|
|
36
40
|
expect: fail
|
|
@@ -304,6 +304,15 @@ _BARE_LIST_ITEM_RE = re.compile(r'^\s*\[\d+\] list_item\s*$')
|
|
|
304
304
|
# Rules that only apply when the screen has such elements.
|
|
305
305
|
_HAS_TEXT_FIELD_RE = re.compile(r'^\s*\[\d+\] (text_field|text_area|search_field|textbox|searchbox|spinbutton)\b', re.M)
|
|
306
306
|
_HAS_PICKER_RE = re.compile(r'^\s*\[\d+\] picker\b| options: ', re.M)
|
|
307
|
+
# A goal that only asks to check a state ("Verify the footer shows '1 item
|
|
308
|
+
# left'"), not to do something first. "Check" alone isn't enough: "Check the
|
|
309
|
+
# terms box" and "Check stock for Notebook" are actions.
|
|
310
|
+
_VERIFY_ONLY_RE = re.compile(
|
|
311
|
+
r"^\s*(verify|confirm|ensure|assert|make sure|check (that|whether|if))\b", re.I)
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
def is_verify_only(goal: str) -> bool:
|
|
315
|
+
return bool(_VERIFY_ONLY_RE.match(goal))
|
|
307
316
|
|
|
308
317
|
|
|
309
318
|
def compact_screen_for_action(screen_text: str) -> str:
|
|
@@ -1135,6 +1144,10 @@ class ActionModel(LLMCaller):
|
|
|
1135
1144
|
"- If the screen, or the notes on your earlier actions (→ …), already show what the goal asks for, use 'done' and say what you saw. Don't repeat actions to check again.",
|
|
1136
1145
|
"- On the wrong page? Get to the right one first (links, menus, 'back'). Use 'fail' only when the goal can't be achieved at all (control missing, blocked) — never 'done' for that.",
|
|
1137
1146
|
"- Match elements by meaning, not exact wording, and use the one that's listed.",
|
|
1147
|
+
*(["- This goal asks you to check something, not to make it true. Look; you may navigate, "
|
|
1148
|
+
"scroll or open what the goal names to see it, but don't add, type, toggle, delete or "
|
|
1149
|
+
"submit anything the goal doesn't ask for. If it isn't so, use 'fail'."]
|
|
1150
|
+
if is_verify_only(goal) else []),
|
|
1138
1151
|
"- Use 'back' to go back. Scroll only if nothing listed matches, and at most twice per goal.",
|
|
1139
1152
|
*(["- 'type' replaces a field's content (value \"\" clears it). To submit a field without a "
|
|
1140
1153
|
"button, then 'press' Enter on it ('press' also takes Escape, Tab, ArrowDown, ArrowUp)."]
|
|
@@ -70,6 +70,10 @@ class GoalVerifier:
|
|
|
70
70
|
"show (images, banners, colours, layout, overlapping or hidden elements). Where the "
|
|
71
71
|
"screenshot and the screen text disagree about what a piece of text says, trust the "
|
|
72
72
|
"text.\n\n"
|
|
73
|
+
"A goal that only asks to verify a state (\"Verify the footer shows '1 item left'\") "
|
|
74
|
+
"is NOT achieved if the ACTIONS TAKEN created that state themselves: adding, typing, "
|
|
75
|
+
"toggling, deleting or submitting something the goal didn't ask for. Navigating or "
|
|
76
|
+
"scrolling to see it is fine.\n\n"
|
|
73
77
|
"If APP ERRORS are listed, the app failed while the goal ran (an uncaught exception, "
|
|
74
78
|
"a server error, a broken link). The goal is not achieved if such an error stopped "
|
|
75
79
|
"the result the goal asks for from happening.\n\n"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|