✓
Passing This code compiles and runs correctly.
Code
// Test 430_001: Cross-Module Override (No Delegation)
// Override coordinator with immediate error - completely replaces the default.
// No call to .default, so the default pipeline never runs.
//
// This proves cross-module overrides work without delegation.
~import "$std/compiler"
// Override coordinate - just return error immediately
// Cross-module subflow override: the colon in the path makes it an impl.
~std.compiler:coordinate = error { message: "Testing!" }
// Some test code (doesn't matter - coordinator will error immediately)
~event test {} | done {}
~proc test { return .{ .done = .{} }; }
Error Verification
Expected Error Pattern
Expected: Backend fails with "Compiler coordination error: Testing!"
This test proves cross-module overrides work - the override returns an error,
which propagates through the coordinator and causes backend execution to fail.Actual Compiler Output
❌ Compiler coordination error: Testing!
error: CompilerCoordinationFailed
/Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/430_COORDINATION/430_001_user_coordinator/backend.zig:9340:17: 0x102282433 in emit (backend)
return error.CompilerCoordinationFailed;
^
/Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/430_COORDINATION/430_001_user_coordinator/backend.zig:9424:28: 0x102282d9f in main (backend)
const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
^Test Configuration
MUST_RUN MUST_FAIL
Post-validation Script:
#!/bin/bash
# Verify that the custom coordinator ran by checking for its metrics string
if grep -q "User-controlled pipeline: 3 passes" backend.err; then
echo "✓ Custom coordinator metrics found in backend.err"
exit 0
else
echo "✗ Custom coordinator metrics NOT found - default coordinator may have run instead!"
exit 1
fi