@@ -1468,28 +1468,28 @@ private function build_cleanup_operator_summary( array $result ): array {
14681468
14691469 return array_filter (
14701470 array (
1471- 'success ' => (bool ) ( $ result ['success ' ] ?? false ),
1472- 'run_id ' => (string ) ( $ result ['run_id ' ] ?? '' ),
1473- 'job_id ' => isset ($ result ['job_id ' ]) ? (int ) $ result ['job_id ' ] : null ,
1474- 'mode ' => (string ) ( $ result ['mode ' ] ?? $ result ['evidence ' ]['engine_data ' ]['cleanup_run ' ]['mode ' ] ?? '' ),
1475- 'state ' => (string ) ( $ result ['state ' ] ?? '' ),
1476- 'status ' => (string ) ( $ result ['status ' ] ?? '' ),
1477- 'parent_status ' => (string ) ( $ result ['parent_status ' ] ?? '' ),
1478- 'created_at ' => (string ) ( $ result ['created_at ' ] ?? '' ),
1479- 'completed_at ' => (string ) ( $ result ['completed_at ' ] ?? $ result ['parent_completed_at ' ] ?? '' ),
1480- 'cleanup_counts ' => array (
1471+ 'success ' => (bool ) ( $ result ['success ' ] ?? false ),
1472+ 'run_id ' => (string ) ( $ result ['run_id ' ] ?? '' ),
1473+ 'job_id ' => isset ($ result ['job_id ' ]) ? (int ) $ result ['job_id ' ] : null ,
1474+ 'mode ' => (string ) ( $ result ['mode ' ] ?? $ result ['evidence ' ]['engine_data ' ]['cleanup_run ' ]['mode ' ] ?? '' ),
1475+ 'state ' => (string ) ( $ result ['state ' ] ?? '' ),
1476+ 'status ' => (string ) ( $ result ['status ' ] ?? '' ),
1477+ 'parent_status ' => (string ) ( $ result ['parent_status ' ] ?? '' ),
1478+ 'created_at ' => (string ) ( $ result ['created_at ' ] ?? '' ),
1479+ 'completed_at ' => (string ) ( $ result ['completed_at ' ] ?? $ result ['parent_completed_at ' ] ?? '' ),
1480+ 'cleanup_counts ' => array (
14811481 'planned ' => (int ) ( $ cleanup_items ['planned_rows ' ] ?? 0 ),
14821482 'applied ' => (int ) ( $ cleanup_items ['applied_rows ' ] ?? 0 ),
14831483 'skipped ' => (int ) ( $ cleanup_items ['skipped_rows ' ] ?? 0 ),
14841484 'failed ' => (int ) ( $ cleanup_items ['failed_rows ' ] ?? 0 ),
14851485 'bytes_reclaimed ' => (int ) ( $ cleanup_items ['bytes_reclaimed ' ] ?? 0 ),
14861486 'freed_human ' => (string ) ( $ cleanup_items ['freed_human ' ] ?? $ this ->format_bytes ($ cleanup_items ['bytes_reclaimed ' ] ?? 0 ) ),
14871487 ),
1488- 'total_bytes_reclaimed ' => (int ) ( $ remaining ['total_bytes_reclaimed ' ] ?? $ cleanup_items ['bytes_reclaimed ' ] ?? 0 ),
1489- 'total_reclaimed_human ' => $ this ->format_bytes ($ remaining ['total_bytes_reclaimed ' ] ?? $ cleanup_items ['bytes_reclaimed ' ] ?? 0 ),
1490- 'remaining_safe_candidates ' => (int ) ( $ remaining ['remaining_safe_candidates ' ] ?? $ remaining ['remaining_safely_removable_worktrees ' ] ?? 0 ),
1488+ 'total_bytes_reclaimed ' => (int ) ( $ remaining ['total_bytes_reclaimed ' ] ?? $ cleanup_items ['bytes_reclaimed ' ] ?? 0 ),
1489+ 'total_reclaimed_human ' => $ this ->format_bytes ($ remaining ['total_bytes_reclaimed ' ] ?? $ cleanup_items ['bytes_reclaimed ' ] ?? 0 ),
1490+ 'remaining_safe_candidates ' => (int ) ( $ remaining ['remaining_safe_candidates ' ] ?? $ remaining ['remaining_safely_removable_worktrees ' ] ?? 0 ),
14911491 'protected_unpushed_candidates ' => (int ) ( $ remaining ['protected_unpushed_candidates ' ] ?? 0 ),
1492- 'artifact_cleanup ' => array (
1492+ 'artifact_cleanup ' => array (
14931493 'planned ' => (int ) ( $ artifacts ['planned_rows ' ] ?? 0 ),
14941494 'applied ' => (int ) ( $ artifacts ['applied_rows ' ] ?? 0 ),
14951495 'skipped ' => (int ) ( $ artifacts ['skipped_rows ' ] ?? 0 ),
@@ -1498,14 +1498,14 @@ private function build_cleanup_operator_summary( array $result ): array {
14981498 'remaining_reclaimable_artifact_bytes ' => (int ) ( $ remaining ['remaining_reclaimable_artifact_bytes ' ] ?? $ artifacts ['remaining_reclaimable_artifact_bytes ' ] ?? 0 ),
14991499 'remaining_reclaimable_human ' => $ this ->format_bytes ($ remaining ['remaining_reclaimable_artifact_bytes ' ] ?? $ artifacts ['remaining_reclaimable_artifact_bytes ' ] ?? 0 ),
15001500 ),
1501- 'children ' => $ this ->build_cleanup_operator_child_summary ( (array ) ( $ result ['children ' ] ?? $ result ['evidence ' ]['children ' ] ?? array () ) ),
1502- 'by_type ' => (array ) ( $ cleanup_items ['by_type ' ] ?? array () ),
1503- 'skipped_by_reason ' => (array ) ( $ remaining ['skipped_by_reason ' ] ?? $ cleanup_items ['skipped_examples_by_reason ' ] ?? array () ),
1504- 'failed_by_reason ' => (array ) ( $ cleanup_items ['failed_by_reason ' ] ?? $ artifacts ['failed_by_reason ' ] ?? array () ),
1505- 'top_blocked_examples ' => $ this ->cleanup_operator_blocked_examples ($ result ),
1506- 'recommended_commands ' => (array ) ( $ remaining ['recommended_commands ' ] ?? array () ),
1507- 'next_commands ' => (array ) ( $ remaining ['next_commands ' ] ?? array () ),
1508- 'locks ' => (array ) ( $ result ['locks ' ] ?? array () ),
1501+ 'children ' => $ this ->build_cleanup_operator_child_summary ( (array ) ( $ result ['children ' ] ?? $ result ['evidence ' ]['children ' ] ?? array () ) ),
1502+ 'by_type ' => (array ) ( $ cleanup_items ['by_type ' ] ?? array () ),
1503+ 'skipped_by_reason ' => (array ) ( $ remaining ['skipped_by_reason ' ] ?? $ cleanup_items ['skipped_examples_by_reason ' ] ?? array () ),
1504+ 'failed_by_reason ' => (array ) ( $ cleanup_items ['failed_by_reason ' ] ?? $ artifacts ['failed_by_reason ' ] ?? array () ),
1505+ 'top_blocked_examples ' => $ this ->cleanup_operator_blocked_examples ($ result ),
1506+ 'recommended_commands ' => (array ) ( $ remaining ['recommended_commands ' ] ?? array () ),
1507+ 'next_commands ' => (array ) ( $ remaining ['next_commands ' ] ?? array () ),
1508+ 'locks ' => (array ) ( $ result ['locks ' ] ?? array () ),
15091509 ),
15101510 fn ( $ value ) => null !== $ value && array () !== $ value && '' !== $ value
15111511 );
@@ -3657,7 +3657,7 @@ public function worktree( array $args, array $assoc_args ): void {
36573657
36583658 $ input = array ();
36593659 $ input_builder = (string ) ( $ operation_config ['input_builder ' ] ?? '' );
3660- if ( '' !== $ input_builder && method_exists ( $ this , $ input_builder ) ) {
3660+ if ( '' !== $ input_builder ) {
36613661 $ input = $ this ->{$ input_builder }($ operation , $ assoc_args );
36623662 }
36633663
0 commit comments