fix(vendor): recover Windows portability patches
Merged
NA
4mo ago+1063+1063+0123456789012345678901234567890123456789-828-828-012345678901234567890123456789
Summary
- Recover the eleven
tokscale-corecommits validated in the Windows downstream so TokenBar remains the canonical source for the next Windows sync. - Release the temporary cache writer before Windows atomic replacement and reopen the final cache read/write before the durability sync.
- Keep Windows Zed and config fallbacks behind
use_env_roots, and evaluate extra-path warnings against the supplied scan home. - Isolate core fixtures from inherited environment variables, client roots, current directories, cache directories, and user-profile parser variants.
- Record the downstream provenance and upstream follow-up split in
vendor/README.md.
Provenance
The Windows port started from TokenBar commit 2ed256ee. This PR recovers the validated vendor sequence documented in the issue #45 handoff:
e5200634 -> db2a96a3 -> 15f418ee -> e807f333 -> 0979cdb0 -> 26b892a6 -> 6ac77c03 -> e91fb2c6 -> fbecb99c -> 3c8bfc52 -> aec5bd88
The seven modified vendor source files are byte-identical to the Windows tree at aec5bd88. The ledger is the only additional file; this is a selective recovery, not a wholesale re-vendor.
Compatibility
CACHE_SCHEMA_VERSIONremains 29.- No serialized parser output, cache layout, incremental state, FFI, C ABI, Swift, dependency, or public API contract changes.
- The change has no path overlap with open PR #58.
- Upstream work remains split into cache runtime, explicit-home scanner, and test-only hermetic follow-ups; this PR does not report any of them as upstreamed.
Verification
- Nine focused Rust regressions covering panic-safe guards, cache persistence, explicit-home isolation, positive environment behavior, Claude variants, and materialized parser fixtures.
- Hostile-environment default-parallel core suite: 1,058 passed, 1 ignored; Codebuff 10 passed; Hermes 3 passed; streaming snapshot 1 passed.
- Real profile metadata and content-digest manifests remained unchanged.
cargo test --workspacecargo clippy --workspace --all-targetsmake buildswift run TokenBar --selftestswift run TokenBar --smoke(exit 0; existing live-data drift and unavailable-provider diagnostics were still emitted)make check-docsgit diff --check- Fresh-context outcome verification:
CONFIRMED
cargo fmt --all -- --check is not green: untouched origin/main already has formatter drift, and preserving the Windows-validated byte-identical files retains additional rustfmt suggestions. This PR intentionally does not reformat those vendored files; every other listed gate passed.