@@ -577,6 +577,7 @@ public function execute( array $input ): array
577577 'reason ' => 'large blocked output fixture ' ,
578578 );
579579 }
580+ $ remaining_handles = array_map (fn ( $ row ) => (string ) ( $ row ['handle ' ] ?? '' ), $ skipped );
580581
581582 return array (
582583 'success ' => true ,
@@ -590,6 +591,10 @@ public function execute( array $input ): array
590591 'bytes_reclaimed ' => empty ($ input ['dry_run ' ]) ? 4096 : 0 ,
591592 ),
592593 'skipped ' => $ skipped ,
594+ 'pagination ' => array (
595+ 'remaining_total ' => count ($ remaining_handles ),
596+ 'remaining_handles ' => $ remaining_handles ,
597+ ),
593598 );
594599 }
595600 }
@@ -1168,13 +1173,17 @@ public function execute( array $input ): array
11681173 datamachine_code_cleanup_assert (array () === ( $ abandoned_compact_json ['blocked ' ] ?? null ), 'abandoned compact JSON omits full blocked rows ' );
11691174 datamachine_code_cleanup_assert (true === ( $ abandoned_compact_json ['evidence ' ]['blocked_truncated ' ] ?? false ), 'abandoned compact JSON records blocked truncation evidence ' );
11701175 datamachine_code_cleanup_assert (isset ($ abandoned_compact_json ['blocked_examples ' ]['active_no_signal ' ][0 ]['handle ' ]), 'abandoned compact JSON includes grouped blocked examples ' );
1176+ datamachine_code_cleanup_assert (! isset ($ abandoned_compact_json ['steps ' ]['bounded_apply_initial ' ]['pagination ' ]['remaining_handles ' ]), 'abandoned compact JSON omits full nested remaining handles ' );
1177+ datamachine_code_cleanup_assert (32 === (int ) ( $ abandoned_compact_json ['steps ' ]['bounded_apply_initial ' ]['pagination ' ]['remaining_handles_count ' ] ?? 0 ), 'abandoned compact JSON keeps nested remaining handle count ' );
1178+ datamachine_code_cleanup_assert (25 === count ($ abandoned_compact_json ['steps ' ]['bounded_apply_initial ' ]['pagination ' ]['remaining_handles_examples ' ] ?? array ()), 'abandoned compact JSON keeps bounded nested handle examples ' );
11711179
11721180 WP_CLI ::$ logs = array ();
11731181 WP_CLI ::$ successes = array ();
11741182 $ command ->worktree (array ( 'abandoned ' ), array ( 'apply ' => true , 'force ' => true , 'stage ' => 'bounded ' , 'limit ' => 10 , 'passes ' => 1 , 'verbose ' => true , 'format ' => 'json ' ));
11751183 $ abandoned_verbose_json = json_decode (WP_CLI ::$ logs [0 ] ?? '' , true );
11761184 datamachine_code_cleanup_assert (JSON_ERROR_NONE === json_last_error (), 'abandoned verbose JSON output parses cleanly ' );
11771185 datamachine_code_cleanup_assert (32 === count ($ abandoned_verbose_json ['blocked ' ] ?? array ()), 'abandoned verbose JSON keeps full blocked rows ' );
1186+ datamachine_code_cleanup_assert (32 === count ($ abandoned_verbose_json ['steps ' ]['bounded_apply_initial ' ]['pagination ' ]['remaining_handles ' ] ?? array ()), 'abandoned verbose JSON keeps full nested remaining handles ' );
11781187 datamachine_code_cleanup_assert (! isset ($ abandoned_verbose_json ['evidence ' ]['blocked_truncated ' ]), 'abandoned verbose JSON does not report truncation ' );
11791188 $ bounded_apply_ability ->extra_skipped = 0 ;
11801189
0 commit comments