Skip to content

refactor(hooks): split config and executor modules#4087

Draft
cyq1017 wants to merge 1 commit into
Hmbown:mainfrom
cyq1017:codex/codewhale-4082-hooks-split
Draft

refactor(hooks): split config and executor modules#4087
cyq1017 wants to merge 1 commit into
Hmbown:mainfrom
cyq1017:codex/codewhale-4082-hooks-split

Conversation

@cyq1017

@cyq1017 cyq1017 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Problem

crates/tui/src/hooks.rs mixed hook config definitions with executor runtime behavior in one large module, which made hooks policy changes harder to review.

Change

  • Move hook events, conditions, hook definitions, and HooksConfig into hooks/config.rs.
  • Move HookExecutor, subprocess execution, timeout handling, stdout parsing, payload helpers, and tests into hooks/executor.rs.
  • Keep the existing root crate::hooks::* API available through re-exports.

Closes #4082.

Verification

  • cargo test -p codewhale-tui hooks:: --locked -- --nocapture
  • RUSTFLAGS='-Dwarnings' cargo test -p codewhale-tui hooks:: --locked -- --nocapture
  • cargo fmt --all -- --check
  • git diff --check

@Hmbown Hmbown added this to the v0.8.68 milestone Jul 7, 2026 — with ChatGPT Codex Connector
@Hmbown Hmbown added the v0.8.69 Targeting v0.8.69 label Jul 7, 2026
@Hmbown Hmbown modified the milestones: v0.8.68, v0.8.69 Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.8.69 Targeting v0.8.69

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.8.68 refactor(hooks): split config types from HookExecutor

2 participants