Skip to content

Test harness: span capture can miss events under cargo test, and two benches time their TempDir drop #2070

Open

Description

@aaj3f

Two harness problems that make our gates read better than they are, both deferred from the PRs that ran into them. Neither is product code, but the first is the kind of false-fail that lands on whoever runs the gates next, and the fast-path suites' routing stamps (MustFire / MustNotFire) only mean something if span capture sees every event.

From #2008 (Follow-ups: the racy span-capture tests; the two benches) and #2010 (Not changed here: the span-capture harness).

Activity

  1. added
    bugSomething isn't working as expected
    P3Backlog: valid, low payoff-per-effort
    area:queryQuery execution, planning, fast paths, overlay, result formatting
    on Oct 12, 2026
  2. aaj3f commented on Oct 13, 2026

    @aaj3f
    ContributorAuthor

    Three more sightings of the first item, all local cargo test runs, each passing on every rerun. Each failure is a routing-stamp check whose span capture saw no events at all:

    • it_jsonld_join_batched_lane::jsonld_join_takes_batched_subject_probe_like_sparql (grp_query): left: [], once in a full-binary run; 5/5 alone and 3/3 full reruns pass.
    • it_policy_predicate_fast_lanes::class_rule_declines_covered_predicate (grp_policy): stamps: []; 140/140 on three reruns.
    • it_query_optional_encoded_bindings::cypher_optional_match_reverse_edge_over_encoded_values (grp_query): stamps: [], in a run filtered to that one module, where nothing touches the fast-path kill switch.

    The third one makes the kill switch (it_differential_fastpath flipping set_fast_paths_disabled) a weaker suspect than it looks, and the failures cross test binaries. The likelier common cause is the capture harness itself: support::span_capture::init_test_tracing installs a thread-local subscriber (tracing::subscriber::set_default), while plain cargo test runs a binary's tests on concurrent threads that share one process and tracing's per-callsite interest cache. CI runs cargo nextest (one process per test), so it can't happen there; it's local-only.

    A cheap discriminator: loop grp_query under cargo test -- --test-threads=1 versus the default thread count, with the kill-switch test filtered out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Backlog: valid, low payoff-per-effortarea:queryQuery execution, planning, fast paths, overlay, result formattingbugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions