fix: configure codex with a longer timeout

refactor: param names
This commit is contained in:
Fahad
2025-10-21 10:35:44 +04:00
parent 04132f1459
commit d2773f488a
47 changed files with 232 additions and 194 deletions

View File

@@ -36,7 +36,7 @@ class BasicConversationTest(BaseSimulatorTest):
"chat",
{
"prompt": "Please use low thinking mode. Analyze this Python code and explain what it does",
"files": [self.test_files["python"]],
"absolute_file_paths": [self.test_files["python"]],
"model": "flash",
},
)
@@ -53,7 +53,7 @@ class BasicConversationTest(BaseSimulatorTest):
"chat",
{
"prompt": "Please use low thinking mode. Now focus on the Calculator class specifically. Are there any improvements you'd suggest?",
"files": [self.test_files["python"]], # Same file - should be deduplicated
"absolute_file_paths": [self.test_files["python"]], # Same file - should be deduplicated
"continuation_id": continuation_id,
"model": "flash",
},
@@ -69,7 +69,7 @@ class BasicConversationTest(BaseSimulatorTest):
"chat",
{
"prompt": "Please use low thinking mode. Now also analyze this configuration file and see how it might relate to the Python code",
"files": [self.test_files["python"], self.test_files["config"]],
"absolute_file_paths": [self.test_files["python"], self.test_files["config"]],
"continuation_id": continuation_id,
"model": "flash",
},

View File

@@ -159,7 +159,7 @@ class ChatSimpleValidationTest(ConversationBaseTest):
"chat",
{
"prompt": "Please use low thinking mode. Analyze this Python code and tell me what the Calculator class does",
"files": [self.test_files["python"]],
"absolute_file_paths": [self.test_files["python"]],
"model": "flash",
"thinking_mode": "low",
},
@@ -174,7 +174,7 @@ class ChatSimpleValidationTest(ConversationBaseTest):
"chat",
{
"prompt": "Please use low thinking mode. What methods does the Calculator class have?",
"files": [self.test_files["python"]], # Same file
"absolute_file_paths": [self.test_files["python"]], # Same file
"continuation_id": continuation_id,
"model": "flash",
"thinking_mode": "low",
@@ -450,7 +450,7 @@ class ChatSimpleValidationTest(ConversationBaseTest):
"chat",
{
"prompt": "Please use low thinking mode. Here are some files for you to analyze",
"files": [self.test_files["python"], self.test_files["config"]],
"absolute_file_paths": [self.test_files["python"], self.test_files["config"]],
"model": "flash",
"thinking_mode": "low",
},

View File

@@ -253,7 +253,7 @@ class ConfigurationManager:
"findings": "Initial examination reveals a payment processing class with potential security and performance concerns.",
"files_checked": [self.payment_file],
"relevant_files": [self.payment_file],
"files": [self.payment_file], # Required for step 1
"absolute_file_paths": [self.payment_file], # Required for step 1
"review_type": "full",
"severity_filter": "all",
},
@@ -353,7 +353,7 @@ class ConfigurationManager:
"findings": "Initial analysis shows complex configuration class",
"files_checked": [self.config_file],
"relevant_files": [self.config_file],
"files": [self.config_file],
"absolute_file_paths": [self.config_file],
"review_type": "full",
},
)
@@ -445,7 +445,7 @@ class ConfigurationManager:
"findings": "Found multiple security and performance issues",
"files_checked": [self.payment_file],
"relevant_files": [self.payment_file],
"files": [self.payment_file],
"absolute_file_paths": [self.payment_file],
"relevant_context": ["PaymentProcessor.process_payment"],
},
)
@@ -561,7 +561,7 @@ class ConfigurationManager:
"findings": "Complete review identified all critical security issues, performance problems, and code quality concerns. All issues are documented with clear severity levels and specific recommendations.",
"files_checked": [self.payment_file],
"relevant_files": [self.payment_file],
"files": [self.payment_file],
"absolute_file_paths": [self.payment_file],
"relevant_context": ["PaymentProcessor.process_payment"],
"issues_found": [
{"severity": "critical", "description": "Hardcoded API key security vulnerability"},
@@ -662,7 +662,7 @@ def validate_credit_card(card_number):
"findings": "Initial analysis of utility and validation functions",
"files_checked": [utils_file, validator_file],
"relevant_files": [utils_file], # This should be referenced, not embedded
"files": [utils_file, validator_file], # Required for step 1
"absolute_file_paths": [utils_file, validator_file], # Required for step 1
"relevant_context": ["calculate_discount"],
"confidence": "low",
"model": "flash",
@@ -770,7 +770,7 @@ def validate_credit_card(card_number):
"findings": "Initial review of payment processor and configuration management modules",
"files_checked": files_to_review,
"relevant_files": [self.payment_file],
"files": files_to_review,
"absolute_file_paths": files_to_review,
"relevant_context": [],
"confidence": "low",
"review_type": "security",

View File

@@ -56,7 +56,7 @@ class TestConsensusConversation(ConversationBaseTest):
"chat",
{
"prompt": "Please use low thinking mode. I'm working on a web application and need advice on authentication. Can you look at this code?",
"files": [self.test_files["python"]],
"absolute_file_paths": [self.test_files["python"]],
"model": "flash",
},
)

