-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Task
Create the main entry point function generate_commit_message_parallel in src/multi_step_integration.rs that coordinates the two-phase parallel processing approach.
Requirements
- Accept OpenAI client reference, model string, diff content, and optional max message length
- Return Result with final commit message
- Call corrected
parse_difffunction to extract individual files - Construct vector of futures for parallel file analysis
- Use
join_allfrom futures crate to execute analyses concurrently - Graceful error handling:
- Log warnings for failed individual analyses
- Continue with successful results
- Only fail if no analyses succeed
- Format successful results into readable enumeration
- Construct synthesis prompt with file summaries
- Send synthesis request as simple completion (no function calling)
- Extract and return final commit message
- Instrument with
profile!macro for performance measurement
Success Criteria
- Demonstrates measurable performance improvements:
- Single file: ~4 seconds (down from 4.58s)
- Five files: ~4.3 seconds (vs ~16s sequential)
- Resilient to individual file analysis failures
- Works correctly for commits ranging from 1 to dozens of files
Part of #81
Metadata
Metadata
Assignees
Labels
No labels