From dde3067524c286b443ace76d9dfc919ddf663c93 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 3 Sep 2026 14:00:51 -0700 Subject: [PATCH] hook test: the stock cache path in the host's path form; Windows CI runs every crate's tests before failing Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY --- .github/workflows/ci.yml | 2 +- crates/hook/tests/cache_root_tests.rs | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4fe32df2..fb28f7d6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,7 +172,7 @@ jobs: run: rustup show - uses: Swatinem/rust-cache@v2 - run: cargo build --workspace --all-targets - - run: cargo test --workspace + - run: cargo test --workspace --no-fail-fast # Behavior gate: replays the tests/oracle/ goldens against a release build # of the engine from THIS checkout (so a PR is judged on its own source, diff --git a/crates/hook/tests/cache_root_tests.rs b/crates/hook/tests/cache_root_tests.rs index 66447dec2..090e811c0 100644 --- a/crates/hook/tests/cache_root_tests.rs +++ b/crates/hook/tests/cache_root_tests.rs @@ -113,6 +113,13 @@ fn state_relocates_and_slug_normalizes() { assert_ne!(get_cache_path("/x/my.app"), get_cache_path("/x/my-app")); } +/// The project-local cache path for `/x/app`, joined with the host's path +/// semantics (backslashes on Windows), which is what the stock behavior +/// produces. +fn stock_cache_path() -> String { + impeccable_common::jsp::join(&["/x/app", ".impeccable", "hook.cache.json"]) +} + #[test] fn root_value_normalization_and_opt_out() { let _l = ENV_LOCK.lock().unwrap(); @@ -131,11 +138,11 @@ fn root_value_normalization_and_opt_out() { // Unset or blank keeps stock project-local behavior. { let _g = EnvGuard::set(&[("IMPECCABLE_CACHE_ROOT", None)]); - assert_eq!(get_cache_path("/x/app"), "/x/app/.impeccable/hook.cache.json"); + assert_eq!(get_cache_path("/x/app"), stock_cache_path()); } { let _g = EnvGuard::set(&[("IMPECCABLE_CACHE_ROOT", Some(" "))]); - assert_eq!(get_cache_path("/x/app"), "/x/app/.impeccable/hook.cache.json"); + assert_eq!(get_cache_path("/x/app"), stock_cache_path()); } }