Skip to content

feat(cli): thread Config into the resume path - #203

Draft
ecalifornica wants to merge 1 commit into
robert/config-pathbasefrom
robert/config-resume
Draft

feat(cli): thread Config into the resume path#203
ecalifornica wants to merge 1 commit into
robert/config-pathbasefrom
robert/config-resume

Conversation

@ecalifornica

@ecalifornica ecalifornica commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Part of #184; path-cli only. cmd_resume takes &Config (3 signatures), and the projectors and the Pathbase fetch receive the one Config extracted in run(). Config and the config module are pub and #[doc(hidden)] with crate-private fields, because run_with_strategy is the entry point tests/resume.rs drives. $PATH stays a live read: a binary lookup is execution environment, not configuration. The cache PR owns the remaining $TOOLPATH_CONFIG_DIR read under resolve_input, so the integration tests keep ScopedHome and pass ScopedHome::config().

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

🔍 Preview deployed: https://a2f1a962.toolpath.pages.dev

`resume` receives `&Config` from run() and passes it to the input
resolver and the projectors. The transitional `Config::load()` calls
in `run_with_strategy` and `resolve_input` are gone.

- `cmd_resume::run`, `run_with_strategy`, and `resolve_input` take
  `&Config`. The Pathbase fetch calls
  `derive::pathbase_fetch_to_doc(config, …)`.
- `Config` is public and `config` is a public module.
  `run_with_strategy` is the public entry point for
  `tests/resume.rs`, so its parameter type must be nameable there.
  The public items are `#[doc(hidden)]` and the fields stay
  crate-private; `Config::load` is the only constructor outside the
  crate.
- The `$PATH` read for the harness binary lookup stays. A binary
  lookup is execution environment, not configuration.
- The `project_into_harness` unit test injects a `Config` rooted at
  a tempdir. The `run_with_strategy` unit test does the same and
  keeps the `$PATH` guard.
- The `resolve_input` unit tests inject a `Config`. The Pathbase
  fetch test needs no environment guard. The cache-hit test and the
  unresolvable-input test still set `$TOOLPATH_CONFIG_DIR`, because
  `cache.rs` reads it.
- `ScopedHomeForResume` is deleted. The unit tests set no `$HOME`.
- `ScopedHome::config` gives the integration tests the `Config` the
  CLI extracts at its composition root.
@ecalifornica
ecalifornica marked this pull request as draft August 25, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants