Repository: local-ci-test-system
Severity: High
Problem
The eval identifies Local CI's dominant issue as a "Silent Failure Chain" whose root is structural: broad catch-all Exception handlers in cli/localci/cli/main.py reduce structured errors to string messages, orchestrator listener errors are logged but not re-raised, and container cleanup after a run is optional rather than guaranteed in cli/localci/core/orchestrator.py. The run() function in cli/localci/cli/run.py spans ~275 lines (lines 126–401 of the 679-line file) and mixes CLI argument parsing, configuration resolution, dependency injection, queue building, preflight checks, orchestrator execution, and result serialization into a single unit. The remaining ~280 lines of the file are two helper functions: _print_execution_plan (dry-run table output, ~30 lines) and _write_patched_workflow (a 237-line regex-based YAML patcher that injects container overrides, cache mounts, b2 bootstrap skipping, and Codecov patches). The run() function's monolithic structure makes it impossible to test the orchestration logic independently, impossible to inject mocks for the image-matching system or act executor, and impossible for new contributors to understand the flow. The eval's "Verification Vacuum" finding compounds this: no CI configuration exists to exercise the 12 test files with YAML fixtures in cli/tests/. Decomposing the run command into entry point, DI container, and testable orchestration function is the prerequisite for breaking the silent failure chain — it provides the test surface that currently does not exist.
Acceptance Criteria
Implementation Notes
- The
run() function is ~275 lines (lines 126–401), not the full file; the file total (679 lines) includes _print_execution_plan and _write_patched_workflow
- This is a partial decomposition (5pt); full extraction is 8pt+ and deferred to horizon
- Target: split into
cli.py (entry), container.py (DI), orchestrator.py (logic)
- The 237-line
_write_patched_workflow regex patcher remains untouched this week (separate horizon item)
- Brad has reviewed local-ci PRs and understands the architecture
References
cli/localci/cli/run.py:126–401 — run() function (~275 LOC)
cli/localci/cli/run.py:442–678 — _write_patched_workflow() helper (~237 LOC)
Repository: local-ci-test-system
Severity: High
Problem
The eval identifies Local CI's dominant issue as a "Silent Failure Chain" whose root is structural: broad catch-all
Exceptionhandlers incli/localci/cli/main.pyreduce structured errors to string messages, orchestrator listener errors are logged but not re-raised, and container cleanup after a run is optional rather than guaranteed incli/localci/core/orchestrator.py. Therun()function incli/localci/cli/run.pyspans ~275 lines (lines 126–401 of the 679-line file) and mixes CLI argument parsing, configuration resolution, dependency injection, queue building, preflight checks, orchestrator execution, and result serialization into a single unit. The remaining ~280 lines of the file are two helper functions:_print_execution_plan(dry-run table output, ~30 lines) and_write_patched_workflow(a 237-line regex-based YAML patcher that injects container overrides, cache mounts, b2 bootstrap skipping, and Codecov patches). Therun()function's monolithic structure makes it impossible to test the orchestration logic independently, impossible to inject mocks for the image-matching system or act executor, and impossible for new contributors to understand the flow. The eval's "Verification Vacuum" finding compounds this: no CI configuration exists to exercise the 12 test files with YAML fixtures incli/tests/. Decomposing theruncommand into entry point, DI container, and testable orchestration function is the prerequisite for breaking the silent failure chain — it provides the test surface that currently does not exist.Acceptance Criteria
Implementation Notes
run()function is ~275 lines (lines 126–401), not the full file; the file total (679 lines) includes_print_execution_planand_write_patched_workflowcli.py(entry),container.py(DI),orchestrator.py(logic)_write_patched_workflowregex patcher remains untouched this week (separate horizon item)References
cli/localci/cli/run.py:126–401—run()function (~275 LOC)cli/localci/cli/run.py:442–678—_write_patched_workflow()helper (~237 LOC)