Files
hakorune/tools/smokes/v2
nyash-codex bf81488c67 feat(selfhost): Phase 150 - Selfhost Stage-3 Depth-1 baseline strengthening
Completed all 5 tasks for Phase 150 implementation:

Task 1: Consolidated selfhost pipeline diagram
- Updated selfhost_stage3_expected_flow.md with unified flow diagram
- Documented all stages: Stage-B, Stage-1, Stage-3, dev_verify
- Added +120 lines of detailed pipeline documentation

Task 2: Expanded representative cases (3 → 5)
- Added 3 new test cases:
  - string_method_chain.hako: method chaining (substring().length())
  - joinir_min_loop.hako: loop with break control
  - joinir_if_select_simple.hako: if with early return
- All 5 cases pass with NYASH_FEATURES=stage3 NYASH_USE_NY_COMPILER=1
- Created comprehensive results document (+400 lines)

Task 3: Created selfhost smoke test script
- New: tools/smokes/v2/profiles/integration/selfhost_phase150_depth1_smoke.sh
- Automated testing of all 5 representative cases
- All tests passing:  Passed: 5,  Failed: 0

Task 4: Classified failures for Phase 151+
- Phase 151 (High): ConsoleBox selfhost support (2-3 hours)
  - Affects: esc_dirname_smoke.hako, string_ops_basic.hako
- Phase 152-A (Medium): Parenthesized assignment expression (1-2 hours)
- Phase 152-B (Medium): static method syntax support (1-2 hours)

Task 5: Updated CURRENT_TASK.md
- Added Phase 150 completion entry with full implementation details
- Updated roadmap section with Phase 150 completion
- Documented next steps: Phase 151-152 bug fixes

Results Summary:
- Selfhost depth-1 baseline: 3 → 5 cases (67% increase)
- JoinIR Strict mode: 100% pass rate on all 5 cases
- Smoke test infrastructure: fully automated verification
- Documentation: pipeline diagram + results + failure analysis

🎉 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 12:40:01 +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 NYASH_JOINIR_CORE=1 HAKO_JOINIR_IF_SELECT=1 ./target/release/hakorune apps/tests/joinir_if_select_simple.hakodev-only、CI対象外。旧 IfSelect 用の NYASH_* トグルは非推奨)