ai-testing-swarm 0.1.11__py3-none-any.whl → 0.1.12__py3-none-any.whl

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.
@@ -1 +1 @@
1
- __version__ = "0.1.11"
1
+ __version__ = "0.1.12"
@@ -73,13 +73,33 @@ class LLMReasoningAgent:
73
73
  # =========================================================
74
74
  # 3️⃣ HTTP-LEVEL HARD RULES (NO AI)
75
75
  # =========================================================
76
+ # Method misuse tests: 404/405 are expected (endpoint not available for that method)
77
+ if status_code in (404, 405):
78
+ if (
79
+ isinstance(test_name, str)
80
+ and test_name.startswith("wrong_method_")
81
+ ) or (mutation and mutation.get("strategy") == "method_misuse"):
82
+ return {
83
+ "type": "method_not_allowed" if status_code == 405 else "not_found",
84
+ "confidence": 1.0,
85
+ "explanation": f"HTTP {status_code} for wrong-method negative test (expected)"
86
+ }
87
+
76
88
  if status_code == 405:
89
+ # 405 outside method-misuse tests can still be informative
77
90
  return {
78
91
  "type": "method_not_allowed",
79
92
  "confidence": 1.0,
80
93
  "explanation": "HTTP 405 Method Not Allowed"
81
94
  }
82
95
 
96
+ if status_code == 404:
97
+ return {
98
+ "type": "not_found",
99
+ "confidence": 0.9,
100
+ "explanation": "HTTP 404 Not Found"
101
+ }
102
+
83
103
  if status_code in (401, 403):
84
104
  return {
85
105
  "type": "auth_issue",
@@ -100,6 +120,22 @@ class LLMReasoningAgent:
100
120
  if mutation:
101
121
  strategy = mutation.get("strategy")
102
122
 
123
+ # Content negotiation / Accept header negative tests
124
+ if status_code == 406 and strategy == "headers":
125
+ return {
126
+ "type": "content_negotiation",
127
+ "confidence": 1.0,
128
+ "explanation": "406 Not Acceptable after Accept/header mutation (expected)"
129
+ }
130
+
131
+ # Wrong-method negative test accepted => risk
132
+ if 200 <= status_code < 300 and strategy == "method_misuse":
133
+ return {
134
+ "type": "method_risk",
135
+ "confidence": 1.0,
136
+ "explanation": "Wrong HTTP method was accepted with 2xx (unexpected)"
137
+ }
138
+
103
139
  if status_code == 400 and strategy == "missing_param":
104
140
  return {
105
141
  "type": "missing_param",
@@ -90,7 +90,7 @@ class ReleaseGateAgent:
90
90
  "infra", # infra / network / 5xx
91
91
  "security_risk", # malicious payload succeeded (2xx/3xx)
92
92
  "server_error",
93
- "method_not_allowed",
93
+ # NOTE: method_not_allowed is expected for negative tests (wrong method)
94
94
  }
95
95
 
96
96
  # ⚠️ Ambiguous behavior (release with caution)
@@ -104,6 +104,9 @@ class ReleaseGateAgent:
104
104
  "missing_param",
105
105
  "invalid_param",
106
106
  "security", # 🔥 IMPORTANT: security blocked = SAFE
107
+ "method_not_allowed",
108
+ "not_found",
109
+ "content_negotiation",
107
110
  }
108
111
 
109
112
  def decide(self, results: list) -> str:
@@ -14,6 +14,9 @@ EXPECTED_FAILURES = {
14
14
  "missing_param",
15
15
  "invalid_param",
16
16
  "security",
17
+ "method_not_allowed",
18
+ "not_found",
19
+ "content_negotiation",
17
20
  }
18
21
 
19
22
  class SwarmOrchestrator:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ai-testing-swarm
3
- Version: 0.1.11
3
+ Version: 0.1.12
4
4
  Summary: AI-powered testing swarm
5
5
  Author-email: Arif Shah <ashah7775@gmail.com>
6
6
  License: MIT
@@ -1,11 +1,11 @@
1
- ai_testing_swarm/__init__.py,sha256=nllDrH0jyChMuuYrK0CC55iTBKUNTUjejtcwxyUF2EQ,23
1
+ ai_testing_swarm/__init__.py,sha256=LcIlFjHZFfiF9Rd4UHoakmombOFkxIYk00I181frGBM,23
2
2
  ai_testing_swarm/cli.py,sha256=o7JVbC5wNBFxAW9Ox8688JKA78RbY9eBdhUiWJvtgc0,4628
