@@ -3519,7 +3519,7 @@ public function worktree( array $args, array $assoc_args ): void {
35193519 private function run_worktree_abandoned_orchestration ( array $ assoc_args ): array |\WP_Error {
35203520 $ apply = ! empty ($ assoc_args ['apply ' ]);
35213521 $ force = ! empty ($ assoc_args ['force ' ]);
3522- $ limit = isset ($ assoc_args ['limit ' ]) ? max (1 , min (100 , (int ) $ assoc_args ['limit ' ])) : 100 ;
3522+ $ limit = isset ($ assoc_args ['limit ' ]) ? max (1 , min (1000 , (int ) $ assoc_args ['limit ' ])) : 100 ;
35233523 $ passes = isset ($ assoc_args ['passes ' ]) ? max (1 , min (25 , (int ) $ assoc_args ['passes ' ])) : 5 ;
35243524 $ offset = isset ($ assoc_args ['offset ' ]) ? max (0 , (int ) $ assoc_args ['offset ' ]) : 0 ;
35253525 $ stage = isset ($ assoc_args ['stage ' ]) ? strtolower ( (string ) preg_replace ('/[^a-zA-Z0-9_-]/ ' , '' , (string ) $ assoc_args ['stage ' ]) ) : 'reconcile ' ;
@@ -3580,6 +3580,7 @@ private function run_worktree_abandoned_orchestration( array $assoc_args ): arra
35803580 'steps ' => array (),
35813581 'blocked ' => array (),
35823582 'summary ' => array (
3583+ 'scanned ' => 0 ,
35833584 'reconciled ' => 0 ,
35843585 'marked_cleanup_eligible ' => 0 ,
35853586 'would_mark_cleanup_eligible ' => 0 ,
@@ -3633,6 +3634,7 @@ private function run_worktree_abandoned_orchestration( array $assoc_args ): arra
36333634 return $ reconcile ;
36343635 }
36353636 $ result ['steps ' ]['reconcile_metadata ' ] = $ this ->summarize_worktree_abandoned_step ($ reconcile );
3637+ $ result ['summary ' ]['scanned ' ] += (int ) ( $ result ['steps ' ]['reconcile_metadata ' ]['inspected ' ] ?? 0 );
36363638 $ result ['summary ' ]['reconciled ' ] = (int ) ( $ reconcile ['summary ' ]['written ' ] ?? 0 );
36373639 $ result ['summary ' ]['would_reconcile ' ] = (int ) ( $ reconcile ['summary ' ]['proposed ' ] ?? 0 );
36383640
@@ -3696,6 +3698,7 @@ private function run_worktree_abandoned_orchestration( array $assoc_args ): arra
36963698
36973699 $ step_key = sprintf ('%s_pass_%d ' , $ key , $ pass );
36983700 $ result ['steps ' ][ $ step_key ] = $ this ->summarize_worktree_abandoned_step ($ step );
3701+ $ result ['summary ' ]['scanned ' ] += (int ) ( $ result ['steps ' ][ $ step_key ]['inspected ' ] ?? 0 );
36993702 $ written = (int ) ( $ step ['summary ' ]['written ' ] ?? 0 );
37003703 $ planned = (int ) ( $ step ['summary ' ]['planned ' ] ?? 0 );
37013704 $ pass_marked += $ apply ? $ written : $ planned ;
@@ -3837,6 +3840,7 @@ private function run_worktree_abandoned_bounded_apply( object $ability, array &$
38373840 $ result ['summary ' ]['removed ' ] += (int ) ( $ bounded ['summary ' ]['removed ' ] ?? 0 );
38383841 $ result ['summary ' ]['would_remove ' ] += (int ) ( $ bounded ['summary ' ]['would_remove ' ] ?? 0 );
38393842 $ result ['summary ' ]['bytes_reclaimed ' ] += (int ) ( $ bounded ['summary ' ]['bytes_reclaimed ' ] ?? 0 );
3843+ $ result ['summary ' ]['scanned ' ] += (int ) ( $ result ['steps ' ][ sprintf ('bounded_apply_%s ' , $ step_label ) ]['inspected ' ] ?? 0 );
38403844 $ result ['blocked ' ] = $ this ->merge_worktree_abandoned_blockers ($ result ['blocked ' ], (array ) ( $ bounded ['skipped ' ] ?? array () ));
38413845
38423846 return $ bounded ;
@@ -4089,6 +4093,10 @@ private function render_worktree_abandoned_result( array $result, array $assoc_a
40894093 'metric ' => 'applied ' ,
40904094 'value ' => ! empty ($ result ['applied ' ]) ? 'yes ' : 'no ' ,
40914095 ),
4096+ array (
4097+ 'metric ' => 'scanned ' ,
4098+ 'value ' => (string ) ( $ summary ['scanned ' ] ?? 0 ),
4099+ ),
40924100 array (
40934101 'metric ' => 'reconciled ' ,
40944102 'value ' => (string ) ( $ summary ['reconciled ' ] ?? 0 ),
0 commit comments