refactor(hooks): split config and executor modules#4087
Conversation
20528e1 to
4590065
Compare
|
Thanks — this is the split #4082 asks for, done cleanly: Where it stands: #4082 is on the v0.9.3 milestone, behind the v0.9.1 freeze and the active v0.9.2 lane, so there is runway — but the branch is stale in the one way that matters for a file move. Main's Path to land:
If you would rather not redo the move, say so — it is small enough to regenerate maintainer-side and land with your credit ( Generated by Claude Code |
Signed-off-by: cyq <15000851237@163.com>
4590065 to
6d38efd
Compare
Problem
crates/tui/src/hooks.rsmixed hook config definitions with executor runtime behavior in one large module, which made hooks policy changes harder to review.Change
HooksConfigintohooks/config.rs.HookExecutor, subprocess execution, timeout handling, stdout parsing, payload helpers, and tests intohooks/executor.rs.crate::hooks::*API available through re-exports.Closes #4082.
Verification
cargo test -p codewhale-tui hooks:: --locked(65 passed)cargo fmt --all -- --checkcargo clippy -p codewhale-tui --bin codewhale-tui --locked -- -A clippy::collapsible_match -D warnings(the strict form is currently capped by an unrelated existing UI lint)git diff --checkhooks/config.rshas no subprocess imports; decision-JSON and timeout coverage remain unchanged.