@@ -2288,6 +2288,10 @@ private function registerAbilities(): void {
22882288 'type ' => 'boolean ' ,
22892289 'description ' => 'Schedule each candidate as a single-row worktree_cleanup_chunk job for resumable async apply. ' ,
22902290 ),
2291+ 'remove_timeout ' => array (
2292+ 'type ' => 'integer ' ,
2293+ 'description ' => 'Timeout in seconds for destructive git worktree remove calls during apply. Defaults to the cleanup removal timeout. ' ,
2294+ ),
22912295 'include_repaired_metadata ' => array (
22922296 'type ' => 'boolean ' ,
22932297 'description ' => 'Also include repaired metadata rows. Requires explicit opt-in and still runs fresh safety probes before removal. ' ,
@@ -4031,7 +4035,7 @@ public static function worktreeCleanupArtifacts( array $input ): array|\WP_Error
40314035 /**
40324036 * Apply only worktrees with explicit lifecycle cleanup_eligible metadata in a bounded batch.
40334037 *
4034- * @param array $input Input parameters (dry_run, limit, older_than, sort, force, via_jobs, source).
4038+ * @param array $input Input parameters (dry_run, limit, older_than, sort, force, via_jobs, remove_timeout, source).
40354039 * @return array<string,mixed>|\WP_Error
40364040 */
40374041 public static function worktreeBoundedCleanupEligibleApply ( array $ input ): array |\WP_Error {
@@ -4051,6 +4055,9 @@ public static function worktreeBoundedCleanupEligibleApply( array $input ): arra
40514055 if ( isset ($ input ['sort ' ]) && '' !== trim ( (string ) $ input ['sort ' ]) ) {
40524056 $ opts ['sort ' ] = trim ( (string ) $ input ['sort ' ]);
40534057 }
4058+ if ( isset ($ input ['remove_timeout ' ]) ) {
4059+ $ opts ['remove_timeout ' ] = (int ) $ input ['remove_timeout ' ];
4060+ }
40544061 if ( isset ($ input ['source ' ]) && '' !== trim ( (string ) $ input ['source ' ]) ) {
40554062 $ opts ['source ' ] = trim ( (string ) $ input ['source ' ]);
40564063 }
0 commit comments