mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-07 17:31:04 +00:00
Break down overly complex functions into smaller, single-purpose helpers: discovery.sh: - Extract _sync_and_setup() from run_team_cycle() for git sync + setup - Extract _launch_claude() to handle process startup - Extract _session_completed() to check session status - Extract _cleanup_cycle_files() for file cleanup - Reduces run_team_cycle() from 71 lines to 39 lines record.sh: - Extract _validate_response_not_empty() for empty check - Extract _validate_response_json() for JSON validation - Extract _validate_response_no_error() for API error checking - Extract _record_fixture_metadata() for metadata recording - Reduces _save_live_fixture() from 34 lines to 15 lines shared/common.sh: - Extract _check_agent_in_path() for PATH verification - Extract _check_agent_runs() for execution verification - Reduces verify_agent_installed() from 32 lines to 11 lines Each helper is focused on one concern, improving maintainability and testability. Co-authored-by: spawn-refactor-bot <refactor@openrouter.ai> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| fixtures | ||
| mock-curl-script.sh | ||
| mock.sh | ||
| qa-dry-run.sh | ||
| record.sh | ||
| run.sh | ||
| update-readme.py | ||