feat(cli): thread Config through the import path - #198
Open
ecalifornica wants to merge 1 commit into
Open
Conversation
|
🔍 Preview deployed: https://e98bb229.toolpath.pages.dev |
This was referenced Aug 13, 2026
ecalifornica
force-pushed
the
robert/config-import
branch
from
August 14, 2026 19:49
bf65079 to
d5d616c
Compare
ecalifornica
commented
Aug 14, 2026
Comment on lines
+18
to
+21
| // Transitional: `p derive` does not take `&Config` yet; load one | ||
| // for the import path. | ||
| let config = crate::config::Config::load()?; | ||
| crate::cmd_import::run(args, pretty, &config) |
Collaborator
Author
There was a problem hiding this comment.
cmd_p already holds &Config, so cmd_derive::run could take it today. Leaving the transitional load in: it carries the same marker as the other unthreaded sites and gets swept with them.
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 6 of the plan there). Stacked on #197. path-cli only.
What
cmd_ppasses&Configtocmd_import::runin the Import arm.p derivereusescmd_import::runand is not threaded; it loads a transitionalConfigat its call site.cmd_importconstructs every conversation provider viawith_resolver(providers::*_resolver(config)). The git, github, and pathbase arms construct no conversation provider and do not change.with_sessions_dirwhen--baseis given, so--basewins over the injected home.derive.rssingle-session helpers (derive_claude_sessionand siblings) take&Configand build their managers from the same resolver functions.record_artifactandrecord_is_currentin the sync engine take&Config. The transitional per-call loads inside them are gone.cmd_shareis threaded by its own PR. Its two forced call sites (derive_session, and therecord_artifactcall inshare_explicit) load a transitionalConfig. A load failure at therecord_artifactsite degrades like a manifest-write failure.HarnessBundle::from_environment()stays:sharestill uses it, and the import path never constructs a bundle.Emscripten
cmd_importcompiles on emscripten. Its claude/gemini/codex/copilot/pi arms construct providers there from the ungated resolvers.#[cfg(target_os = "emscripten")]blocks before any construction;opencode_resolverandcursor_resolverkeep their#[cfg(not(target_os = "emscripten"))]gates, and so do the matchingderive.rshelpers.emitusesconfigonly in its native manifest-record calls; it carriesexpect(unused_variables)on emscripten.Behavior change
p import pi/p derive pi/shareof 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.Tests
Configtorecord_artifact; no engine test reads the ambient environment for it.p importintegration tests run the binary underScopedHome, so$HOMEreaches the resolvers throughConfigend to end (import_copilot_writes_cache,import_records_manifest_so_sync_skips).cmd_importunit tests build managers from injected resolvers and call the*_with_managerhelpers directly; the signature changes do not touch them.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.