Files
hakorune/tools/smokes/v2
nyash-codex ebda07b65d feat(selfhost): Phase 120 selfhost Stage-3 baseline establishment
## Phase 120: selfhost Stage-3 代表パスの安定化 (完了)

### 概要
Phase 106-115完了時点でのselfhost経路(Stage-3 .hakoコンパイラ)の
動作ベースラインを確立。実装修正なし、現状記録のみ。

### 完了タスク
-  代表パス選定: 3つの.hakoファイル選定完了
  - peek_expr_block.hako (match式・ブロック式)
  - loop_min_while.hako (ループ・PHI命令)
  - esc_dirname_smoke.hako (複雑制御構造・StringBox)
-  期待フロー整理: JoinIR Strict モード説明ドキュメント作成
-  実行調査完了: NYASH_JOINIR_STRICT=1 での動作確認
-  ベースライン確立: 詳細実行結果記録
-  スモークスクリプト作成: integration profileに統合

### 実行結果
-  完全成功: 2/3 (peek_expr_block, loop_min_while)
- ⚠️ 既知問題: 1/3 (esc_dirname_smoke - ConsoleBox.println解決失敗)

### JoinIR Strict検証結果
-  If Lowering 動作
-  Loop Lowering 動作
-  PHI命令生成
-  ControlForm構造生成
-  StringBox操作
-  ConsoleBox.println (メソッド解決失敗)

### Phase 122+への課題
**高優先度**:
- ConsoleBox.printlnメソッド解決エラー修正

**中優先度**:
- NYASH_PARSER_STAGE3非推奨警告対応

**低優先度**:
- builtin Box プラグイン移行検討

### 技術的成果
- Phase 106-115の安定性確認完了
- JoinIR Lowering動作確認
- 明確なPhase 122+タスクリスト確立
- 回帰検証可能なテスト整備

### ファイル構成
**新規作成**:
- docs/development/current/main/phase120_selfhost_stable_paths.md (指示書)
- docs/development/current/main/selfhost_stage3_expected_flow.md (期待フロー)
- docs/development/current/main/phase120_baseline_results.md (ベースライン結果)
- tools/smokes/v2/profiles/integration/selfhost/phase120_stable_paths.sh (スモークテスト)

**修正**:
- CURRENT_TASK.md (Phase 120完了記録追加)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 04:30:30 +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_* トグルは非推奨)