fusiontest 0.2.32__tar.gz → 0.2.34__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.32 → fusiontest-0.2.34}/PKG-INFO +1 -1
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/bench/sites/shop/index.html +2 -2
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/bench/suites/shop-bugs.yaml +3 -3
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/action_model.py +4 -36
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/promise_checker.py +43 -7
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/runner.py +16 -2
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest.egg-info/PKG-INFO +1 -1
- {fusiontest-0.2.32 → fusiontest-0.2.34}/pyproject.toml +1 -1
- {fusiontest-0.2.32 → fusiontest-0.2.34}/README.md +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/bench/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/bench/sites/shop/bugs.js +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/bench/sites/shop/help.html +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/bench/suites/shop.yaml +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/bench/suites/todomvc.yaml +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/cli.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/app_errors.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/bugs.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/goal_verifier.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/netguard.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/replay.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/reproduce.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/screen_parser.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/secrets.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/shared_traces.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/core/tokens.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/demos/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/demos/fusiontest_dashboard.yaml +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/demos/github.yaml +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/demos/hacker_news.yaml +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/demos/httpbin.yaml +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/demos/todomvc.yaml +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/demos/wikipedia.yaml +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/desktop/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/desktop/macos_adapter.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/desktop/playwright_adapter.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/desktop/windows_adapter.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/discovery/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/discovery/goal_generator.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/guardrails/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/guardrails/engine.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/mobile/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/mobile/android_adapter.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/mobile/ios_adapter.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/reporting/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/reporting/reporter.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/training/__init__.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/training/data_collector.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/training/dataset_builder.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest/training/trainer.py +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest.egg-info/SOURCES.txt +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest.egg-info/dependency_links.txt +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest.egg-info/entry_points.txt +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest.egg-info/not-zip-safe +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest.egg-info/requires.txt +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/fusiontest.egg-info/top_level.txt +0 -0
- {fusiontest-0.2.32 → fusiontest-0.2.34}/setup.cfg +0 -0
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
$("cart-discount").textContent = cartCount() && state.coupon
|
|
201
201
|
? `Discount (${state.coupon}): -${money(discount())}` : "";
|
|
202
202
|
$("cart-shipping").textContent = cartCount() && state.freeShipping
|
|
203
|
-
? "
|
|
203
|
+
? "FREESHIP: Express shipping is free. Choose Express at checkout." : "";
|
|
204
204
|
$("cart-total").textContent = cartCount() ? `Total: ${money(cartTotal())}` : "";
|
|
205
205
|
$("fee-note").textContent = cartCount() ? `A ${money(SERVICE_FEE)} service fee is added at checkout.` : "";
|
|
206
206
|
$("express-option").textContent = state.freeShipping
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
}
|
|
258
258
|
if (coupon.freeShipping) {
|
|
259
259
|
state.freeShipping = true;
|
|
260
|
-
$("coupon-status").textContent = `Coupon ${code} applied:
|
|
260
|
+
$("coupon-status").textContent = `Coupon ${code} applied: choose Express at checkout and it's free`;
|
|
261
261
|
} else {
|
|
262
262
|
if (!PLANTED.has("coupon-noop")) state.coupon = code;
|
|
263
263
|
$("coupon-status").textContent = `Coupon ${code} applied: ${coupon.percent * 100}% off`;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
# as a decoy trip, so we can see which decoys fool the bug finder.
|
|
22
22
|
name: shop-bugs
|
|
23
23
|
kind: bugs
|
|
24
|
-
version:
|
|
24
|
+
version: 4 # v4: FREESHIP decoy says "choose Express at checkout" (it read as automatic); v3: keywords; v2: decoys
|
|
25
25
|
description: Bug finding on Acme Shop variants with planted defects (ADR-009)
|
|
26
26
|
platform: playwright
|
|
27
27
|
site: shop
|
|
@@ -47,7 +47,7 @@ bugs:
|
|
|
47
47
|
total-wrong:
|
|
48
48
|
kind: inconsistency
|
|
49
49
|
description: "The cart total leaves out the last line item"
|
|
50
|
-
match: [subtotal, "10% of", does not equal, doesn't equal, add up]
|
|
50
|
+
match: [subtotal, "10% of", does not equal, doesn't equal, add up, does not match, doesn't match, sum of]
|
|
51
51
|
remove-noop:
|
|
52
52
|
kind: broken_promise
|
|
53
53
|
description: "Remove in the cart does nothing"
|
|
@@ -73,7 +73,7 @@ decoys:
|
|
|
73
73
|
description: "SPRING24 is refused with 'Coupon SPRING24 expired on 31 May'"
|
|
74
74
|
match: [spring24, expired]
|
|
75
75
|
freeship-coupon:
|
|
76
|
-
description: "FREESHIP leaves the cart total unchanged; it makes Express
|
|
76
|
+
description: "FREESHIP leaves the cart total unchanged; it makes Express free if you choose it at checkout, and says so"
|
|
77
77
|
match: [freeship, free shipping, free express]
|
|
78
78
|
service-fee:
|
|
79
79
|
description: "The order total is $1.50 more than the cart total: 'A $1.50 service fee is added at checkout'"
|
|
@@ -162,9 +162,6 @@ _cooldowns_lock = threading.Lock()
|
|
|
162
162
|
_RATE_LIMIT_COOLDOWN_SECONDS = 60.0 # when the provider gives no retry hint
|
|
163
163
|
_BACKEND_ERROR_COOLDOWN_SECONDS = 300.0 # retired model / rejected key
|
|
164
164
|
_MAX_COOLDOWN_SECONDS = 3600.0
|
|
165
|
-
# When every backend is cooling down, wait this long at most for one to recover
|
|
166
|
-
# (a per-minute token limit resets within a minute) rather than fail the call.
|
|
167
|
-
_MAX_COOLDOWN_WAIT_SECONDS = 30.0
|
|
168
165
|
|
|
169
166
|
_RETRY_IN_RE = re.compile(
|
|
170
167
|
r"try again in\s+(?:(?P<h>\d+)h)?(?:(?P<m>\d+)m(?!s))?(?:(?P<s>[\d.]+)s)?(?:(?P<ms>[\d.]+)ms)?",
|
|
@@ -278,12 +275,6 @@ LLM_MAX_OUTPUT_TOKENS = 1024
|
|
|
278
275
|
# chain retries or falls through to the next backend.
|
|
279
276
|
LLM_REQUEST_TIMEOUT_SECONDS = 120
|
|
280
277
|
|
|
281
|
-
# SDK-level retries are off: the OpenAI/Anthropic SDKs otherwise retry a 429
|
|
282
|
-
# twice, sleeping out its retry-after inside the call (measured: 28–45s per
|
|
283
|
-
# Groq call on an 8k tokens/minute tier), so the fallback chain never sees the
|
|
284
|
-
# rate limit and can't switch backend. LLMCaller does its own retries.
|
|
285
|
-
LLM_SDK_MAX_RETRIES = 0
|
|
286
|
-
|
|
287
278
|
|
|
288
279
|
# Page text the action model sees per step (ADR-007 cost work). It needs every
|
|
289
280
|
# clickable element but only the gist of the page — the verifier, which judges
|
|
@@ -577,8 +568,7 @@ class LLMCaller:
|
|
|
577
568
|
"OPENAI_API_KEY is not set. Add it to your .env file or run: "
|
|
578
569
|
"export OPENAI_API_KEY=sk-..."
|
|
579
570
|
)
|
|
580
|
-
client = OpenAI(api_key=api_key, timeout=LLM_REQUEST_TIMEOUT_SECONDS
|
|
581
|
-
max_retries=LLM_SDK_MAX_RETRIES)
|
|
571
|
+
client = OpenAI(api_key=api_key, timeout=LLM_REQUEST_TIMEOUT_SECONDS)
|
|
582
572
|
|
|
583
573
|
elif backend == "claude":
|
|
584
574
|
try:
|
|
@@ -591,8 +581,7 @@ class LLMCaller:
|
|
|
591
581
|
"ANTHROPIC_API_KEY is not set. Add it to your .env file or run: "
|
|
592
582
|
"export ANTHROPIC_API_KEY=sk-ant-..."
|
|
593
583
|
)
|
|
594
|
-
client = anthropic.Anthropic(api_key=api_key, timeout=LLM_REQUEST_TIMEOUT_SECONDS
|
|
595
|
-
max_retries=LLM_SDK_MAX_RETRIES)
|
|
584
|
+
client = anthropic.Anthropic(api_key=api_key, timeout=LLM_REQUEST_TIMEOUT_SECONDS)
|
|
596
585
|
|
|
597
586
|
elif backend == "ollama":
|
|
598
587
|
try:
|
|
@@ -602,8 +591,7 @@ class LLMCaller:
|
|
|
602
591
|
"Ollama backend requires the openai SDK: pip install openai"
|
|
603
592
|
) from err
|
|
604
593
|
base_url = os.getenv("OLLAMA_HOST", "http://localhost:11434") + "/v1"
|
|
605
|
-
client = OpenAI(base_url=base_url, api_key="ollama", timeout=LLM_REQUEST_TIMEOUT_SECONDS
|
|
606
|
-
max_retries=LLM_SDK_MAX_RETRIES)
|
|
594
|
+
client = OpenAI(base_url=base_url, api_key="ollama", timeout=LLM_REQUEST_TIMEOUT_SECONDS)
|
|
607
595
|
|
|
608
596
|
elif backend == "groq":
|
|
609
597
|
try:
|
|
@@ -617,7 +605,7 @@ class LLMCaller:
|
|
|
617
605
|
"then: export GROQ_API_KEY=gsk_..."
|
|
618
606
|
)
|
|
619
607
|
client = OpenAI(base_url="https://api.groq.com/openai/v1", api_key=api_key,
|
|
620
|
-
timeout=LLM_REQUEST_TIMEOUT_SECONDS
|
|
608
|
+
timeout=LLM_REQUEST_TIMEOUT_SECONDS)
|
|
621
609
|
|
|
622
610
|
elif backend == "gemini":
|
|
623
611
|
try:
|
|
@@ -666,28 +654,8 @@ class LLMCaller:
|
|
|
666
654
|
fall through without a cooldown — smaller requests still fit.
|
|
667
655
|
- On other non-transient errors (bad request): raise immediately.
|
|
668
656
|
|
|
669
|
-
When no entry could answer but one comes off a short cooldown soon (a
|
|
670
|
-
per-minute token limit, typically), waits for it once and tries again.
|
|
671
|
-
|
|
672
657
|
Raises LLMUnavailableError when no entry could answer.
|
|
673
658
|
"""
|
|
674
|
-
try:
|
|
675
|
-
return self._call_chain(prompt, request)
|
|
676
|
-
except LLMUnavailableError:
|
|
677
|
-
wait = self._soonest_cooldown()
|
|
678
|
-
if not 0 < wait <= _MAX_COOLDOWN_WAIT_SECONDS:
|
|
679
|
-
raise
|
|
680
|
-
logger.warning("All LLM backends rate-limited — waiting %.0fs for the first to recover.", wait)
|
|
681
|
-
time.sleep(wait)
|
|
682
|
-
return self._call_chain(prompt, request)
|
|
683
|
-
|
|
684
|
-
def _soonest_cooldown(self) -> float:
|
|
685
|
-
"""Seconds until the first cooling-down entry in the chain is usable again."""
|
|
686
|
-
waits = [_cooldown_remaining(b, m) for b, m in self.fallback_chain if not _key_rejected(b)]
|
|
687
|
-
return min(waits, default=0.0)
|
|
688
|
-
|
|
689
|
-
def _call_chain(self, prompt: str, request: LLMRequest) -> tuple[str, TokenUsage]:
|
|
690
|
-
"""One pass over the fallback chain (see _call_llm)."""
|
|
691
659
|
if not self.fallback_chain:
|
|
692
660
|
raise RuntimeError("LLM fallback chain is empty")
|
|
693
661
|
|
|
@@ -90,6 +90,7 @@ _REVIEW_SYSTEM = (
|
|
|
90
90
|
"control or text, what was expected, what the screen shows instead\", \"expected\": "
|
|
91
91
|
"\"what should have happened\", \"actual\": \"what the screen shows instead\", "
|
|
92
92
|
"\"evidence\": [\"short phrases copied EXACTLY from the screen text\"]}]}. "
|
|
93
|
+
"Use step 0 for an inconsistency already on the STARTING SCREEN. "
|
|
93
94
|
"Use {\"findings\": []} when there are none — that is the usual answer."
|
|
94
95
|
)
|
|
95
96
|
_REVIEW = LLMRequest(
|
|
@@ -140,10 +141,29 @@ def _normalize(text: str) -> str:
|
|
|
140
141
|
return re.sub(r"\s+", " ", text).strip().lower()
|
|
141
142
|
|
|
142
143
|
|
|
144
|
+
NO_CHANGE = "(no visible change)"
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def _bare(text: str) -> str:
|
|
148
|
+
"""Normalized, without quote marks: for comparing quotes across " and '."""
|
|
149
|
+
return _normalize(text).replace('"', "").replace("'", "")
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def screen_quotes(evidence: list[str], transition: Transition) -> list[str]:
|
|
153
|
+
"""The quotes that count as evidence: everything except quotes of the review
|
|
154
|
+
prompt's own words ("no visible change", the step's action description)
|
|
155
|
+
that aren't on the screens. A quote on the screens always counts, even if
|
|
156
|
+
the action description mentions it too ("Notebook × 1 $8.50")."""
|
|
157
|
+
screens = _normalize(transition.before + "\n" + transition.after)
|
|
158
|
+
own = _bare(f"{NO_CHANGE} {transition.action}")
|
|
159
|
+
return [q for q in evidence if q and q.strip()
|
|
160
|
+
and (_normalize(q) in screens or _bare(q).strip("() ") not in own)]
|
|
161
|
+
|
|
162
|
+
|
|
143
163
|
def evidence_on_screen(evidence: list[str], transition: Transition) -> bool:
|
|
144
|
-
"""True when there is evidence and every quote is on that step's screens."""
|
|
164
|
+
"""True when there is evidence and every quote that counts is on that step's screens."""
|
|
145
165
|
screens = _normalize(transition.before + "\n" + transition.after)
|
|
146
|
-
quotes = [_normalize(q) for q in evidence
|
|
166
|
+
quotes = [_normalize(q) for q in screen_quotes(evidence, transition)]
|
|
147
167
|
return bool(quotes) and all(q in screens for q in quotes)
|
|
148
168
|
|
|
149
169
|
|
|
@@ -192,8 +212,10 @@ class PromiseChecker:
|
|
|
192
212
|
confirmed = []
|
|
193
213
|
for finding in candidates:
|
|
194
214
|
decision = ReviewDecision("rejected", finding.summary, kind=finding.kind, action=finding.action)
|
|
215
|
+
transition = (_starting_screen(transitions[0]) if finding.step == 0
|
|
216
|
+
else transitions[finding.step - 1])
|
|
195
217
|
try:
|
|
196
|
-
ok, confidence = self._confirm(finding,
|
|
218
|
+
ok, confidence = self._confirm(finding, transition)
|
|
197
219
|
decision.confidence, decision.reason = confidence, finding.confirmation
|
|
198
220
|
if ok:
|
|
199
221
|
decision.outcome = "confirmed"
|
|
@@ -220,13 +242,16 @@ class PromiseChecker:
|
|
|
220
242
|
step = int(item.get("step", 0))
|
|
221
243
|
except (TypeError, ValueError):
|
|
222
244
|
step = 0
|
|
223
|
-
|
|
245
|
+
# Step 0 is the starting screen: something already wrong on arrival.
|
|
246
|
+
# Only an inconsistency can be: a broken promise needs an action.
|
|
247
|
+
lowest = 0 if kind == "inconsistency" else 1
|
|
248
|
+
if kind not in KINDS or not summary or not lowest <= step <= len(transitions):
|
|
224
249
|
logger.info("Promise check: dropped malformed finding %r", item)
|
|
225
250
|
self.last_decisions.append(ReviewDecision(
|
|
226
251
|
"malformed", summary or str(item)[:200], kind=kind,
|
|
227
252
|
reason=f"kind {kind!r}, step {step} of {len(transitions)}"))
|
|
228
253
|
continue
|
|
229
|
-
transition = transitions[step - 1]
|
|
254
|
+
transition = _starting_screen(transitions[0]) if step == 0 else transitions[step - 1]
|
|
230
255
|
if not evidence_on_screen(evidence, transition):
|
|
231
256
|
logger.info("Promise check: dropped finding, evidence not on screen: %s", summary)
|
|
232
257
|
self.last_decisions.append(ReviewDecision(
|
|
@@ -234,7 +259,8 @@ class PromiseChecker:
|
|
|
234
259
|
reason=f"quotes not on that step's screens: {json.dumps(evidence)[:200]}"))
|
|
235
260
|
continue
|
|
236
261
|
findings.append(Finding(kind=kind, summary=summary, step=step, action=transition.action,
|
|
237
|
-
page=_page(transition.before),
|
|
262
|
+
page=_page(transition.before),
|
|
263
|
+
evidence=screen_quotes(evidence, transition),
|
|
238
264
|
at=transition.at,
|
|
239
265
|
expected=str(item.get("expected", "")).strip(),
|
|
240
266
|
actual=str(item.get("actual", "")).strip()))
|
|
@@ -274,11 +300,21 @@ class PromiseChecker:
|
|
|
274
300
|
return ok, confidence
|
|
275
301
|
|
|
276
302
|
|
|
303
|
+
STARTING_SCREEN_ACTION = "arriving on this screen"
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
def _starting_screen(first: Transition) -> Transition:
|
|
307
|
+
"""Step 0: the goal's starting screen, as a transition with no action. Its
|
|
308
|
+
log position is just before the goal's first action."""
|
|
309
|
+
return Transition(action=STARTING_SCREEN_ACTION, before=first.before, after=first.before,
|
|
310
|
+
at=max(first.at - 1, 0))
|
|
311
|
+
|
|
312
|
+
|
|
277
313
|
def _review_prompt(goal: str, transitions: list[Transition]) -> str:
|
|
278
314
|
parts = [f"TEST GOAL: {goal}", "", "STARTING SCREEN:", transitions[0].before[:_MAX_SCREEN_CHARS], ""]
|
|
279
315
|
for i, t in enumerate(transitions, 1):
|
|
280
316
|
diff = screen_diff(t.before, t.after)
|
|
281
|
-
parts += [f"STEP {i}: {t.action}", diff or
|
|
317
|
+
parts += [f"STEP {i}: {t.action}", diff or NO_CHANGE, ""]
|
|
282
318
|
text = "\n".join(parts)
|
|
283
319
|
if len(text) > _MAX_LOG_CHARS:
|
|
284
320
|
text = text[:_MAX_LOG_CHARS] + "\n…(log truncated)"
|
|
@@ -24,7 +24,12 @@ from fusiontest.core.action_model import Action, ActionBackend, ActionModel, LLM
|
|
|
24
24
|
from fusiontest.core.app_errors import AppError
|
|
25
25
|
from fusiontest.core.bugs import Bug, step_text
|
|
26
26
|
from fusiontest.core.goal_verifier import GoalVerifier, VerifierResult
|
|
27
|
-
from fusiontest.core.promise_checker import
|
|
27
|
+
from fusiontest.core.promise_checker import (
|
|
28
|
+
STARTING_SCREEN_ACTION,
|
|
29
|
+
Finding,
|
|
30
|
+
PromiseChecker,
|
|
31
|
+
Transition,
|
|
32
|
+
)
|
|
28
33
|
from fusiontest.core.replay import (
|
|
29
34
|
GoalTrace,
|
|
30
35
|
RecordedAction,
|
|
@@ -915,7 +920,7 @@ class FusionTestRunner:
|
|
|
915
920
|
# link that "didn't open the Help page") is the same bug said twice.
|
|
916
921
|
errored_actions = {e.after for e in step.app_errors}
|
|
917
922
|
found += [BugCandidate(bug=bug_at(bugs.from_finding, f, f.at),
|
|
918
|
-
signature=(f
|
|
923
|
+
signature=_finding_signature(f), at=f.at, evidence=list(f.evidence))
|
|
919
924
|
for f in step.findings if f.action not in errored_actions]
|
|
920
925
|
for candidate in found:
|
|
921
926
|
logger.info(" Suspected bug: %s", candidate.report)
|
|
@@ -1218,6 +1223,15 @@ _PLACEHOLDER_HINT = (
|
|
|
1218
1223
|
)
|
|
1219
1224
|
|
|
1220
1225
|
|
|
1226
|
+
def _finding_signature(finding: Finding) -> tuple[str, str]:
|
|
1227
|
+
"""Findings with the same signature are one bug. Something wrong on a goal's
|
|
1228
|
+
starting screen is usually still there when the next goal starts on the
|
|
1229
|
+
same page: report it once per page, however it's worded."""
|
|
1230
|
+
if finding.action == STARTING_SCREEN_ACTION:
|
|
1231
|
+
return f"{finding.kind}@start", finding.page
|
|
1232
|
+
return finding.kind, finding.summary.lower()
|
|
1233
|
+
|
|
1234
|
+
|
|
1221
1235
|
def _with_row(text: str, action: Action, elements: list[UIElement]) -> str:
|
|
1222
1236
|
"""Add the row context of the action's element to str(action):
|
|
1223
1237
|
'tap on "Remove"' -> 'tap on "Remove" near "Notebook × 1 $8.50"'."""
|
|
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
|