@@ -206,10 +206,10 @@ private function aggregate_cleanup_child_jobs( array $child_jobs ): array {
206206 }
207207 }
208208
209- $ summary ['artifact_cleanup ' ]['freed_human ' ] = $ this ->format_bytes ($ summary ['artifact_cleanup ' ]['bytes_reclaimed ' ]);
210- $ summary ['cleanup_items ' ]['freed_human ' ] = $ this ->format_bytes ($ summary ['cleanup_items ' ]['bytes_reclaimed ' ]);
211- $ summary ['children ' ]['batch_job_ids ' ] = array_values (array_unique ($ summary ['children ' ]['batch_job_ids ' ]));
212- $ summary ['children ' ]['chunk_job_ids ' ] = array_values (array_unique ($ summary ['children ' ]['chunk_job_ids ' ]));
209+ $ summary ['artifact_cleanup ' ]['freed_human ' ] = $ this ->format_bytes ($ summary ['artifact_cleanup ' ]['bytes_reclaimed ' ]);
210+ $ summary ['cleanup_items ' ]['freed_human ' ] = $ this ->format_bytes ($ summary ['cleanup_items ' ]['bytes_reclaimed ' ]);
211+ $ summary ['children ' ]['batch_job_ids ' ] = array_values (array_unique ($ summary ['children ' ]['batch_job_ids ' ]));
212+ $ summary ['children ' ]['chunk_job_ids ' ] = array_values (array_unique ($ summary ['children ' ]['chunk_job_ids ' ]));
213213 $ summary ['children ' ]['pending_job_ids ' ] = array_values (array_unique ($ summary ['children ' ]['pending_job_ids ' ]));
214214 $ summary ['children ' ]['pending_without_drainable_action_job_ids ' ] = array_values (array_unique ($ summary ['children ' ]['pending_without_drainable_action_job_ids ' ]));
215215 $ summary ['children ' ]['processing_job_ids ' ] = array_values (array_unique ($ summary ['children ' ]['processing_job_ids ' ]));
@@ -227,30 +227,30 @@ private function aggregate_cleanup_child_jobs( array $child_jobs ): array {
227227 * @return array<string,mixed>
228228 */
229229 private function summarize_cleanup_children ( array $ children ): array {
230- $ limit = 10 ;
231- $ batch_ids = (array ) ( $ children ['batch_job_ids ' ] ?? array () );
232- $ chunk_ids = (array ) ( $ children ['chunk_job_ids ' ] ?? array () );
233- $ pending = (array ) ( $ children ['pending_job_ids ' ] ?? array () );
230+ $ limit = 10 ;
231+ $ batch_ids = (array ) ( $ children ['batch_job_ids ' ] ?? array () );
232+ $ chunk_ids = (array ) ( $ children ['chunk_job_ids ' ] ?? array () );
233+ $ pending = (array ) ( $ children ['pending_job_ids ' ] ?? array () );
234234 $ undrainable = (array ) ( $ children ['pending_without_drainable_action_job_ids ' ] ?? array () );
235- $ processing = (array ) ( $ children ['processing_job_ids ' ] ?? array () );
235+ $ processing = (array ) ( $ children ['processing_job_ids ' ] ?? array () );
236236
237237 return array (
238- 'processing ' => (int ) ( $ children ['processing ' ] ?? 0 ),
239- 'completed ' => (int ) ( $ children ['completed ' ] ?? 0 ),
240- 'failed ' => (int ) ( $ children ['failed ' ] ?? 0 ),
241- 'skipped ' => (int ) ( $ children ['skipped ' ] ?? 0 ),
242- 'running ' => (int ) ( $ children ['running ' ] ?? 0 ),
243- 'total ' => (int ) ( $ children ['total ' ] ?? 0 ),
244- 'statuses ' => (array ) ( $ children ['statuses ' ] ?? array () ),
245- 'batch_total ' => count ($ batch_ids ),
246- 'chunk_total ' => count ($ chunk_ids ),
247- 'failed_job_ids ' => (array ) ( $ children ['failed_job_ids ' ] ?? array () ),
248- 'pending_job_ids ' => array_slice ($ pending , 0 , $ limit ),
238+ 'processing ' => (int ) ( $ children ['processing ' ] ?? 0 ),
239+ 'completed ' => (int ) ( $ children ['completed ' ] ?? 0 ),
240+ 'failed ' => (int ) ( $ children ['failed ' ] ?? 0 ),
241+ 'skipped ' => (int ) ( $ children ['skipped ' ] ?? 0 ),
242+ 'running ' => (int ) ( $ children ['running ' ] ?? 0 ),
243+ 'total ' => (int ) ( $ children ['total ' ] ?? 0 ),
244+ 'statuses ' => (array ) ( $ children ['statuses ' ] ?? array () ),
245+ 'batch_total ' => count ($ batch_ids ),
246+ 'chunk_total ' => count ($ chunk_ids ),
247+ 'failed_job_ids ' => (array ) ( $ children ['failed_job_ids ' ] ?? array () ),
248+ 'pending_job_ids ' => array_slice ($ pending , 0 , $ limit ),
249249 'pending_without_drainable_action_job_ids ' => array_slice ($ undrainable , 0 , $ limit ),
250- 'processing_job_ids ' => array_slice ($ processing , 0 , $ limit ),
251- 'pending_truncated ' => count ($ pending ) > $ limit ,
252- 'processing_truncated ' => count ($ processing ) > $ limit ,
253- 'diagnostic_job_id_lists ' => 'Re-run status with --verbose or use cleanup evidence for full child job IDs. ' ,
250+ 'processing_job_ids ' => array_slice ($ processing , 0 , $ limit ),
251+ 'pending_truncated ' => count ($ pending ) > $ limit ,
252+ 'processing_truncated ' => count ($ processing ) > $ limit ,
253+ 'diagnostic_job_id_lists ' => 'Re-run status with --verbose or use cleanup evidence for full child job IDs. ' ,
254254 );
255255 }
256256
@@ -298,8 +298,8 @@ private function cleanup_run_drain_summary( int $job_id, string $state, array $c
298298 }
299299
300300 return array (
301- 'needed ' => in_array ($ state , array ( 'running ' , 'waiting_on_children ' ), true ),
302- 'commands ' => $ commands ,
301+ 'needed ' => in_array ($ state , array ( 'running ' , 'waiting_on_children ' ), true ),
302+ 'commands ' => $ commands ,
303303 'active_child_job_ids ' => $ active_child_ids ,
304304 'undrainable_child_job_ids ' => $ undrainable_child_ids ,
305305 'bytes_reclaimed ' => (int ) ( $ cleanup_items ['bytes_reclaimed ' ] ?? 0 ),
0 commit comments