Critical bug — the loop reset age_block_last_idx unconditionally on every '- path_regex:' line. So after finding the target rule's age block, encountering the NEXT rule wiped the result and the function returned False. _grant_shared_secrets / _revoke_shared_secrets both silently no-op'd because of this. Fix: break out of the scan once we've collected the target rule's data. Refactored the remove helper to share a find_target_age_lines inner so the dangling-trailing-comma fixup uses the same logic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 KiB
Executable File
28 KiB
Executable File