Skip to content

test: repair unowned transport and search-eval reds - #2642

Merged
ScriptedAlchemy merged 1 commit into
masterfrom
fleet/redaction-json-master-reds-3
Sep 29, 2026
Merged

ScriptedAlchemy merged 1 commit into
masterfrom
fleet/redaction-json-master-reds-3

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Fixes #2635
Fixes #2474

Repairs the unowned master reds in runtime_acceptance_suite and transport_acceptance_suite. Each suite was run the way CI's partitions build it: root-journeys for runtime, root-transport for transport. The third unowned red, workflow_json_preserves_a_typed_application_problem_envelope (#2634), was fixed on master by #2637 while this was in flight, so it was dropped here in the rebase.

1. v2_surface_mount_conformance::every_catalog_binding_is_mounted_on_its_declared_surface (#2635): fixture environment

Since #2447, fixture children search only the fake-host dir plus /usr/bin:/bin. The daemon resolves ast-grep from TRACEDECAY_AST_GREP_BIN, then PATH, then /usr/local/bin, /opt/homebrew/bin, /usr/bin, /bin. An npm-installed ast-grep (CI's install-ast-grep action runs npm install --global; locally it's ~/.local/bin) is in none of those, so the daemon correctly hides ast_grep_rewrite and the sweep fails. The product behavior is right. The fixture now hands its daemon and CLI children the test process's own ast-grep through the product's explicit TRACEDECAY_AST_GREP_BIN override, which is one exact executable rather than a widened PATH. If no ast-grep is on the test PATH, it fails with a clear prerequisite message.

Before (test file from master, same build):

test v2_surface_mount_conformance::every_catalog_binding_is_mounted_on_its_declared_surface ... FAILED
2 of 501 catalog-declared bindings are not reachable on the surface they declare.
  cli:ast_grep_rewrite (...): absent from the `tracedecay tool` command listing
  mcp:ast_grep_rewrite (...): tracedecay_ast_grep_rewrite is absent from the live MCP server's tools/list answer

After: transport_acceptance_suite 15 passed, 0 failed.

2. search_eval_cli_test::compare_reports_the_lexical_baselines_conceptual_misses (#2474): intended ranking change, re-pinned with quality evidence

expected_query_fallback_digests.train no longer matched. I bisected with the evaluator built at each commit (same root-journeys selection, separate checkout and target dir) and found two movers, both intended product changes:

commit train receipt
73ed289eab^ sha256:3a9ac57b… (pin, matches)
73ed289eab perf(search)!: score lexical candidates from a row-block preface sha256:94905f6e… (the value #2474 reported)
507d91cb74^ sha256:94905f6e…
507d91cb74 fix(code-index): bind Rust calls in macros and in-file paths (#2588) sha256:b25e8f6c… (master)

The validation receipt (49a204a7…) never moved.

Quality held. tracedecay-search-eval compare --profiles query-fallback at the pin commit 1fe441558f and on master give identical results:

train      BASE failed 10 mrr 534946 ndcg 538100 recall 21/38 prec 33/153 prot 8/8 dup 0
train      MSTR failed 10 mrr 534946 ndcg 538100 recall 21/38 prec 33/153 prot 8/8 dup 0
validation BASE failed 6  mrr 626111 ndcg 648443 recall 25/35 prec 39/153 prot 7/7 dup 0
validation MSTR failed 6  mrr 626111 ndcg 648443 recall 25/35 prec 39/153 prot 7/7 dup 0

Every per-query field (status, first_useful_rank, returned_candidates, quality) is identical. generate-candidates shows exactly two train queries differ, and only in non-relevant tail positions:

  • train-027 positions 1–2: RepositoryEvidenceV1::remote_identity gives way to tests::project_and_worktree_aliases_do_not_define_repository_identity and RepositoryRemoteIdentityV1
  • train-034 position 1: RemoteShardCoverageV1::has_fresh_cache_at becomes RemoteShardCoverageV1::validate

The pin is updated to sha256:b25e8f6c5fa1b1da422a35b1fb1510b430797dbce898277cbf7995796c437d22. The workload digest excludes receipts, so nothing else moves.

After: runtime_acceptance_suite 135 passed, 0 failed. tracedecay-search-eval --lib 36 passed, which includes report_tests::baseline_report_retains_raw_fallback_current_and_exact_ten_x_samples from #2474.

Owned failures seen in the same runs (not touched here)

Checks (rebased on efa7d7c)

- 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: 73ed289 (row-block preface
  scoring) and 507d91c (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
@changeset-bot

changeset-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b929a5b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T13:40:37.640950Z b929a5b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ScriptedAlchemy
ScriptedAlchemy merged commit a301a2c into master Sep 29, 2026
6 of 7 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the fleet/redaction-json-master-reds-3 branch September 29, 2026 13:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b929a5bc7f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve the Windows npm launcher before passing it to children

On the Windows root-transport partition, .github/actions/install-ast-grep/action.yml installs @ast-grep/cli globally, which exposes npm's ast-grep.cmd launcher; the production resolver explicitly handles this launcher in tracedecay-runtime-core/src/ast_grep.rs. This lookup instead probes only ast-grep.exe directly in each PATH directory, so the standard Windows CI installation is not found and the conformance test panics before starting. Use a PATHEXT-aware lookup and translate the npm launcher to its packaged native executable, as the product resolver does.

AGENTS.md reference: AGENTS.md:L209-L209

Useful? React with 👍 / 👎.

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.

test(transport): mount conformance loses ast-grep to the hermetic PATH test(search-eval): query-fallback ranking receipt drifted on master

1 participant