Set up pre-commit workflow with Ruff linting and formatting#1
Open
humzakt wants to merge 5 commits intoashutosh-turing:mainfrom
Open
Set up pre-commit workflow with Ruff linting and formatting#1humzakt wants to merge 5 commits intoashutosh-turing:mainfrom
humzakt wants to merge 5 commits intoashutosh-turing:mainfrom
Conversation
- Add comprehensive .pre-commit-config.yaml with Ruff, isort, and file checks - Update pyproject.toml with enhanced Ruff configuration (lint + format) - Run Ruff across all files: fixed 1686+ linting issues automatically - Format codebase with Ruff formatter (24 files reformatted) - Update .gitignore for pre-commit, Ruff cache, and development tools - Install pre-commit hooks in git repository Note: Some non-critical linting warnings remain (49) that can be addressed incrementally. Pre-commit hooks now enforce code quality on all commits.
…el agents, and prompt generation
Fixes:
1. Frontend Refresh Button
- Fixed refresh button not working due to cooldown check
- Added force parameter to loadTasks() to bypass cooldown on manual refresh
- refreshTasks() now forces refresh when user clicks button
2. Changed Files Display
- Added total_files field to track total PR files before filtering
- Frontend now shows 'X/Y files (limited)' format when files are truncated
- Updated PRService to track and return total_files count
- Updated both workers to store total_files in database
- Added database migration for total_files column
- Updated TaskResponse model to include total_files
3. Transcript Artifact Access
- Fixed path validation in artifacts endpoint to include 'agents/' directory
- Changed expected path from storage/{task_id}/{agent}/ to storage/{task_id}/agents/{agent}/
- This matches actual artifact storage structure
4. Parallel Agent Execution
- Updated workers/tasks.py to run agents in parallel using ThreadPoolExecutor
- Each agent now gets its own database session to avoid thread conflicts
- Agents run concurrently instead of sequentially, reducing total execution time
5. Enhanced Prompt Generation
- Fixed issue where prompts were too generic and similar across PRs
- Added file content snippets (first 500 chars) to prompt generation context
- Included branch and commit information for uniqueness
- Enhanced GPT instructions to emphasize PR-specific and unique prompts
- Added PR identifier to system message for variation
- Prompts now reference actual files, branches, and commits from each PR
6. Gemini Agent Event Loop Fix
- Fixed asyncio event loop conflict when called from existing loop
- Added check for running event loop and spawns new thread with new loop if needed
- Prevents 'attached to a different loop' errors
Technical Details:
- Database: Added total_files INTEGER column to tasks table
- API: TaskResponse now includes total_files field
- Frontend: Enhanced file count display with truncation indicator
- Workers: Both simple_worker and tasks.py updated for parallel execution
- Prompts: Enhanced context building with file contents and branch info
…support - Add GitHub API service to fetch PR data without cloning repositories - Fix iFlow agent connection issues with WebSocket server readiness checks - Enhance PR service for GitHub API with fallback to cloning - Improve task retry support for ERROR status tasks - Update prompt service for GitHub API file fetching - Worker improvements for parallel processing and on-demand cloning - Add GitHub API migration documentation
- Fix IFlow agent connection: Add API key environment variables to subprocess - Add repository directory validation before starting IFlow process - Add retry logic with exponential backoff for IFlow SDK connections - Add 2-second delay after port check for WebSocket protocol initialization - Fix bundle download: Use FastAPI BackgroundTasks instead of invalid background parameter - Add null checks for artifacts and safe status field access - Improve error logging with full tracebacks - Add DATA_FLOW.md documentation for complete data flow process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Some non-critical linting warnings remain (49) that can be addressed incrementally. Pre-commit hooks now enforce code quality on all commits.