From 655b968fb47f95b3eb66b1b299a8069607f0faf4 Mon Sep 17 00:00:00 2001 From: tomoaki Date: Mon, 29 Dec 2025 15:00:51 +0900 Subject: [PATCH] phase29ak(p3): remove pattern8 static box filter from single_planner --- CURRENT_TASK.md | 3 ++ docs/development/current/main/10-Now.md | 7 ++- docs/development/current/main/30-Backlog.md | 4 +- ...-PATTERN8-STATICBOX-FILTER-INSTRUCTIONS.md | 45 +++++++++++++++++++ .../current/main/phases/phase-29ak/README.md | 7 +++ .../control_flow/plan/single_planner/rules.rs | 26 ++++------- 6 files changed, 72 insertions(+), 20 deletions(-) create mode 100644 docs/development/current/main/phases/phase-29ak/P3-REMOVE-SINGLE_PLANNER-PATTERN8-STATICBOX-FILTER-INSTRUCTIONS.md diff --git a/CURRENT_TASK.md b/CURRENT_TASK.md index 1bea4df5..71cdebea 100644 --- a/CURRENT_TASK.md +++ b/CURRENT_TASK.md @@ -33,6 +33,9 @@ Pattern1 以外のループで pattern1_simplewhile facts 抽出を抑制。sing **2025-12-29: Phase 29ak P2 COMPLETE (Pattern8 static box filter via planner)** static box では Pattern8 facts 抽出を抑制。single_planner 側の filter は安全策として維持。 +**2025-12-29: Phase 29ak P3 COMPLETE (remove Pattern8 filter in single_planner)** +Pattern8 static box filter を single_planner から撤去し、planner/facts 側 SSOT に一本化。 + **2025-12-29: Phase 29aj P10 COMPLETE (single_planner unified shape)** single_planner を全パターンで planner-first → extractor フォールバックの共通形に統一(挙動不変)。 diff --git a/docs/development/current/main/10-Now.md b/docs/development/current/main/10-Now.md index 747f6bbd..03767cfa 100644 --- a/docs/development/current/main/10-Now.md +++ b/docs/development/current/main/10-Now.md @@ -2,10 +2,15 @@ ## Current Focus: Phase 29ak(PlanRuleOrder + PlannerContext) -Next: Phase 29ak P3(TBD) +Next: Phase 29ak P4(TBD) 運用ルール: integration filter で phase143_* は回さない(JoinIR 回帰は phase29ae pack のみ) 運用ルール: phase286_pattern9_* は legacy pack (SKIP) を使う +**2025-12-29: Phase 29ak P3 完了** ✅ +- 目的: Pattern8 static box filter を single_planner から撤去(仕様不変) +- 実装: `src/mir/builder/control_flow/plan/single_planner/rules.rs` +- 検証: `cargo build --release` / `./tools/smokes/v2/run.sh --profile quick` / `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh` PASS + **2025-12-29: Phase 29ak P2 完了** ✅ - 目的: Pattern8 static box filter を planner 側へ移し、facts 抽出を抑制(仕様不変) - 実装: `src/mir/builder/control_flow/plan/facts/loop_facts.rs` diff --git a/docs/development/current/main/30-Backlog.md b/docs/development/current/main/30-Backlog.md index 09e93046..498c441c 100644 --- a/docs/development/current/main/30-Backlog.md +++ b/docs/development/current/main/30-Backlog.md @@ -26,8 +26,8 @@ Related: - **Phase 29ak(candidate): PlanRuleOrder SSOT + PlannerContext plumbing** - 入口: `docs/development/current/main/phases/phase-29ak/README.md` - - 状況: P0/P1/P2 ✅ 完了 - - Next: Phase 29ak P3(TBD) + - 状況: P0/P1/P2/P3 ✅ 完了 + - Next: Phase 29ak P4(TBD) - **Phase 29ai(candidate): Plan/Frag single-planner(Facts SSOT)** - 入口: `docs/development/current/main/phases/phase-29ai/README.md` diff --git a/docs/development/current/main/phases/phase-29ak/P3-REMOVE-SINGLE_PLANNER-PATTERN8-STATICBOX-FILTER-INSTRUCTIONS.md b/docs/development/current/main/phases/phase-29ak/P3-REMOVE-SINGLE_PLANNER-PATTERN8-STATICBOX-FILTER-INSTRUCTIONS.md new file mode 100644 index 00000000..b9f85038 --- /dev/null +++ b/docs/development/current/main/phases/phase-29ak/P3-REMOVE-SINGLE_PLANNER-PATTERN8-STATICBOX-FILTER-INSTRUCTIONS.md @@ -0,0 +1,45 @@ +# Phase 29ak P3: Remove Pattern8 static box filter from single_planner + +Date: 2025-12-29 +Status: Ready for execution +Scope: single_planner の特例削除(挙動不変)+ docs 更新 +Goal: Pattern8 static box filter を planner/facts 側 SSOT に一本化する + +## Objective + +- single_planner の Pattern8 static box reject 分岐を削除 +- debug ログは SSOT ではない(差分対象外)ことを明記 + +## Non-goals + +- Pattern1 guard の削除 +- rule順序SSOTの CandidateSet 移管 +- 新 env var / 新ログ追加 + +## Implementation Steps + +### Step 1: single_planner の特例削除 + +Update: +- `src/mir/builder/control_flow/plan/single_planner/rules.rs` + +Remove: +- Pattern8 static box filter ブロックと debug ログ + +### Step 2: docs / CURRENT_TASK 更新 + +Update: +- `docs/development/current/main/phases/phase-29ak/README.md` +- `docs/development/current/main/10-Now.md` +- `docs/development/current/main/30-Backlog.md` +- `CURRENT_TASK.md` + +## Verification + +- `cargo build --release` +- `./tools/smokes/v2/run.sh --profile quick` +- `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh` + +## Commit + +- `git add -A && git commit -m "phase29ak(p3): remove pattern8 static box filter from single_planner"` diff --git a/docs/development/current/main/phases/phase-29ak/README.md b/docs/development/current/main/phases/phase-29ak/README.md index 98f4bbeb..10ed7cac 100644 --- a/docs/development/current/main/phases/phase-29ak/README.md +++ b/docs/development/current/main/phases/phase-29ak/README.md @@ -22,3 +22,10 @@ Goal: single_planner の「順序・名前・ガード」の SSOT を 1 箇所 - ねらい: static box では Pattern8 facts 抽出を抑制(single_planner 側の filter は維持) - 完了: PlannerContext.in_static_box を参照して loop_facts 入口で Pattern8 を抑制 - 検証: `cargo build --release` / `./tools/smokes/v2/run.sh --profile quick` / `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh` + +## P3: single_planner から Pattern8 static box filter を撤去 + +- 指示書: `docs/development/current/main/phases/phase-29ak/P3-REMOVE-SINGLE_PLANNER-PATTERN8-STATICBOX-FILTER-INSTRUCTIONS.md` +- ねらい: Pattern8 static box filter を planner/facts 側 SSOT に一本化 +- 完了: single_planner の Pattern8 特例フィルタを削除(debugログは SSOT ではない) +- 検証: `cargo build --release` / `./tools/smokes/v2/run.sh --profile quick` / `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh` diff --git a/src/mir/builder/control_flow/plan/single_planner/rules.rs b/src/mir/builder/control_flow/plan/single_planner/rules.rs index 04090eea..e61cffc8 100644 --- a/src/mir/builder/control_flow/plan/single_planner/rules.rs +++ b/src/mir/builder/control_flow/plan/single_planner/rules.rs @@ -43,10 +43,11 @@ pub(super) fn try_build_domain_plan(ctx: &LoopPatternContext) -> Result Result, kind: PlanRuleId) -> Optio fn fallback_extract( ctx: &LoopPatternContext, kind: PlanRuleId, + allow_pattern8: bool, ) -> Result, String> { match kind { PlanRuleId::Pattern1 => extractors::pattern1::extract_pattern1_plan(ctx.condition, ctx.body), @@ -137,7 +124,12 @@ fn fallback_extract( ctx.body, &[], ), - PlanRuleId::Pattern8 => extractors::pattern8::extract_pattern8_plan(ctx.condition, ctx.body), + PlanRuleId::Pattern8 => { + if !allow_pattern8 { + return Ok(None); + } + extractors::pattern8::extract_pattern8_plan(ctx.condition, ctx.body) + } PlanRuleId::Pattern9 => extractors::pattern9::extract_pattern9_plan(ctx.condition, ctx.body), } }