009 cross module mock

○ Planned This feature is planned but not yet implemented.

OWED: a cross-module mock satisfies post-validation.

Failure Output

Showing last 10 of 23 lines
[TEST]       invocation: process-config
[TEST]   [1] event_decl
[TEST]   [2] flow
[TEST]       invocation: read-lines
[TEST]   [3] inline_code
[TEST]       code: const test_Cross_module_mock_with_failed_branch_mo...
[TEST]   [4] immediate_impl
[TEST] Found 1 transformed flows
[TEST] Purity walk complete, 0 impure events
🎯 Compiler coordination: Passes: 20 (flow-based: elaborate, analysis, emission)

Code

input.k

Flows

subflow ~process-config click a branch to expand · @labels scroll to their anchor
read-lines (path)
flow ~test click a branch to expand · @labels scroll to their anchor
test (Cross-module mock with failed branch, source: // Mock the external module's event with the 'failed' branch // This returns a simple string ([]const u8), which works without array literals std/fs:read-lines => failed "mocked file read error" process-config(path: "/this/file/does/not/exist.txt") | ok _ |> assert.fail() | failed result |> assert(result.len > 0))
flow ~test click a branch to expand · @labels scroll to their anchor
test (Cross-module mock should return 3 lines, source: std/fs:read-lines => done 3 process-config(path: "/fake/path") | ok result |> assert(result == 3) | failed |> assert.fail())

Test Configuration

Post-validation Script: