feat(cli): thread Config through the export path - #199
Draft
ecalifornica wants to merge 1 commit into
Draft
Conversation
|
🔍 Preview deployed: https://d7432faf.toolpath.pages.dev |
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.
Part of #184 (PR 7 of the plan there). Stacked on #198. path-cli only.
What
cmd_ppasses&Configtocmd_export::run,cmd_project::run, andcmd_incept::run. The two forwarders pass it straight tocmd_export::run.run_<harness>and everywrite_into_<harness>helper takes&Config. Each one builds itsPathResolverfromproviders::<harness>_resolver(config).pub(crate) project_<harness>wrappers take&Configand forward it.cmd_resume::project_into_harnesstakes&Config.cmd_resumeis threaded by its own PR;run_with_strategyloads a transitionalConfigat that call site.$PATHBASE_URL, the credentials path, and the upload-side reads stay where they are; a later PR owns them.config_dir()call is unchanged for the same reason.providers::call site sits inside an existing#[cfg(not(target_os = "emscripten"))]function, and the bail blocks consumeconfig(verified by reading the cfg attributes; host test/clippy do not compile the wasm target).Behavior change
p export pi/p project/p incept/resumeof a pi session, Windows only: the CLI injectsConfig::home_dir(), which falls back to$USERPROFILE. The pi resolver's internal lookup reads$HOMEonly (pi: resolver home lookup ignores $USERPROFILE #192). With$HOMEunset, these resolve%USERPROFILE%\.pi\agent\sessions. This matches the import and sync changes earlier in the series.Tests
cmd_exportunit tests inject aConfigin place of setting$HOMEaround each call. Two helpers build them:config_with_homefor the harnesses that resolve from the home, andconfig_with_opencode_home, which also injectsxdg_data_homebecause the opencode resolver's internal$XDG_DATA_HOMEread wins against the home.$HOMEsave/restore block and theirTEST_ENV_LOCKguard. They no longer serialize against the rest of the suite.pathbase_repo_flag_requires_loginkeeps its$TOOLPATH_CONFIG_DIRscaffolding: the pathbase arm still reads the environment.cmd_resume'sproject_into_harness_claude_round_triploads aConfiginside its scoped-home guard.tests/resume.rsruns the projection end to end for all seven harnesses under aScopedHome, so$HOMEreaches the resolvers throughConfig.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.