Files
hakorune/tools/smokes/v2
nyash-codex 92b3c2afb5 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
2025-12-18 06:32:10 +09:00
..

Smokes v2 — Minimal Runner and Policy

Policy

  • Use [SKIP:] prefix for environment/host dependent skips.
    • Examples: [SKIP] hakorune not built, [SKIP:env] plugin path missing
    • Keep reasons short and stable to allow grep-based canaries.
  • Prefer JSON-only output in CI: set NYASH_JSON_ONLY=1 to avoid noisy logs.
  • Diagnostics lines like [provider/select:*] are filtered by default in lib/test_runner.sh.
    • Toggle: set HAKO_SILENT_TAGS=0 to disable filtering and show raw logs. HAKO_SHOW_CALL_LOGS=1 also bypasses filtering.

Helpers

  • tools/smokes/v2/lib/mir_canary.sh provides:
    • extract_mir_from_output — between [MIR_BEGIN]/[MIR_END]
    • assert_has_tokens, assert_skip_tag, assert_order, assert_token_count
  • tools/lib/canary.sh provides minimal, harness-agnostic aliases:
    • extract_mir_between_tags — same as extract_mir_from_output
    • require_tokens token... — fail if any token missing

Notes

  • Avoid running heavy integration smokes in CI by default. Use --profile quick.
  • When a test depends on external tools (e.g., LLVM), prefer [SKIP:<reason>] over failure.
  • StageB/selfhost canariesstage1_launcher_*, phase251* など)は Stage3 デフォルト環境で安定しないため、quick プロファイルでは [SKIP:stageb] として扱い、必要に応じて別プロファイルintegration/fullで個別に実行する。
  • Selfhost quick カバレッジは最小 1 本(core/selfhost_minimal.shに絞り、Stage3 + JoinIR 前提で StageB→VM を通るかだけを確認する。
  • S3 backend 向けの長尺テスト群も quick 向きではないため、timeout を短く保ちたい場合は [SKIP:slow] にして別途ローカルで回すことを推奨する。

Quick tips

  • EXE-heavy cases (e.g., phase2100/*) may take longer. When running quick with these tests, pass a larger timeout like --timeout 120.
  • Smokes v2 auto-cleans temporary crate EXE objects created under /tmp (pattern: ny_crate_backend_exe_*.o) after the run.

Developer Notes

  • JoinIR If/Select (Phase 33): A/B test with NYASH_FEATURES=stage3 HAKO_JOINIR_IF_SELECT=1 ./target/release/hakorune apps/tests/joinir_if_select_simple.hakodev-only、CI対象外。NYASH_JOINIR_CORE は deprecated/無視)