refactor(cli): remove the last environment reads below the composition root - #205
Draft
ecalifornica wants to merge 1 commit into
Draft
refactor(cli): remove the last environment reads below the composition root#205ecalifornica wants to merge 1 commit into
ecalifornica wants to merge 1 commit into
Conversation
|
🔍 Preview deployed: https://04cd9353.toolpath.pages.dev |
ecalifornica
force-pushed
the
robert/config-cleanup
branch
from
August 14, 2026 19:49
a30b91b to
8d97f75
Compare
ecalifornica
marked this pull request as ready for review
August 17, 2026 17:02
ecalifornica
force-pushed
the
robert/config-cleanup
branch
from
August 18, 2026 20:09
8d97f75 to
07d8d28
Compare
…n root (#184) Delete the free `home_dir()` from config.rs. Its two callers take a `&Config` already: `cmd_share::bail_no_sessions` and `share_config::resolve_remote` now use `Config::home_dir()`. Thread `&Config` into `p derive` and delete its transitional `Config::load()`. `Config::load()` runs once, in `run()`. Test cleanup: - `sync::engine::tests::with_cfg` builds a `Config` only. It drops the `$TOOLPATH_CONFIG_DIR` write and the `TEST_ENV_LOCK` hold. - Two `cmd_resume` tests drop their `$TOOLPATH_CONFIG_DIR` write and their `TEST_ENV_LOCK` hold. `$PATH` is the only variable read below the root. It is the execution environment, not configuration.
ecalifornica
force-pushed
the
robert/config-cleanup
branch
from
August 25, 2026 20:23
07d8d28 to
305031c
Compare
ecalifornica
marked this pull request as draft
August 25, 2026 20:23
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.
Closes #184; path-cli only. The free
home_dir()is deleted and its 2 callers take the value from&Config;cmd_derive::runtakes&Configfromcmd_p, which removes the last transitionalConfig::load(). Outside tests,run()is the onlyConfig::load()caller, and$PATH(3 sites) is the only environment variable read below it: a binary lookup is execution environment, not configuration.CONFIG_ENV_VARSand theConfigfields match 1:1, 8 for 8, and every field has a consumer. Thecmd_resumeresolve_inputtests drop their environment scaffolding;TEST_ENV_LOCKkeeps 2 users, and the integration tests'ScopedHomekeeps its writes because they drive the composition root (#183 owns that).