Commit graph

2 commits

Author SHA1 Message Date
tanzhenxin
66259aca29 feat: add git branch support for worktree creation
Add optional branch configuration to specify which git branch to use
for worktree creation.

Features:
- New branch config option to specify base branch (e.g., main, develop)
- Each worktree creates a unique branch based on the specified branch
  (format: branch-run-id)
- If branch is not specified, uses the repository default branch
- Falls back gracefully when branch already exists

Changes:
- Add branch field to RunConfig dataclass
- Update GitWorktreeManager.create() to accept branch parameter
- Create unique branches for each worktree to avoid conflicts
- Update load_config() to parse branch from config
- Update config.example.json with branch option
- Update README.md documentation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 12:36:23 +08:00
tanzhenxin
4ac3df1b63 feat: add concurrent runner for batch CLI execution
Add a Python-based concurrent runner that executes multiple Qwen CLI tasks
across different models in parallel using isolated git worktrees.

Features:
- Execute N tasks × M models concurrently with configurable concurrency
- Create isolated git worktrees for each run under ~/.qwen/worktrees
- Real-time progress display with Rich library
- Capture stdout, stderr, and OpenAI API logs per run
- Atomic JSON tracking of all runs with status and metadata
- Automatic cleanup of worktrees after each run

Structure:
- runner.py: Main implementation with asyncio
- requirements.txt: Python dependencies
- README.md: Documentation and usage
- config.example.json: Configuration template
- examples/: Toy example with sample config and project

Usage:
  python runner.py config.json

Each run creates an isolated output directory:
  outputs/{run_id}/
    ├── stdout.txt
    ├── stderr.txt
    └── logs/openai-*.json

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 12:08:56 +08:00