spawn/test
A c6d42e6f07
refactor: reduce complexity in discovery.sh, record.sh, and common.sh (#1123)
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>
2026-02-14 15:44:05 -05:00
..
fixtures test: add missing API assertion fixtures and body validation for 8 cloud providers (#1107) 2026-02-14 11:46:49 -05:00
mock-curl-script.sh refactor: reduce complexity in test/mock.sh by extracting embedded script (#1112) 2026-02-14 12:43:59 -05:00
mock.sh refactor: reduce complexity in test/mock.sh and discovery.sh (#1119) 2026-02-14 14:11:36 -05:00
qa-dry-run.sh feat: qa bot and emails (#565) 2026-02-11 20:19:45 -08:00
record.sh refactor: reduce complexity in discovery.sh, record.sh, and common.sh (#1123) 2026-02-14 15:44:05 -05:00
run.sh fix(security): harden weak crypto fallbacks, key validation, and temp paths (#1039) 2026-02-13 21:43:37 -05:00
update-readme.py QA-Bot setup (#335) 2026-02-10 19:51:07 -08:00