072 event wildcard concrete

✓ Passing This code compiles and runs correctly.

Code

// Test: Event Wildcard Tap with Metatype
//
// Demonstrates that event wildcard taps (*:compute) must use metatypes
// like Profile, Transition, or Audit (not concrete branches).
//
// With metatype, the tap can observe any event named "compute" across modules
// and access the Profile metadata (source, branch, destination).

const std = @import("std");
~import "$std/taps"

~import "$app/test_lib/logger"

~event compute { x: i32 }
| result { value: i32 }

~proc compute {
    return .{ .result = .{ .value = x * 2 } };
}

// Event wildcard tap observes all compute events with metatype
~tap(*:compute -> *)
| Profile p |> app.test_lib.logger:log(msg: p.source)
    | done |> _

~compute(x: 42)
| result _ |> _
input.kz

Expected Output

[TAP] input:compute
[TAP] app.test_lib.logger:log

Imported Files

// Logger for event wildcard tap test

const std = @import("std");
~import "$std/taps"

~pub event log { msg: []const u8 }
| done {}

~proc log {
    std.debug.print("[TAP] {s}\n", .{msg});
    return .{ .done = .{} };
}

// Event wildcard tap using metatype (valid usage)
~tap(*:log -> *)
| Profile p |> log(msg: p.source)
    | done |> _
test_lib/logger.kz

Test Configuration

MUST_RUN