-
Notifications
You must be signed in to change notification settings - Fork 3.5k
v0.9.3 refactor(hooks): split config types from HookExecutor #4082
Copy link
Copy link
Closed
Labels
cleanupCode cleanup, refactor, or maintenance workCode cleanup, refactor, or maintenance workenhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnessrustPull requests that update rust codePull requests that update rust codetuiTerminal UI behavior, rendering, or interactionTerminal UI behavior, rendering, or interactionv0.9.3Targeting v0.9.3Targeting v0.9.3
Milestone
Description
Metadata
Metadata
Assignees
Labels
cleanupCode cleanup, refactor, or maintenance workCode cleanup, refactor, or maintenance workenhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnessrustPull requests that update rust codePull requests that update rust codetuiTerminal UI behavior, rendering, or interactionTerminal UI behavior, rendering, or interactionv0.9.3Targeting v0.9.3Targeting v0.9.3
Projects
StatusShow more project fields
Done
Problem
crates/tui/src/hooks.rsis 2,576 lines mixing serde config types (HookEvent, matcher config,[[hooks.hooks]]shapes) with process execution, timeouts, andHookExecutorruntime behavior.Hooks v2 contract work landed here; separating config from execution makes policy changes safer.
Proposed modules
hooks/mod.rs— public API and re-exports.hooks/config.rs— events, matcher types, deserialization, validation.hooks/executor.rs—HookExecutor, subprocess IO, timeouts, decision JSON contract.hooks/matcher.rs(optional) — glob/path matching if separable from config.Sizing
Acceptance criteria
cargo fmtand targeted hooks tests.Related: #1897, #3306, #3026.