View File

@@ -68,7 +68,7 @@ DATABASE_CONFIG = {
"chat",
{
"prompt": "Analyze this configuration file briefly",
"files": [validation_file],
"absolute_file_paths": [validation_file],
"model": "flash",
},
)
@@ -87,7 +87,7 @@ DATABASE_CONFIG = {
"chat",
{
"prompt": "Continue analyzing this configuration file",
"files": [validation_file], # Same file should be deduplicated
"absolute_file_paths": [validation_file], # Same file should be deduplicated
"continuation_id": thread_id,
"model": "flash",
},

View File

@@ -72,7 +72,7 @@ class TestClass:
"chat",
{
"prompt": "Analyze this test file and explain what it does.",
"files": [test_file_path],
"absolute_file_paths": [test_file_path],
"model": "flash",
"temperature": 0.7,
},

View File

@@ -84,7 +84,7 @@ def hash_pwd(pwd):
self.logger.info(" Step 1: chat tool - Initial codebase exploration")
chat_params = {
"prompt": "List security issues in auth.py",
"files": [auth_file],
"absolute_file_paths": [auth_file],
"thinking_mode": "low",
"model": "flash",
}
@@ -126,7 +126,7 @@ def hash_pwd(pwd):
chat_continue_params = {
"continuation_id": current_continuation_id,
"prompt": "Check config.json too",
"files": [auth_file, config_file_path], # Old + new file
"absolute_file_paths": [auth_file, config_file_path], # Old + new file
"thinking_mode": "low",
"model": "flash",
}

View File

@@ -66,7 +66,7 @@ class CrossToolContinuationTest(ConversationBaseTest):
"chat",
{
"prompt": "Please use low thinking mode. Look at this Python code and tell me what you think about it",
"files": [self.test_files["python"]],
"absolute_file_paths": [self.test_files["python"]],
"model": "flash",
},
)
@@ -198,7 +198,7 @@ class CrossToolContinuationTest(ConversationBaseTest):
"chat",
{
"prompt": "Please use low thinking mode. Analyze both the Python code and configuration file",
"files": [self.test_files["python"], self.test_files["config"]],
"absolute_file_paths": [self.test_files["python"], self.test_files["config"]],
"model": "flash",
},
)

View File

@@ -64,7 +64,7 @@ def validate_data(data):
"chat",
{
"prompt": "Where is tax_rate defined in this file? Please tell me the exact line number.",
"files": [test_file_path],
"absolute_file_paths": [test_file_path],
"model": "flash",
},
)
@@ -85,7 +85,7 @@ def validate_data(data):
"analyze",
{
"prompt": "What happens between lines 7-11 in this code? Focus on the loop logic.",
"files": [test_file_path],
"absolute_file_paths": [test_file_path],
"model": "flash",
},
)
@@ -106,7 +106,7 @@ def validate_data(data):
"refactor",
{
"prompt": "Analyze this code for refactoring opportunities",
"files": [test_file_path],
"absolute_file_paths": [test_file_path],
"refactor_type": "codesmells",
"model": "flash",
},

View File

@@ -105,7 +105,7 @@ if __name__ == "__main__":
response2, _ = self.call_mcp_tool(
"analyze",
{
"files": [ollama_test_file],
"absolute_file_paths": [ollama_test_file],
"prompt": "Analyze this Ollama client code. What does this code do and what are its main functions?",
"model": "llama3.2",
},

View File

@@ -81,7 +81,7 @@ protocol View {
"chat",
{
"prompt": initial_prompt,
"files": [test_file_path],
"absolute_file_paths": [test_file_path],
"model": "flash",
},
)

View File

@@ -178,7 +178,7 @@ if __name__ == "__main__":
"chat",
{
"prompt": "Please analyze this math functions file and explain what it does.",
"files": [file1_path],
"absolute_file_paths": [file1_path],
"model": "flash",
"temperature": 0.7,
},
@@ -248,7 +248,7 @@ if __name__ == "__main__":
"chat",
{
"prompt": "Now compare the math functions with this calculator class. How do they differ in approach?",
"files": [file1_path, file2_path],
"absolute_file_paths": [file1_path, file2_path],
"continuation_id": continuation_id2, # Continue the conversation from step 2
"model": "flash",
"temperature": 0.7,