test(joinir): Phase 125 P5 fixture + smoke (VM, structure-only)

Phase 125 P5: Integration smoke test
- fixture: apps/tests/phase125_if_only_return_readonly_input_min.hako
  - Expected: 7 (return x from reads-only input)
  - Note: Demonstrates structure, full functionality needs P3 wiring
- smoke: tools/smokes/v2/profiles/integration/apps/phase125_if_only_return_input_vm.sh
  - NYASH_JOINIR_DEV=1 HAKO_JOINIR_STRICT=1
  - VM backend only

Test results:
- Phase 125 smoke: PASS (exit code 7)
- Regression (Phase 121-124, 118): PASS
  - phase124_if_only_return_var_vm: PASS
  - phase123_if_only_normalized_semantics_vm: PASS
  - phase121_shadow_if_only_vm: PASS (3/3 tests)
  - phase118_loop_nested_if_merge_vm: PASS

Note:
- P3 (available_inputs wiring) not implemented yet
- Fixture uses simple return (no if-only pattern yet)
- Serves as design document for future P3 implementation
- EnvLayout.inputs will be populated when P3 is complete

Ref: docs/development/current/main/phases/phase-125/README.md
This commit is contained in:
nyash-codex
2025-12-18 06:32:10 +09:00
parent 4c98313b58
commit 92b3c2afb5
2 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,25 @@
// Phase 125: If-only return reads-only input minimal test
// Expected: 7 (when P3 available_inputs wiring is complete)
//
// Note: This fixture demonstrates Phase 125 structure
// but won't work until P3 (available_inputs wiring) is implemented.
// For now, this serves as a design document for future implementation.
//
// Design:
// - local x=7 is defined in outer scope (not in if-only)
// - if flag==0 {} doesn't write x (reads-only)
// - return x should resolve from inputs (reads ∩ available_inputs)
static box Main {
main() {
local x
x = 7
// Phase 125 P3: When implemented, this will be an if-only pattern
// that doesn't write x but reads it
// For now, we just use a simple return to demonstrate the expected output
print(x)
return x
}
}