T-021: Add multi-execution support to exec command #125
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.
🚀 T-021: Multi-execution (exec --all/--indexes/--until-success) + JSONL Summary
This PR implements comprehensive multi-execution support for the
execcommand, enabling users to execute multiple candidate commands from a plan in a single invocation with structured logging and flexible execution control.✨ New Features
Multi-execution Flags
--all: Execute all candidate commands in their original order--indexes "N,M-P": Execute specific commands by indices/ranges (comma-separated)--until-success: Stop after the first command that exits with code 0--summary FILE.json: Write final execution summary to JSON fileJSONL Streaming Output
Command Selection Logic
--indexes>--all> single--index🔧 Implementation Details
Enhanced CLI Interface
ExecConfigwith new multi-execution fieldsJSONL Output Schema
{"type": "run", "index": 0, "cmd": "pytest", "start_ts": "2025-09-13T12:00:00Z", "end_ts": "2025-09-13T12:00:05Z", "exit_code": 1, "duration_ms": 5000} {"type": "summary", "schema_version": 1, "tool": "autorepro", "runs": 2, "successes": 1, "first_success_index": 1}Execution Pipeline
🧪 Testing & Quality
Comprehensive Test Suite
Manual Testing
exec --all/--indexes/--until-success) + JSONL Summary #111 validated📚 Documentation
Updated README.md
CLI Help Text
🔄 Backward Compatibility
🎯 Acceptance Criteria Met
--allexecutes all candidate commands in original order--until-successstops immediately after first successful command--indexesaccepts single indices and ranges with proper validation--summarywrites JSON file matching final JSONL summary line--jsonl)🔗 Related Issues
fix #111
📊 Files Changed
autorepro/cli.py: Core multi-execution implementationtests/test_exec_multi.py: Comprehensive test suite (new)README.md: Updated documentation🚀 Ready for Review
This implementation is production-ready with comprehensive testing, documentation, and maintains full backward compatibility. All linting checks pass and the code follows project standards.