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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY
This commit is contained in:
Paul Bakaus
2026-09-03 14:00:51 -07:00
co-authored by Claude Fable 5.1
parent 7d87d6e257
commit dde3067524
2 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -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,
+9 -2
View File
@@ -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());
}
}