From b929a5bc7f3f16dc96ed8319388bd8124a457d18 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Tue, 29 Sep 2026 13:16:52 +0000 Subject: [PATCH] test: repair unowned transport and search-eval reds - mount conformance: fixture children search only /usr/bin:/bin, where an npm-installed ast-grep never lives, so the daemon hid ast_grep_rewrite. Hand the child the test's ast-grep through TRACEDECAY_AST_GREP_BIN. - search-eval train ranking receipt: 73ed289eab (row-block preface scoring) and 507d91cb74 (Rust call binding) reordered tail candidates of train-027 and train-034. Every quality metric and per-query status is identical to the pin, so re-pin the receipt. Fixes #2635 Fixes #2474 --- .../query-lexical-graph-workload-v1.json | 2 +- .../v2_surface_mount_conformance.rs | 26 +++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/crates/tracedecay-query/assets/runtime-root/tests/fixtures/search_quality/query-lexical-graph-workload-v1.json b/crates/tracedecay-query/assets/runtime-root/tests/fixtures/search_quality/query-lexical-graph-workload-v1.json index c63ede89b7..51e51df880 100644 --- a/crates/tracedecay-query/assets/runtime-root/tests/fixtures/search_quality/query-lexical-graph-workload-v1.json +++ b/crates/tracedecay-query/assets/runtime-root/tests/fixtures/search_quality/query-lexical-graph-workload-v1.json @@ -133,7 +133,7 @@ } ], "expected_query_fallback_digests": { - "train": "sha256:3a9ac57b8868d65a89b0475be25d49e2b6fab779fe1c55af519889b2dc7064db", + "train": "sha256:b25e8f6c5fa1b1da422a35b1fb1510b430797dbce898277cbf7995796c437d22", "validation": "sha256:49a204a7466f12859e5e1a4e5424ed5d2b9e3581855631256bfed6a08303e543" }, "profile_matrix": [ diff --git a/crates/tracedecay/tests/transport_acceptance_suite/v2_surface_mount_conformance.rs b/crates/tracedecay/tests/transport_acceptance_suite/v2_surface_mount_conformance.rs index 08479df929..f26c222241 100644 --- a/crates/tracedecay/tests/transport_acceptance_suite/v2_surface_mount_conformance.rs +++ b/crates/tracedecay/tests/transport_acceptance_suite/v2_surface_mount_conformance.rs @@ -55,6 +55,7 @@ use tracedecay_api::{ is_http_application_operation_exposed, }; use tracedecay_contracts::catalog_composition::build_application_catalog_snapshot; +use tracedecay_runtime_core::ast_grep::AST_GREP_BIN_ENV; use tracedecay_session_memory::event_lane::ActivityFamilyV1; use tracedecay_tool_catalog::{ ApplicationSurfaceOperation, BindingSurface, CapabilityManifestV1, CatalogSnapshotV1, @@ -204,7 +205,9 @@ impl MountFixture { ); common::initialize_tracedecay_cli_project(&home, &project); - let daemon = common::spawn_tracedecay_daemon(&home); + let daemon = common::spawn_tracedecay_daemon_with(&home, |command| { + command.env(AST_GREP_BIN_ENV, ast_grep_executable()); + }); let authority = wait_for_http_authority(&common::daemon_authority_path(&profile)); let context = run_ok( @@ -254,8 +257,27 @@ impl MountFixture { fn isolated_command(home: &Path) -> Command { let mut command = common::tracedecay_command_with_home(home); - command.env("TRACEDECAY_TEST_ALLOW_INCOMPLETE_HOLDER_SCAN", "1"); command + .env("TRACEDECAY_TEST_ALLOW_INCOMPLETE_HOLDER_SCAN", "1") + .env(AST_GREP_BIN_ENV, ast_grep_executable()); + command +} + +/// The ast-grep executable the source-edit bindings are graded against. +/// +/// A fixture child's PATH is the system directories only, and an npm-installed +/// ast-grep never lives there, so the child is handed the test process's own +/// executable through the product's explicit override instead. +fn ast_grep_executable() -> PathBuf { + let name = format!("ast-grep{}", std::env::consts::EXE_SUFFIX); + std::env::var_os(AST_GREP_BIN_ENV) + .map(PathBuf::from) + .or_else(|| { + std::env::split_paths(&std::env::var_os("PATH")?) + .map(|dir| dir.join(&name)) + .find(|path| path.is_file()) + }) + .expect("ast-grep must be on the test PATH to grade the ast-grep bindings") } fn wait_for_http_authority(path: &Path) -> Value {