✓
Passing This code compiles and runs correctly.
Code
// Test 624: Destination Scoping with Wildcards
// Validates that destination patterns match visible events in scope
// Pattern ~tap(* -> file.write) observes ALL sources calling file.write
const std = @import("std");
~import std/taps
~tor file.read {}
~proc file.read|zig {
}
~tor file.write {}
~proc file.write|zig {
std.debug.print("Writing\n", .{});
}
~tor network.fetch {}
~proc network.fetch|zig {
}
~tor logger { caller: string }
~proc logger|zig {
std.debug.print("write called from: {s}\n", .{caller});
}
// Observe ALL sources calling file.write
~tap(* -> file.write)
| Profile p |> logger(caller: p.source)
~file.read() |> file.write() |> network.fetch() |> file.write()
Actual
write called from: input:file.read
Writing
write called from: input:network.fetch
Writing
Expected output
write called from: input:file.read
Writing
write called from: input:network.fetch
Writing
Flows
flow ~tap click a branch to expand · @labels scroll to their anchor
tap (* -> file.write)
flow ~file.read click a branch to expand · @labels scroll to their anchor
file.read
Test Configuration
MUST_RUN