052 reject user event in kernel

✗ Failing This test is currently failing.

Failed: backend-exec

Error Details

output_emitted.zig:6:16: error: kernel:init requires | computed |> branch — without it, kernel results are trapped inside the kernel scope

Failure Output

🎯 Compiler coordination: Passes: 13 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:6:16: error: kernel:init requires | computed |> branch — without it, kernel results are trapped inside the kernel scope
    comptime { @compileError("kernel:init requires | computed |> branch — without it, kernel results are trapped inside the kernel scope"); }
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    main_module: output_emitted.zig:4:25
    main: output_emitted.zig:169:5
    4 reference(s) hidden; use '-freference-trace=6' to see all references

Code

// TEST: aspirational - arbitrary user events should be rejected inside kernel scope

~import "$std/kernel"

~std.kernel:shape(Body) {
    mass: f64,
}

~event print_mass { value: f64 }
~proc print_mass {
    const std = @import("std");
    std.debug.print("mass={d}\n", .{value});
}

~std.kernel:init(Body) {
    { mass: 1.0 },
    { mass: 2.0 },
}
| kernel k |>
    std.kernel:self { k.mass *= 2.0 }
    |> print_mass(value: k.ptr[0].mass)
input.kz

Test Configuration

Post-validation Script:

#!/usr/bin/env bash
set -euo pipefail

echo "ASPIRATIONAL FAILURE: kernel scope still permits arbitrary user events."
echo "Future behavior should reject: unsupported invocation 'print_mass' inside kernel scope"
exit 1