071 module wildcard concrete

✗ Failing This test is currently failing.

Failed: output

Failure Output

🎯 Compiler coordination: Passes: 13 (flow-based: frontend, analysis, emission)

Code

// Test: Module Wildcard Tap with Metatype
//
// Demonstrates that module wildcard taps (input:*) must use metatypes
// like Profile, Transition, or Audit (not concrete branches).
//
// With metatype, the tap can observe any event in the module/branch combination
// and access the Profile metadata (source, branch, destination).

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

~import "$app/test_lib/logger"

~event hello {}

~event goodbye {}

~proc goodbye {
    std.debug.print("Goodbye\n", .{});
}

~proc goodbye {
    std.debug.print("Goodbye\n", .{});
    return .{ .done = .{} };
}

// Module wildcard tap observes all events in input module with metatype
~tap(input:* -> *)
| Profile p |> app.test_lib.logger:log(msg: p.source)

~hello() |> goodbye()
input.kz

Expected

Hello
[TAP] input:hello
[TAP] input:hello
[TAP] input:hello
Goodbye
[TAP] input:goodbye
[TAP] input:goodbye
[TAP] input:goodbye

Actual

[TAP] koru:start
[TAP] std.taps:tap
[TAP] koru:start
[TAP] app.test_lib.logger:log
[TAP] input:hello
[TAP] std.taps:tap
[TAP] input:hello
[TAP] app.test_lib.logger:log
Goodbye
[TAP] input:goodbye
[TAP] std.taps:tap
[TAP] input:goodbye
[TAP] app.test_lib.logger:log
[TAP] koru:end
[TAP] std.taps:tap
[TAP] koru:end
[TAP] app.test_lib.logger:log

Imported Files

// Logger for module wildcard tap test

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

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

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

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

Test Configuration

MUST_RUN