Repository navigation
fix: preserve config-level use.env in loadConfig - #34
Merged
Merged
Conversation
loadConfig() copied shell/rows/columns/program from the user config use block but silently dropped env, so a top-level use.env in tui-test.config.ts never reached spawned programs for tests without a beforeSpawn fixture. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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.
Description
loadConfig()copiedshell/rows/columns/programfrom the user config'suseblock but silently droppedenv, so a top-leveluse.envintui-test.config.tsnever reached spawned programs for tests without abeforeSpawnfixture. The runner already consumes it (suite.tsspawns withproject.env ?? config.use.env); only the loader dropped it.Why
factory-mono pins config-level env defaults (mock API base/key, auto-update off) so fixture-less CLI e2e tests can never inherit ambient CI credentials (root cause of the shard-24 rollback poisoning). Today that requires a build-time string patch in
apps/cli/scripts/prepare-tui-test.ts; this fixes it at the source so the patch can be deleted andTUI_TEST_REFrepointed.Testing
npm run buildpasses; compiledlib/config/config.jscontains the fixuse: { env: { FOO: 'bar' } }to a temp cache dir and confirmedloadConfig()returns itnpm run lint: eslint clean; pre-existing prettier warning insrc/test/suite.ts(present on main, untouched here)