docs(joinir): Phase 70-A - Relay Runtime Guard (dev-only)

Phase 66で analysis/plan層はmultihop受理可能になったが、runtime lowering
(実行導線)はまだ未対応。このPhaseでは「未対応は同じタグで必ず落ちる」を
docs + テストで固定する。

Key changes:
- phase70-relay-runtime-guard.md: Runtime guard設計doc新規追加
  - 現状(plan OK / runtime NG)の明確化
  - Fail-Fastタグ [ownership/relay:runtime_unsupported] の標準化
  - Phase 70-B以降の解除条件

- pattern3_with_if_phi.rs: エラーメッセージのタグ統一
  - [ownership/relay:runtime_unsupported] 形式に変更
  - var/owner_scope/relay_path の診断情報追加

- normalized_joinir_min.rs: 固定テスト追加
  - test_phase70a_multihop_relay_runtime_unsupported_tag
  - Plan層のmultihop受理確認 + runtime拒否の文書化

Tests: normalized_dev 50/50 PASS (+1), lib 950/950 PASS

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-13 02:22:29 +09:00
parent 795d68ecf1
commit 7b56a7c01d
5 changed files with 174 additions and 8 deletions

View File

@ -306,9 +306,11 @@ impl MirBuilder {
///
/// # Checks
///
/// 1. **Multi-hop relay rejection**: `relay_path.len() > 1` → Err (out of scope)
/// 1. **Multi-hop relay rejection**: `relay_path.len() > 1` → Err with `[ownership/relay:runtime_unsupported]` tag
/// 2. **Carrier set consistency**: plan carriers vs existing carriers (warn-only)
/// 3. **Condition captures consistency**: plan captures vs condition bindings (warn-only)
///
/// Phase 70-A: Standardized error tag for runtime unsupported patterns.
#[cfg(feature = "normalized_dev")]
fn check_ownership_plan_consistency(
plan: &crate::mir::join_ir::ownership::OwnershipPlan,
@ -318,11 +320,12 @@ fn check_ownership_plan_consistency(
use std::collections::BTreeSet;
// Check 1: Multi-hop relay is rejected (Fail-Fast)
// Tag: [ownership/relay:runtime_unsupported] - standardized for Phase 70-A
for relay in &plan.relay_writes {
if relay.relay_path.len() > 1 {
return Err(format!(
"Phase 64 limitation: multi-hop relay not supported. Variable '{}' has relay path length {}",
relay.name, relay.relay_path.len()
"[ownership/relay:runtime_unsupported] Multihop relay not executable yet: var='{}', owner={:?}, relay_path={:?}",
relay.name, relay.owner_scope, relay.relay_path
));
}
}