You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(embedded): preserve shell environment variables when constructor defaults are empty
The HindsightEmbedded constructor included every parameter in the config dict
even when the caller left them at their default of "". Those empty-string
values travelled through the daemon-startup env pipeline and overwrote the
caller's actual shell environment variables (os.environ) set via export or
.env files, so HINDSIGHT_API_LLM_API_KEY (and every other key) was silently
ignored unless passed explicitly to the constructor.
Root cause: the HINDSIGHT_* propagation loop in _start_daemon used
'value is not None' as its guard, so an empty string was always propagated
and overwrote any prior os.environ value.
Changes (defence in depth):
- embedded.py: _set_if_truthy helper — only add keys with truthy values to
the config dict. An empty default no longer poisons the merged env.
- daemon_embed_manager.py: guard propagation on 'value' (truthy) instead of
'value is not None', so even if an empty string reaches this loop it is
harmlessly skipped.
Closes#3253.
0 commit comments