Part of #183. Blocked on #184, #185, #186. No in-process code may read env before this starts.
Delete
ScopedHome, support::env_lock(), config::TEST_ENV_LOCK.
ScopedPath and cmd_resume's private duplicate, after cmd_resume takes the search path as a parameter.
Convert
config::search_path() is the single $PATH read. cmd_resume and cmd_export take the value as a parameter.
fuzzy.rs keeps its $PATH probe behind #[expect]. Where the value should live (a Config field or a threaded parameter) is decided in review; a follow-up PR removes the exception.
- In-process tests construct
Config and resolvers directly.
assert_cmd subprocess tests keep .env(). That call sets the child environment, not the global one.
Guard
- Add a clippy
disallowed-methods rule for std::env::{var, var_os, vars, vars_os, set_var, remove_var} across the workspace.
- Add
--all-targets to the clippy gate in scripts/quality_gates.sh, so the rule covers tests and examples.
- Allow it with
#[expect] in: path-cli's config module, fuzzy.rs (until the search-path decision), pathbase-client's build script (OUT_DIR is cargo's contract), and toolpath-cursor's real-env example and sanity test.
- CI runs
-D warnings already, so the rule is active on day one.
Part of #183. Blocked on #184, #185, #186. No in-process code may read env before this starts.
Delete
ScopedHome,support::env_lock(),config::TEST_ENV_LOCK.ScopedPathandcmd_resume's private duplicate, aftercmd_resumetakes the search path as a parameter.Convert
config::search_path()is the single$PATHread.cmd_resumeandcmd_exporttake the value as a parameter.fuzzy.rskeeps its$PATHprobe behind#[expect]. Where the value should live (aConfigfield or a threaded parameter) is decided in review; a follow-up PR removes the exception.Configand resolvers directly.assert_cmdsubprocess tests keep.env(). That call sets the child environment, not the global one.Guard
disallowed-methodsrule forstd::env::{var, var_os, vars, vars_os, set_var, remove_var}across the workspace.--all-targetsto the clippy gate inscripts/quality_gates.sh, so the rule covers tests and examples.#[expect]in: path-cli's config module,fuzzy.rs(until the search-path decision),pathbase-client's build script (OUT_DIRis cargo's contract), andtoolpath-cursor's real-env example and sanity test.-D warningsalready, so the rule is active on day one.