3
- ai_testing_swarm/orchestrator.py,sha256=UBdVBSQ9we2rf5A-fCMplwMtIH57RfbSmDoEQ_9IKb0,4576
3
+ ai_testing_swarm/orchestrator.py,sha256=tu24eGls9rY5Sj-bQsJHHFCjxItUMzs7XVZtNIhjaCM,4646
4
4
  ai_testing_swarm/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  ai_testing_swarm/agents/execution_agent.py,sha256=C4femMQLw8CPxxmaqinEcmweeDBAzkAOI3Df6CZOSIQ,6678
6
6
  ai_testing_swarm/agents/learning_agent.py,sha256=lHqikc8A8s2-Yln_qCm8hCxB9KTqVrTcNvFp20_QQU0,777
7
- ai_testing_swarm/agents/llm_reasoning_agent.py,sha256=ESuli7edRW73RVewQBriSFCLsp_I476xdZA6hE2QqH4,5538
8
- ai_testing_swarm/agents/release_gate_agent.py,sha256=SSSuRYWtYs06VYkovyiMp3W3wNraAHY3840xUTU5ums,5605
7
+ ai_testing_swarm/agents/llm_reasoning_agent.py,sha256=KXAgahS57gjRMH-SRsOLfb-GqDPCAmygmyuknVT5feI,7100
8
+ ai_testing_swarm/agents/release_gate_agent.py,sha256=TZNr_Ka6_6vE-fiYckzNnqbygzxWlp3GgsenyC7pS_w,5738
9
9
  ai_testing_swarm/agents/test_planner_agent.py,sha256=mCCa67F2ilsPJG_msIwft4TLRySiKoklEhZyc17RFR0,13762
10
10
  ai_testing_swarm/agents/test_writer_agent.py,sha256=tOCeUv01cl3t4vD8N8oXqVpxUFSE42agky5R9Dn2WVE,691
11
11
  ai_testing_swarm/agents/ui_agent.py,sha256=sNCTFbDIxkU8woKGoCHlUi83IRJCJrbxvkTYcSrB0EY,781
@@ -18,8 +18,8 @@ ai_testing_swarm/core/openapi_loader.py,sha256=lZ1Y7lyyEL4Y90pc-naZQbCyNGndr4Gmm
18
18
  ai_testing_swarm/core/safety.py,sha256=MvOMr7pKFAn0z37pBcE8X8dOqPK-juxhypCZQ4YcriI,825
19
19
  ai_testing_swarm/reporting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  ai_testing_swarm/reporting/report_writer.py,sha256=LvqKbhg3RUhEH_mWKgJQS0OmH6atdMvba9BQvqPcMZY,4227
21
- ai_testing_swarm-0.1.11.dist-info/METADATA,sha256=akdzh1_PlmpxWriO3wAT-DF7FWkzQ_brrqo9_AtQIVQ,4919
22
- ai_testing_swarm-0.1.11.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
23
- ai_testing_swarm-0.1.11.dist-info/entry_points.txt,sha256=vbW-IBcVcls5I-NA3xFUZxH4Ktevt7lA4w9P4Me0yXo,54
24
- ai_testing_swarm-0.1.11.dist-info/top_level.txt,sha256=OSqbej3vG04SKqgEcgzDTMn8QzpVsxwOzpSG7quhWJw,17
25
- ai_testing_swarm-0.1.11.dist-info/RECORD,,
21
+ ai_testing_swarm-0.1.12.dist-info/METADATA,sha256=Z71U58inbaG-UFrkitRSAUqj_dApLVGaCsBqRh4uQGU,4919
22
+ ai_testing_swarm-0.1.12.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
23
+ ai_testing_swarm-0.1.12.dist-info/entry_points.txt,sha256=vbW-IBcVcls5I-NA3xFUZxH4Ktevt7lA4w9P4Me0yXo,54
24
+ ai_testing_swarm-0.1.12.dist-info/top_level.txt,sha256=OSqbej3vG04SKqgEcgzDTMn8QzpVsxwOzpSG7quhWJw,17
25
+ ai_testing_swarm-0.1.12.dist-info/RECORD,,