feat(continuous-learning-v2): make observer model configurable via ECC_OBSERVER_MODEL (#2390)

* feat(continuous-learning-v2): make observer model configurable via ECC_OBSERVER_MODEL

The observer hardcoded `--model haiku`. Parameterize as "${ECC_OBSERVER_MODEL:-haiku}": the haiku default is preserved (no behavior change for existing users), but users can opt into a stronger model — e.g. `ECC_OBSERVER_MODEL=opus` — for higher-quality instinct extraction. Useful on subscription plans where model cost isn't the limiting factor.

* fix(continuous-learning-v2): address review — update wiring test + docs

- Update source-inspection test to assert the ${ECC_OBSERVER_MODEL:-haiku} defaulting behavior (was matching the literal `claude --model haiku`, which this PR changed). All 31 tests pass.
- Add guidance to raise ECC_OBSERVER_TIMEOUT_SECONDS for slower models (e.g. opus) so the 120s watchdog doesn't kill analysis mid-run.
- Fix now-stale 'Haiku session' comment -> 'observer session' (model is configurable).
This commit is contained in:
jack-finance-able
2026-06-29 20:43:42 -05:00
committed by GitHub
parent f720885cea
commit c2bcc4ec2f
2 changed files with 13 additions and 4 deletions
+7 -2
View File
@@ -454,8 +454,13 @@ test('claude invocation still includes ECC_SKIP_OBSERVE and ECC_HOOK_PROFILE gua
const content = fs.readFileSync(observerLoopPath, 'utf8');
// Find the claude execution line(s)
const lines = content.split('\n');
const claudeLine = lines.find(l => l.includes('claude --model haiku'));
assert.ok(claudeLine, 'Should find claude --model haiku invocation line');
const claudeLine = lines.find(l => l.includes('claude --model'));
assert.ok(claudeLine, 'Should find claude --model invocation line');
// Model is configurable via ECC_OBSERVER_MODEL but must still default to haiku.
assert.ok(
claudeLine.includes('${ECC_OBSERVER_MODEL:-haiku}'),
`claude --model should default to haiku and honor ECC_OBSERVER_MODEL, got: ${claudeLine}`
);
// The env vars are on the same line as the claude command
const claudeLineIndex = lines.indexOf(claudeLine);
const fullCommand = lines.slice(Math.max(0, claudeLineIndex - 1), claudeLineIndex + 3).join(' ');