ai-testing-swarm 0.1.12__tar.gz → 0.1.13__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 (33) hide show
  1. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/PKG-INFO +1 -1
  2. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/pyproject.toml +1 -1
  3. ai_testing_swarm-0.1.13/src/ai_testing_swarm/__init__.py +1 -0
  4. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/agents/llm_reasoning_agent.py +31 -1
  5. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/agents/release_gate_agent.py +5 -0
  6. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/orchestrator.py +12 -1
  7. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm.egg-info/PKG-INFO +1 -1
  8. ai_testing_swarm-0.1.12/src/ai_testing_swarm/__init__.py +0 -1
  9. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/README.md +0 -0
  10. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/setup.cfg +0 -0
  11. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/agents/__init__.py +0 -0
  12. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/agents/execution_agent.py +0 -0
  13. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/agents/learning_agent.py +0 -0
  14. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/agents/test_planner_agent.py +0 -0
  15. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/agents/test_writer_agent.py +0 -0
  16. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/agents/ui_agent.py +0 -0
  17. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/cli.py +0 -0
  18. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/core/__init__.py +0 -0
  19. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/core/api_client.py +0 -0
  20. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/core/config.py +0 -0
  21. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/core/curl_parser.py +0 -0
  22. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/core/openai_client.py +0 -0
  23. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/core/openapi_loader.py +0 -0
  24. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/core/safety.py +0 -0
  25. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/reporting/__init__.py +0 -0
  26. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm/reporting/report_writer.py +0 -0
  27. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm.egg-info/SOURCES.txt +0 -0
  28. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm.egg-info/dependency_links.txt +0 -0
  29. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm.egg-info/entry_points.txt +0 -0
  30. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/src/ai_testing_swarm.egg-info/top_level.txt +0 -0
  31. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/tests/test_openapi_loader.py +0 -0
  32. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/tests/test_policy_expected_negatives.py +0 -0
  33. {ai_testing_swarm-0.1.12 → ai_testing_swarm-0.1.13}/tests/test_swarm_api.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ai-testing-swarm
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Summary: AI-powered testing swarm
5
5
  Author-email: Arif Shah <ashah7775@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ai-testing-swarm"
7
- version = "0.1.12"
7
+ version = "0.1.13"
8
8
  description = "AI-powered testing swarm"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -0,0 +1 @@
1
+ __version__ = "0.1.13"
@@ -120,7 +120,7 @@ class LLMReasoningAgent:
120
120
  if mutation:
121
121
  strategy = mutation.get("strategy")
122
122
 
123
- # Content negotiation / Accept header negative tests
123
+ # Header tampering / content negotiation tests
124
124
  if status_code == 406 and strategy == "headers":
125
125
  return {
126
126
  "type": "content_negotiation",
@@ -128,6 +128,14 @@ class LLMReasoningAgent:
128
128
  "explanation": "406 Not Acceptable after Accept/header mutation (expected)"
129
129
  }
130
130
 
131
+ # Header tampering accepted (2xx) can be risky depending on the mutation
132
+ if 200 <= status_code < 300 and strategy == "headers":
133
+ return {
134
+ "type": "headers_accepted",
135
+ "confidence": 0.8,
136
+ "explanation": "Header mutation still returned 2xx (review if expected)"
137
+ }
138
+
131
139
  # Wrong-method negative test accepted => risk
132
140
  if 200 <= status_code < 300 and strategy == "method_misuse":
133
141
  return {
@@ -143,6 +151,14 @@ class LLMReasoningAgent:
143
151
  "explanation": "400 response after required parameter removal"
144
152
  }
145
153
 
154
+ # Missing param accepted (2xx) is often weak validation (risky)
155
+ if 200 <= status_code < 300 and strategy == "missing_param":
156
+ return {
157
+ "type": "missing_param_accepted",
158
+ "confidence": 1.0,
159
+ "explanation": "Parameter removal still returned 2xx (potential missing validation)"
160
+ }
161
+
146
162
  if status_code == 400 and strategy == "null_param":
147
163
  return {
148
164
  "type": "missing_param",
@@ -150,6 +166,13 @@ class LLMReasoningAgent:
150
166
  "explanation": "400 response after nullifying parameter"
151
167
  }
152
168
 
169
+ if 200 <= status_code < 300 and strategy == "null_param":
170
+ return {
171
+ "type": "null_param_accepted",
172
+ "confidence": 1.0,
173
+ "explanation": "Nullified parameter still returned 2xx (potential weak validation)"
174
+ }
175
+
153
176
  if status_code == 400 and strategy == "invalid_param":
154
177
  return {
155
178
  "type": "invalid_param",
@@ -157,6 +180,13 @@ class LLMReasoningAgent:
157
180
  "explanation": "400 response after invalid parameter mutation"
158
181
  }
159
182
 
183
+ if 200 <= status_code < 300 and strategy == "invalid_param":
184
+ return {
185
+ "type": "invalid_param_accepted",
186
+ "confidence": 1.0,
187
+ "explanation": "Invalid parameter still returned 2xx (potential weak validation)"
188
+ }
189
+
160
190
  # ✅ FIX: security payload blocked → SAFE
161
191
  if status_code >= 400 and status_code < 500 and strategy == "security":
162
192
  return {
@@ -96,6 +96,11 @@ class ReleaseGateAgent:
96
96
  # ⚠️ Ambiguous behavior (release with caution)
97
97
  RISKY_FAILURES = {
98
98
  "unknown",
99
+ "missing_param_accepted",
100
+ "null_param_accepted",
101
+ "invalid_param_accepted",
102
+ "headers_accepted",
103
+ "method_risk",
99
104
  }
100
105
 
101
106
  # ✅ EXPECTED & HEALTHY system behavior
@@ -19,6 +19,15 @@ EXPECTED_FAILURES = {
19
19
  "content_negotiation",
20
20
  }
21
21
 
22
+ RISKY_FAILURES = {
23
+ "unknown",
24
+ "missing_param_accepted",
25
+ "null_param_accepted",
26
+ "invalid_param_accepted",
27
+ "headers_accepted",
28
+ "method_risk",
29
+ }
30
+
22
31
  class SwarmOrchestrator:
23
32
  """
24
33
  Central brain of the AI Testing Swarm.
@@ -64,7 +73,9 @@ class SwarmOrchestrator:
64
73
  "confidence": classification.get("confidence", 1.0),
65
74
  "failure_type": classification.get("type"),
66
75
  "status": (
67
- "PASSED" if classification.get("type") in EXPECTED_FAILURES else "FAILED"
76
+ "PASSED" if classification.get("type") in EXPECTED_FAILURES
77
+ else "RISK" if classification.get("type") in RISKY_FAILURES
78
+ else "FAILED"
68
79
  ),
69
80
  })
70
81
  # Optional learning step
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ai-testing-swarm
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Summary: AI-powered testing swarm
5
5
  Author-email: Arif Shah <ashah7775@gmail.com>
6
6
  License: MIT
@@ -1 +0,0 @@
1
- __version__ = "0.1.12"