Repository navigation
fix: invoke credential resolver under daemon even when ambient env is populated - #21
Merged
OndrejDrapalik merged 2 commits intoAug 26, 2026
Conversation
OndrejDrapalik
approved these changes
Aug 26, 2026
This was referenced Aug 26, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HERDR_PLUGIN_IDorHERDR_PLUGIN_ROOT),src/config.js(resolveCredentials) is designed to demote ambient inheritedE2B_API_KEYandE2B_DOMAINso thatconfig.tomlupdates take effect without requiring a daemon restart.ensure_e2b_envinbin/lib/paths.shpreviously only invokedsrc/resolve-env.jswhen eitherE2B_API_KEYorE2B_DOMAINwas empty (if [ -z "${E2B_API_KEY:-}" ] || [ -z "${E2B_DOMAIN:-}" ]; then).E2B_API_KEYandE2B_DOMAINat launch,ensure_e2b_envskipped invoking the resolver entirely, retaining the stale ambient variables and bypassing the daemon config resolution rules.ensure_e2b_envto also invoke the resolver whenHERDR_PLUGIN_IDorHERDR_PLUGIN_ROOTis set, ensuring daemon-spawned commands always resolve credentials as intended.test/cli.test.shasserting that a daemon run with exportedE2B_API_KEYandE2B_DOMAINcorrectly resolves the configured region and credentials fromconfig.toml.Test Plan
node --test test/*.test.js: 254 passed, 0 failed.bash test/cli.test.sh: 295 passed, 0 failed, 2 skipped.