up - #343
Conversation
Signed-off-by: Zachary BENSALEM <zachary@qredence.ai>
Signed-off-by: Zachary BENSALEM <zachary@qredence.ai>
…atterns (#341) * Initial plan * Apply test improvements: refactor hardcoded values and improve test patterns Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> * Fix import order and formatting in test files Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> * Fix code review issues: REPO variable order and async fixture Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> * Fix remaining code review issues: variable name and comment clarity Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> * Update tools/scripts/setup-pypi-environment.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> --------- Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> Co-authored-by: Zachary BENSALEM <zachary@qredence.ai> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Zachary BENSALEM <zachary@qredence.ai>
Signed-off-by: Zachary BENSALEM <zachary@qredence.ai>
Signed-off-by: Zachary BENSALEM <zachary@qredence.ai>
Signed-off-by: Zachary BENSALEM <zachary@qredence.ai>
|
🤖 Hi @Zochory, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
Pull Request Overview
This PR performs cleanup operations by removing unused scripts and configuration files, and improves test code quality through better fixture design and constant extraction.
- Removes obsolete tooling and workflow files (PyPI setup script, Playwright configs, Codex auto-fix workflow)
- Refactors test fixtures to use factory pattern for better flexibility
- Extracts magic strings into named constants for improved maintainability
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tools/scripts/setup-pypi-environment.sh |
Deleted obsolete PyPI environment setup script |
tests/validate_test_improvements.py |
Updated comment to provide clearer guidance on handling import errors |
tests/test_workflow_factory.py |
Extracted validation logic into helper function, improved readability by replacing body with pass in skipped tests |
tests/test_persistence.py |
Converted fixture to factory pattern for customizable settings, improved summarization test assertions, replaced hardcoded model name with generic test value |
tests/test_error_handling.py |
Extracted magic strings into module-level constants, removed redundant assertion |
playwright.service.config.ts |
Deleted Azure Playwright service configuration file |
playwright.config.ts |
Deleted Playwright configuration file |
.github/workflows/codex-autofix.yml |
Removed Codex auto-fix workflow |
| from agentic_fleet.api.app import create_app | ||
|
|
||
| # Use shared constants for model names used in tests | ||
| MODEL_NAME = "agentic_fleet" |
There was a problem hiding this comment.
The constant MODEL_NAME is set to "agentic_fleet", but based on the codebase, the actual valid workflow/entity ID is "magentic_fleet" (note: "magentic" not "agentic"). This will cause all tests using MODEL_NAME to fail with entity_not_found errors since the entity doesn't exist. Change to MODEL_NAME = "magentic_fleet".
| MODEL_NAME = "agentic_fleet" | |
| MODEL_NAME = "magentic_fleet" |
| summary_messages = [ | ||
| m for m in history if m["role"] == "system" and "summarized" in m["content"].lower() | ||
| m | ||
| for m in history | ||
| if m["role"] == "system" | ||
| and ( | ||
| m.get("type") == "summary" | ||
| or m.get("is_summary") is True | ||
| or m["content"].lower().startswith("summary:") | ||
| ) | ||
| ] |
There was a problem hiding this comment.
The multi-condition check for summary messages combines three different possible field indicators (type, is_summary, content prefix), suggesting uncertainty about the actual schema. This makes the test fragile—if the implementation uses only one field consistently, the other checks are noise; if it varies, there's an underlying consistency issue. Either document which field(s) are canonical in a comment, or refactor to check only the fields actually used by ConversationPersistenceService.
* up (#343) * Delete .github/workflows/codex-autofix.yml Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Delete src/agentic_fleet/ui/assets directory Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Refactor tests: Replace hardcoded values with constants and improve patterns (#341) * Initial plan * Apply test improvements: refactor hardcoded values and improve test patterns Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> * Fix import order and formatting in test files Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> * Fix code review issues: REPO variable order and async fixture Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> * Fix remaining code review issues: variable name and comment clarity Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> * Update tools/scripts/setup-pypi-environment.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> --------- Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> Co-authored-by: Zachary BENSALEM <zachary@qredence.ai> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Delete tools/scripts/setup-pypi-environment.sh Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Delete playwright.config.ts Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Delete playwright.service.config.ts Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Delete test_sse_performance.py Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> --------- Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * clean-1 * clean-2 * refactor: optimize code structure and improve readability in test files * Refactor code structure for improved readability and maintainability * Optimization (#346) * refactor: optimize code structure and improve readability in test files * Refactor code structure for improved readability and maintainability * refactor: remove obsolete workflow API and related components * Refactor code structure for improved readability and maintainability * Update src/agentic_fleet/api/app.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * fix: remove unused variable and useless try/catch in chatStore (#347) * Initial plan * fix: remove unused variable and useless try/catch in chatStore Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> --------- Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> * Refactor code structure and improve workflow configuration (#348) * refactor: optimize code structure and improve readability in test files * Refactor code structure for improved readability and maintainability * refactor: remove obsolete workflow API and related components * Refactor code structure for improved readability and maintainability * Update src/agentic_fleet/api/app.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * feat: add fast path model configuration and improve logging in workflow routes --------- Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Refactor code structure for improved readability and maintainability * Remove unnecessary future annotations from prompt templates * Refactor agent modules to remove unnecessary future annotations and streamline imports * Remove unnecessary future annotations from model files * Remove obsolete test files to streamline the test suite and improve maintainability * Remove implementation status and testing specification documents as part of project restructuring * Remove unused REDIS_URL variable from environment configuration * Refactor SSE handling in chat module and add SSE parser utility * Refactor: Remove unnecessary future annotations and clean up imports - Removed `from __future__ import annotations` from multiple files where it was not needed. - Updated health check package version requirements to use minimum versions. - Replaced `pkg_resources` with `importlib.metadata` for package version checks. - Cleaned up Redis integration code, marking it as removed and providing clear runtime errors for legacy imports. - Simplified various repository and service classes by using string annotations for type hints. - Removed backward compatibility stubs in workflow events. - Adjusted logging and error handling for improved clarity and maintainability. * Refactor: Remove obsolete model files to streamline codebase * Refactor: Remove persistence layer files to streamline codebase * Refactor: Remove health check module to streamline codebase * Refactor: Remove approvals and conversations modules to streamline codebase * Remove deprecated API components and exception handling - Deleted the centralized exception handling module to streamline error management. - Removed API models and response schemas related to the Responses API. - Eliminated workflow management routes and services to simplify the workflow handling process. - Cleaned up health check endpoints and their associated logic. - Removed unused routers and service files to enhance code maintainability. * Refactor: Remove workflow-related modules to streamline codebase * Remove deprecated utility modules and workflow configuration files - Deleted `factory.py`, `logging.py`, `logging_sanitize.py`, `message_classifier.py`, `performance.py`, `redis_cache.py`, `telemetry.py` from utils as they are no longer needed. - Removed `workflows.schema.json` and `workflows.yaml` files, which contained the packaged default multi-workflow configuration. * remove old plan * Remove outdated documentation files: persistence-guide.md, prompt-kit-integration.md, and responsive-design-implementation.md * Delete src/agentic_fleet directory Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * clean * feat: Major refactor - reorganize into src/agentic_fleet package structure - Moved all core code into src/agentic_fleet/ package - Created modular CLI with command-based structure in cli/commands/ - Added DSPy workflow integration with supervisor, signatures, and compilation - Implemented quality assessment, progress tracking, and handoff management - Added FastAPI REST API in api/app.py - Created comprehensive evaluation framework with metrics - Added tool registry system for dynamic tool discovery - Implemented async compilation and caching utilities - Added telemetry, tracing, and logging infrastructure - Created self-improvement and history analysis scripts - Updated all agents to use base agent class - Reorganized workflows into execution, routing, quality, and fleet modules - Added type definitions and configuration schema - Created browser and Tavily search tool integrations - Added comprehensive examples and evaluation tasks * Refactor code structure and remove redundant code blocks for improved readability and maintainability * Update Jupyter notebooks to reflect environment changes and code formatting improvements - Set execution_count to null for initial code cells in `agent_as_workflow.ipynb` and `azure_responses_client.ipynb` - Adjusted import statements to ensure proper line endings in `agent_as_workflow.ipynb` and `azure_responses_client.ipynb` - Updated kernel display name and version to ".venv (3.13.9)" in `agent_as_workflow.ipynb`, `azure_responses_client.ipynb`, `magentic_fleet.ipynb`, and `openai_responses_example.ipynb` - Changed header formatting from "##" to "#" in `magentic_fleet.ipynb` for consistency * fix: Correct prompt template descriptions and add future annotations for type hints * refactor: Remove unused future annotations from prompt templates * Add comprehensive tests for routing helpers and supervisor workflow - Introduced tests for routing helper functions including normalization and edge case detection. - Added enhanced tests for the supervisor workflow, covering fallback mechanisms, task handling, and agent execution. - Implemented integration tests for tool registry population and capabilities inference during workflow initialization. - Created comprehensive tests for supervisor workflow streaming, validation, and task management. - Ensured proper handling of agent failures and task validation scenarios. * Fix security and type safety issues from PR #349 automated review (#351) * Initial plan * Fix security issue and code quality issues from PR #349 review - Remove API key from log message in tavily_mcp_tool.py (security fix) - Add missing TYPE_CHECKING imports in workflows/__init__.py - Add missing TYPE_CHECKING import in workflows/fleet/__init__.py - Fix incorrect parameter names in builder.py (id -> executor_id) Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> * Potential fix for pull request finding 'Wrong name for an argument in a class instantiation' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Potential fix for pull request finding 'Wrong number of arguments in a class instantiation' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Potential fix for pull request finding 'Wrong number of arguments in a class instantiation' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Potential fix for pull request finding 'Wrong number of arguments in a class instantiation' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Remove Gemini workflows and enhance CLI functionality - Deleted the following GitHub Actions workflows: - .github/workflows/gemini-review.yml - .github/workflows/gemini-scheduled-triage.yml - .github/workflows/gemini-triage.yml - Added a new option to the run command in the CLI to optimize for latency with the `--fast` flag. - Adjusted the workflow initialization in the WorkflowRunner class to ensure consistent configuration usage. - Improved confidence display in routing history by handling non-numeric values gracefully. - Updated the title display for completed messages from agents to ensure clarity in agent identification. * Implement feature X to enhance user experience and optimize performance * Refactor create_supervisor_workflow to accept optional config parameter for enhanced flexibility * Potential fix for pull request finding 'Wrong number of arguments in a class instantiation' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Enhance CLI and workflows with new features and optimizations, including fast mode for latency, backward compatibility for console imports, and improved agent normalization in DSPySupervisor. * Potential fix for pull request finding 'Explicit export is not defined' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Fix inconsistent project naming in documentation (#352) * Initial plan * Fix inconsistent project naming in documentation Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Zochory <60674042+Zochory@users.noreply.github.com> Co-authored-by: Zachary BENSALEM <zachary@qredence.ai> * Potential fix for pull request finding 'Wrong number of arguments in a class instantiation' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Potential fix for pull request finding 'Wrong number of arguments in a class instantiation' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Potential fix for pull request finding 'Wrong number of arguments in a class instantiation' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> * Potential fix for pull request finding 'Wrong number of arguments in a class instantiation' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> --------- Signed-off-by: Zachary BENSALEM <zachary@qredence.ai> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
This pull request removes several files related to Playwright and Codex auto-fix CI workflows, as well as a Python SSE performance test script. It also refactors the test suite to improve maintainability and test isolation, particularly in error handling and persistence tests.
CI and test infrastructure cleanup:
.github/workflows/codex-autofix.yml, removing the Codex-based auto-fix workflow that attempted to automatically fix CI failures using OpenAI Codex.playwright.config.tsandplaywright.service.config.ts, eliminating browser-based end-to-end test setup and Azure-specific Playwright service configuration. [1] [2]Test suite improvements:
tests/test_error_handling.pyto use shared constants for model names, reducing duplication and improving clarity. [1] [2] [3] [4] [5] [6] [7]tests/test_persistence.pyto use a factory fixture for creating the persistence service, enabling customizable settings and better test isolation. All test cases now instantiate the service via the factory. [1] [2] [3] [4] [5] [6] [7]Test script removal:
test_sse_performance.py, removing a standalone script for testing SSE streaming performance and correlation tracking.## Description