Skip to content

fix(vendor): derive Windows supplied-home scan paths - #61

Merged
Nanako0129 merged 1 commit into
mainfrom
fix-windows-supplied-home
Jul 18, 2026
Merged

fix(vendor): derive Windows supplied-home scan paths#61
Nanako0129 merged 1 commit into
mainfrom
fix-windows-supplied-home

Conversation

@Nanako0129

Copy link
Copy Markdown
Owner

Summary

  • derive explicit-home Windows config clients from <home>/AppData/Roaming/tokscale
  • discover Zed at <home>/AppData/Local/Zed/threads/threads.db when environment roots are disabled
  • keep default process APPDATA / LOCALAPPDATA discovery unchanged and preserve independent scanner-settings extra-path coverage
  • update the vendor ledger with the supplied-home contract and current upstream disposition

Root cause

PR #59 isolated explicit-home scans from the process profile, but the positive supplied-profile layout was incomplete: PathRoot::Config still fell back to <home>/.config/tokscale, and Zed had no supplied AppData/Local candidate. The scan therefore avoided the wrong profile without finding the canonical Windows paths under the requested home.

The Zed extra-path fixtures also used the same path that is now canonical. They moved to custom-zed/threads so a passing test still proves the settings seam rather than succeeding through default discovery.

Regression evidence

Before the production change, the direct supplied-home Zed fixture failed hermetically:

assertion `left == right` failed
  left: None
 right: Some("<temp>/AppData/Local/Zed/threads/threads.db")

After the change, the positive supplied-home fixture, the independent Zed extra-path scanner fixture, and the materialized parse_local_clients extra-path fixture all pass.

Verification

  • focused supplied-home config and Zed regressions
  • cargo test — 230 FFI tests and 1,059 core tests passed; one core test ignored; integration binaries passed
  • cargo clippy --workspace --all-targets — passed with existing warnings
  • make build
  • swift run TokenBar --selftest
  • swift run TokenBar --smoke
  • make check-docs
  • git diff --check

Repository-wide cargo fmt --all -- --check still reports pre-existing formatting drift outside this change. Rustfmt emits no diff at the modified hunks.

Platform boundary

The Zed supplied-home path is exercised by a platform-neutral hermetic fixture on macOS. The config branch remains #[cfg(target_os = "windows")]; the conditional unit assertion pins its Windows path but was not executed on a Windows runner in this repository. This is not a Windows runtime verification claim.

No parser output, cache layout, cache schema, FFI, C ABI, Swift contract, tag, or release changes are included.

Explicit-home scans already stopped consulting process APPDATA and LOCALAPPDATA, but config clients still fell back to <home>/.config/tokscale and Zed had no supplied AppData/Local path. An isolated Windows --home scan therefore could not discover the canonical profile layout.

Derive config and Zed paths from the supplied home when environment roots are disabled, while preserving process known-folder discovery for default scans. Add a direct Zed regression and move scanner-settings fixtures off the new canonical default path so they still prove the independent extra-path seam.

No parser output, cache layout, FFI, or public API changes; cache schema remains 29.
@Nanako0129
Nanako0129 merged commit 258b0bc into main Jul 18, 2026
1 check passed
@Nanako0129
Nanako0129 deleted the fix-windows-supplied-home branch July 18, 2026 00:25
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.

1 participant