Two continuous-learning-v2 observer regressions reported in #2452:
- start-observer.sh still called _ecc_resolve_homunculus_dir, but the
shared lib was renamed to _clv2_resolve_homunculus_dir (with observe.sh
and detect-project.sh updated, start-observer.sh missed). Under set -e
every launch dies with exit 127 at line 40 - daemon boot is broken on
all platforms, not just Windows.
- observer-loop.sh backgrounds the analysis claude call with stdin left
open; on Git Bash/MSYS2 the child inherits it, waits, warns 'no stdin
data received', and exits 1 before reading the analysis file. Close
stdin with </dev/null while keeping the -p prompt flag, preserving the
Windows-compat decision from #842 instead of reverting to a stdin
redirect.
Adds two source invariant guards to tests/hooks/hooks.test.js: every
*_resolve_homunculus_dir call site must match a function the shared lib
defines, and the backgrounded claude call must close stdin.
Fixes#2452