Skip to content

hooks: cwd_changed/file_changed fire_hooks not called — hooks_config appears empty despite TOML config #3625

@bug-ops

Description

@bug-ops

Description

During CI-682 live testing, the file watcher infrastructure was confirmed working (non-bare mode), but fire_hooks is never called when directory changes or file changes are detected. Despite a [hooks] section in the TOML config, hooks_config.cwd_changed appears to be empty at runtime.

Reproduction Steps

  1. Add [hooks] section to testing.toml with cwd_changed and file_changed entries
  2. Run: cargo run --features full -- --config .local/config/testing.toml
  3. Change working directory or modify a tracked file during session
  4. Observe: working directory changed is logged, but no hook fires

Expected Behavior

  • hooks_config.cwd_changed should contain the hook command from TOML
  • fire_hooks should be called with the CwdChanged event

Actual Behavior

  • working directory changed log entry appears (watcher is running)
  • fire_hooks is NOT called — hooks_config.cwd_changed appears empty despite TOML config
  • Possible TOML nested-key parse issue OR hooks firing but output not captured

Environment

  • Version: HEAD a0f1a76
  • Features: full
  • Mode: non-bare CLI session

Logs / Evidence

From CI-682 live test:

  • file change watcher started — confirmed (non-bare mode)
  • working directory changed — confirmed
  • hooks_config.cwd_changed appears empty at hook-dispatch time
  • with_hooks_config is skipped in --bare mode (runner.rs:2153) — not the issue here

Notes

  • file_changed hook: watcher starts but FileChanged events not received in test window (may be timing)
  • Both issues may share root cause in TOML config deserialization of the [hooks] section

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexitybugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions