diff --git a/docs/development/current/main/10-Now.md b/docs/development/current/main/10-Now.md index ec479ad4..8109a43c 100644 --- a/docs/development/current/main/10-Now.md +++ b/docs/development/current/main/10-Now.md @@ -3,7 +3,7 @@ ## Current Focus - Phase: `docs/development/current/main/phases/phase-29ao/README.md` -- Next: Phase 29ao P35(TBD) +- Next: Phase 29ao P36(TBD) ## Gate (SSOT) diff --git a/docs/development/current/main/30-Backlog.md b/docs/development/current/main/30-Backlog.md index 1cf41408..2f771db8 100644 --- a/docs/development/current/main/30-Backlog.md +++ b/docs/development/current/main/30-Backlog.md @@ -5,7 +5,7 @@ Scope: 「次にやる候補」を短く列挙するメモ。入口は `docs/dev ## Active -- CorePlan migration: `docs/development/current/main/phases/phase-29ao/README.md`(Next: P35 TBD) +- CorePlan migration: `docs/development/current/main/phases/phase-29ao/README.md`(Next: P36 TBD) ## Near-Term Candidates diff --git a/docs/development/current/main/design/coreplan-migration-roadmap-ssot.md b/docs/development/current/main/design/coreplan-migration-roadmap-ssot.md index 23f10e24..95b01b33 100644 --- a/docs/development/current/main/design/coreplan-migration-roadmap-ssot.md +++ b/docs/development/current/main/design/coreplan-migration-roadmap-ssot.md @@ -34,8 +34,8 @@ Related: ## 1.1 Current (active) - Active phase: `docs/development/current/main/phases/phase-29ao/README.md` -- Next step: Phase 29ao P35 (TBD) -- After P35: TBD +- Next step: Phase 29ao P36 (TBD) +- After P36: TBD ## 2. すでに固めた SSOT(再発防止の土台) diff --git a/docs/development/current/main/design/coreplan-shadow-adopt-tag-coverage-ssot.md b/docs/development/current/main/design/coreplan-shadow-adopt-tag-coverage-ssot.md new file mode 100644 index 00000000..1b7d13c1 --- /dev/null +++ b/docs/development/current/main/design/coreplan-shadow-adopt-tag-coverage-ssot.md @@ -0,0 +1,54 @@ +--- +Status: SSOT +Scope: strict/dev の CorePlan shadow-adopt 観測(タグ)の必須/禁止と回帰スモーク対応 +Related: +- docs/development/current/main/phases/phase-29ae/README.md +- docs/development/current/main/phases/phase-29ao/README.md +- docs/development/current/main/design/coreplan-migration-roadmap-ssot.md +--- + +# CorePlan shadow-adopt tag coverage (SSOT) + +目的: “strict/dev の shadow adopt が踏まれた/踏まれていない” を、回帰スモークで安定に固定する。 + +## 前提 + +- タグは strict/dev の診断・観測用途であり、release の既定挙動を変えない。 +- 一部のスモークは `filter_noise` によりタグが落ちるため、タグ検証は raw output を参照する。 + +## Tag vocabulary (SSOT) + +- Pattern1: `[coreplan/shadow_adopt:pattern1_simplewhile]` +- Pattern2: `[coreplan/shadow_adopt:pattern2_break_subset]` +- Pattern3: `[coreplan/shadow_adopt:pattern3_ifphi]` +- Pattern5: `[coreplan/shadow_adopt:pattern5_infinite_early_exit]` +- Pattern6: `[coreplan/shadow_adopt:pattern6_scan_with_init]` +- Pattern7: `[coreplan/shadow_adopt:pattern7_split_scan]` + +## Required tags (positive gates) + +| Scenario | Smoke | Tag | +|---|---|---| +| Pattern1 strict shadow adopt | `tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern1_strict_shadow_vm.sh` | `pattern1_simplewhile` | +| Pattern2 break subset (planner) | `tools/smokes/v2/profiles/integration/apps/phase29ai_pattern2_break_plan_subset_ok_min_vm.sh` | `pattern2_break_subset` | +| Pattern2 realworld (phase263) | `tools/smokes/v2/profiles/integration/apps/phase263_pattern2_seg_realworld_min_vm.sh` | `pattern2_break_subset` | +| Pattern2 loopbodylocal (2 cases) | `tools/smokes/v2/profiles/integration/apps/phase29ab_pattern2_loopbodylocal_min_vm.sh` | `pattern2_break_subset` | +| Pattern2 loopbodylocal seg (2 cases) | `tools/smokes/v2/profiles/integration/apps/phase29ab_pattern2_loopbodylocal_seg_min_vm.sh` | `pattern2_break_subset` | +| Pattern3 If-Phi | `tools/smokes/v2/profiles/integration/apps/phase118_pattern3_if_sum_vm.sh` | `pattern3_ifphi` | +| Pattern5 strict shadow adopt | `tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern5_strict_shadow_vm.sh` | `pattern5_infinite_early_exit` | +| Pattern6 strict shadow adopt | `tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern6_strict_shadow_vm.sh` | `pattern6_scan_with_init` | +| Pattern7 strict shadow adopt | `tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern7_strict_shadow_vm.sh` | `pattern7_split_scan` | + +## Forbidden tags (negative gates) + +| Scenario | Smoke | Forbidden tag | +|---|---|---| +| Pattern2 NotApplicable | `tools/smokes/v2/profiles/integration/apps/phase29ab_pattern2_seg_notapplicable_min_vm.sh` | `pattern2_break_subset` | +| Pattern2 Freeze | `tools/smokes/v2/profiles/integration/apps/phase29ab_pattern2_seg_freeze_min_vm.sh` | `pattern2_break_subset` | +| Pattern1 subset reject (extra stmt) | `tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern1_subset_reject_extra_stmt_vm.sh` | `pattern1_simplewhile` | + +## Gate (SSOT) + +- Integration gate: + - `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh` + - このパックに “positive/negative” のタグ検証が含まれていることが前提。 diff --git a/docs/development/current/main/design/planfrag-ssot-registry.md b/docs/development/current/main/design/planfrag-ssot-registry.md index 5a751d49..8abd5fc0 100644 --- a/docs/development/current/main/design/planfrag-ssot-registry.md +++ b/docs/development/current/main/design/planfrag-ssot-registry.md @@ -27,6 +27,7 @@ Scope: JoinIR plan/frag 導線(仕様不変) - Plan/Frag overview: `docs/development/current/main/design/edgecfg-fragments.md` - Pattern6/7 contracts: `docs/development/current/main/design/pattern6-7-contracts.md` - CorePlan Skeleton/Feature model: `docs/development/current/main/design/coreplan-skeleton-feature-model.md` +- Shadow-adopt tag coverage SSOT: `docs/development/current/main/design/coreplan-shadow-adopt-tag-coverage-ssot.md` - Post-PHI final form SSOT: `docs/development/current/main/design/post-phi-final-form-ssot.md` - Effect classification SSOT: `docs/development/current/main/design/effect-classification-ssot.md` - ExitKind/Cleanup/Effect contract SSOT: `docs/development/current/main/design/exitkind-cleanup-effect-contract-ssot.md` diff --git a/docs/development/current/main/phases/phase-29ae/README.md b/docs/development/current/main/phases/phase-29ae/README.md index c86bc9c7..39cad6d8 100644 --- a/docs/development/current/main/phases/phase-29ae/README.md +++ b/docs/development/current/main/phases/phase-29ae/README.md @@ -22,6 +22,7 @@ Goal: JoinIR の最小回帰セットを SSOT として固定する。 - phase286_pattern9_* は plugins disabled 経路の mismatch があるため legacy pack 側で SKIP(phase29ae pack には含めない) - shadow adopt tag(`[coreplan/shadow_adopt:*]`)は `filter_noise` で除去される - タグ検証が必要な smoke は raw output(filter 前)を参照する +- タグ coverage SSOT: `docs/development/current/main/design/coreplan-shadow-adopt-tag-coverage-ssot.md` ## Header PHI Entry/Latch Contract (SSOT) diff --git a/docs/development/current/main/phases/phase-29ao/P35-SHADOW-ADOPT-TAG-COVERAGE-SSOT-AND-PATTERN1-NEGATIVE-GATE-INSTRUCTIONS.md b/docs/development/current/main/phases/phase-29ao/P35-SHADOW-ADOPT-TAG-COVERAGE-SSOT-AND-PATTERN1-NEGATIVE-GATE-INSTRUCTIONS.md new file mode 100644 index 00000000..774ed6aa --- /dev/null +++ b/docs/development/current/main/phases/phase-29ao/P35-SHADOW-ADOPT-TAG-COVERAGE-SSOT-AND-PATTERN1-NEGATIVE-GATE-INSTRUCTIONS.md @@ -0,0 +1,72 @@ +--- +Status: Ready +Scope: strict/dev の shadow adopt 観測を SSOT 化し、negative ケースを回帰で固定する(仕様不変) +Related: +- docs/development/current/main/phases/phase-29ao/README.md +- docs/development/current/main/phases/phase-29ae/README.md +- docs/development/current/main/design/coreplan-shadow-adopt-tag-coverage-ssot.md +--- + +# Phase 29ao P35: Shadow-adopt tag coverage SSOT + Pattern1 negative gate + +## 目的 + +- strict/dev の shadow adopt は「通った/通ってない」が出力で観測できるが、回帰で “どの smoke が何を保証するか” が曖昧になりやすい。 +- P35 は「タグの必須/禁止」の責務と対応 smoke を SSOT として固定し、抜けを 1 件(Pattern1 subset reject)埋める。 + +## 非目的 + +- release の既定挙動・エラー文字列・恒常ログの変更 +- 新しい環境変数追加 +- by-name のパターン名分岐追加 + +## 成果物 + +1. SSOT 追加(表形式) + - `docs/development/current/main/design/coreplan-shadow-adopt-tag-coverage-ssot.md` +2. negative gate 追加(Pattern1 subset reject) + - `tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern1_subset_reject_extra_stmt_vm.sh` +3. 参照導線の追記(任意) + - `docs/development/current/main/design/planfrag-ssot-registry.md` + +## 実装手順 + +### Step 1: coverage SSOT を追加 + +- 新規作成: + - `docs/development/current/main/design/coreplan-shadow-adopt-tag-coverage-ssot.md` +- 内容: + - “必須タグ / 禁止タグ / 対応 smoke / raw output 参照の理由” を 1 枚にまとめる + +### Step 2: Pattern1 subset reject を negative gate にする + +- 変更: + - `tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern1_subset_reject_extra_stmt_vm.sh` +- 追加するチェック: + - strict/dev 実行の raw output に `[coreplan/shadow_adopt:pattern1_simplewhile]` が出たら FAIL + - 既存の exit code=3 期待は維持(副作用 drop 誤マッチ検出の本体) + +### Step 3: SSOT registry に参照追加(任意) + +- 更新: + - `docs/development/current/main/design/planfrag-ssot-registry.md` +- `References` に coverage SSOT を 1 行追加 + +### Step 4: Phase 29ao の進捗を更新 + +- 更新: + - `docs/development/current/main/phases/phase-29ao/README.md` + - `docs/development/current/main/10-Now.md` + - `docs/development/current/main/30-Backlog.md` + - `docs/development/current/main/design/coreplan-migration-roadmap-ssot.md`(Next のみ) + +## 検証(必須) + +- `cargo build --release` +- `./tools/smokes/v2/run.sh --profile quick` +- `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh` + +## コミット + +- `git add -A` +- `git commit -m "phase29ao(p35): ssot shadow-adopt tag coverage and pattern1 negative gate"` diff --git a/docs/development/current/main/phases/phase-29ao/README.md b/docs/development/current/main/phases/phase-29ao/README.md index 61c1e84a..d3244469 100644 --- a/docs/development/current/main/phases/phase-29ao/README.md +++ b/docs/development/current/main/phases/phase-29ao/README.md @@ -196,7 +196,12 @@ Gate(SSOT): - 指示書: `docs/development/current/main/phases/phase-29ao/P34-PATTERN2-NEGATIVE-SHADOW-ADOPT-TAG-GATES-INSTRUCTIONS.md` - ねらい: `phase29ab_pattern2_seg_{freeze,notapplicable}` で shadow adopt タグが出ないことを回帰で固定(仕様不変) +## P35: Shadow-adopt tag coverage SSOT + Pattern1 negative gate ✅ + +- 指示書: `docs/development/current/main/phases/phase-29ao/P35-SHADOW-ADOPT-TAG-COVERAGE-SSOT-AND-PATTERN1-NEGATIVE-GATE-INSTRUCTIONS.md` +- ねらい: タグ必須/禁止を SSOT 化し、Pattern1 subset reject の negative gate を回帰で固定(仕様不変) + ## Next(planned) -- Next: P35(TBD) -- After P35: TBD +- Next: P36(TBD) +- After P36: TBD diff --git a/tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern1_subset_reject_extra_stmt_vm.sh b/tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern1_subset_reject_extra_stmt_vm.sh index 1f94f62e..8b7fe3fa 100644 --- a/tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern1_subset_reject_extra_stmt_vm.sh +++ b/tools/smokes/v2/profiles/integration/joinir/phase29ao_pattern1_subset_reject_extra_stmt_vm.sh @@ -12,6 +12,7 @@ require_env || exit 2 FIXTURE="$NYASH_ROOT/apps/tests/phase29ao_pattern1_subset_reject_extra_stmt.hako" RUN_TIMEOUT_SECS=${RUN_TIMEOUT_SECS:-10} +SHADOW_TAG='[coreplan/shadow_adopt:pattern1_simplewhile]' set +e OUTPUT=$(timeout "$RUN_TIMEOUT_SECS" env NYASH_DISABLE_PLUGINS=1 HAKO_JOINIR_STRICT=1 "$NYASH_BIN" --backend vm "$FIXTURE" 2>&1) @@ -29,5 +30,11 @@ if [ "$EXIT_CODE" -ne 3 ]; then exit 1 fi +if echo "$OUTPUT" | grep -qF "$SHADOW_TAG"; then + log_error "phase29ao_pattern1_subset_reject_extra_stmt_vm: shadow adopt tag must not appear: $SHADOW_TAG" + echo "$OUTPUT" + exit 1 +fi + log_success "phase29ao_pattern1_subset_reject_extra_stmt_vm: PASS (exit=3)" exit 0