fusiontest 0.2.45__tar.gz → 0.2.47__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.
Files changed (74) hide show
  1. {fusiontest-0.2.45 → fusiontest-0.2.47}/PKG-INFO +1 -1
  2. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/agent/verify.py +5 -1
  3. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/__init__.py +7 -1
  4. fusiontest-0.2.47/fusiontest/bench/security.py +647 -0
  5. fusiontest-0.2.47/fusiontest/bench/suites/billing-security.yaml +104 -0
  6. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/shop-hard.yaml +5 -1
  7. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/cli.py +243 -4
  8. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/action_model.py +13 -0
  9. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/goal_verifier.py +4 -0
  10. fusiontest-0.2.47/fusiontest/security/__init__.py +11 -0
  11. fusiontest-0.2.47/fusiontest/security/checks.py +1034 -0
  12. fusiontest-0.2.47/fusiontest/security/config.py +117 -0
  13. fusiontest-0.2.47/fusiontest/security/engine.py +86 -0
  14. fusiontest-0.2.47/fusiontest/security/findings.py +93 -0
  15. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/PKG-INFO +1 -1
  16. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/SOURCES.txt +7 -0
  17. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/entry_points.txt +3 -0
  18. {fusiontest-0.2.45 → fusiontest-0.2.47}/pyproject.toml +4 -1
  19. {fusiontest-0.2.45 → fusiontest-0.2.47}/README.md +0 -0
  20. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/__init__.py +0 -0
  21. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/agent/__init__.py +0 -0
  22. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/agent/mcp_server.py +0 -0
  23. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/sites/shop/bugs.js +0 -0
  24. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/sites/shop/help.html +0 -0
  25. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/sites/shop/index.html +0 -0
  26. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/diffs/order-retry.diff +0 -0
  27. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/diffs/sale-banner.diff +0 -0
  28. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/diffs/stock-check.diff +0 -0
  29. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/shop-bugs.yaml +0 -0
  30. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/shop-intent.yaml +0 -0
  31. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/shop.yaml +0 -0
  32. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/todomvc.yaml +0 -0
  33. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/__init__.py +0 -0
  34. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/app_errors.py +0 -0
  35. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/bugs.py +0 -0
  36. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/netguard.py +0 -0
  37. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/promise_checker.py +0 -0
  38. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/replay.py +0 -0
  39. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/reproduce.py +0 -0
  40. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/runner.py +0 -0
  41. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/screen_parser.py +0 -0
  42. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/secrets.py +0 -0
  43. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/shared_traces.py +0 -0
  44. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/tokens.py +0 -0
  45. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/__init__.py +0 -0
  46. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/fusiontest_dashboard.yaml +0 -0
  47. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/github.yaml +0 -0
  48. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/hacker_news.yaml +0 -0
  49. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/httpbin.yaml +0 -0
  50. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/todomvc.yaml +0 -0
  51. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/wikipedia.yaml +0 -0
  52. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/desktop/__init__.py +0 -0
  53. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/desktop/macos_adapter.py +0 -0
  54. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/desktop/playwright_adapter.py +0 -0
  55. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/desktop/windows_adapter.py +0 -0
  56. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/discovery/__init__.py +0 -0
  57. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/discovery/goal_generator.py +0 -0
  58. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/discovery/intent.py +0 -0
  59. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/guardrails/__init__.py +0 -0
  60. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/guardrails/engine.py +0 -0
  61. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/mobile/__init__.py +0 -0
  62. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/mobile/android_adapter.py +0 -0
  63. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/mobile/ios_adapter.py +0 -0
  64. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/reporting/__init__.py +0 -0
  65. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/reporting/reporter.py +0 -0
  66. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/training/__init__.py +0 -0
  67. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/training/data_collector.py +0 -0
  68. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/training/dataset_builder.py +0 -0
  69. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/training/trainer.py +0 -0
  70. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/dependency_links.txt +0 -0
  71. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/not-zip-safe +0 -0
  72. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/requires.txt +0 -0
  73. {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/top_level.txt +0 -0
  74. {fusiontest-0.2.45 → fusiontest-0.2.47}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fusiontest
3
- Version: 0.2.45
3
+ Version: 0.2.47
4
4
  Summary: AI-powered UI testing for mobile and desktop — by FusionLeap.io
5
5
  Author-email: FusionLeap <hello@fusionleap.io>
6
6
  License: MIT
@@ -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
- raise RuntimeError(f"`{' '.join(args)}` failed: {done.stderr.strip()[:300]}")
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)")
@@ -26,6 +26,9 @@ what was planted:
26
26
  Bug suites can also list decoys: behaviour that looks broken but is correct
27
27
  and explained on screen. A report about a decoy is a false report, counted as
28
28
  a decoy trip.
29
+
30
+ A *security suite* (`kind: security`, ADR-011) measures Security checks the
31
+ same way, on a multi-user fixture app; see fusiontest/bench/security.py.
29
32
  """
30
33
 
31
34
  from __future__ import annotations
@@ -42,6 +45,7 @@ from pathlib import Path
42
45
 
43
46
  import yaml
44
47
 
48
+ from fusiontest.bench.security import SecuritySuite, load_security_suite
45
49
  from fusiontest.core.runner import FusionTestRunner, RunnerConfig, RunResult, StepResult
46
50
 
47
51
  EXPECTATIONS = ("pass", "fail")
@@ -136,7 +140,7 @@ def builtin_suites() -> list[str]:
136
140
  if p.name.endswith(".yaml"))
137
141
 
138
142
 
139
- def load_suite(name_or_path: str) -> Suite | BugSuite | IntentSuite:
143
+ def load_suite(name_or_path: str) -> Suite | BugSuite | IntentSuite | SecuritySuite:
140
144
  """A built-in suite by name, or a suite YAML file by path."""
141
145
  path = Path(name_or_path)
142
146
  if path.suffix in (".yaml", ".yml") and path.exists():
@@ -153,6 +157,8 @@ def load_suite(name_or_path: str) -> Suite | BugSuite | IntentSuite:
153
157
  return _load_bug_suite(data, name_or_path)
154
158
  if data.get("kind") == "intent":
155
159
  return _load_intent_suite(data, name_or_path, base)
160
+ if data.get("kind") == "security":
161
+ return load_security_suite(data, name_or_path)
156
162
  cases = []
157
163
  for i, raw in enumerate(data.get("cases") or [], 1):
158
164
  expect = str(raw.get("expect", "")).lower()