phase29ak(p3): remove pattern8 static box filter from single_planner
This commit is contained in:
@ -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 フォールバックの共通形に統一(挙動不変)。
|
||||
|
||||
|
||||
@ -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`
|
||||
|
||||
@ -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`
|
||||
|
||||
@ -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"`
|
||||
@ -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`
|
||||
|
||||
@ -43,10 +43,11 @@ pub(super) fn try_build_domain_plan(ctx: &LoopPatternContext) -> Result<Option<D
|
||||
}
|
||||
|
||||
let planner_hit = try_take_planner(&planner_opt, rule_id);
|
||||
let allow_pattern8 = !ctx.in_static_box;
|
||||
let (plan_opt, log_none) = if planner_hit.is_some() {
|
||||
(planner_hit, false)
|
||||
} else {
|
||||
(fallback_extract(ctx, rule_id)?, true)
|
||||
(fallback_extract(ctx, rule_id, allow_pattern8)?, true)
|
||||
};
|
||||
|
||||
let promotion_tag = if matches!(rule_id, PlanRuleId::Pattern2)
|
||||
@ -65,21 +66,6 @@ pub(super) fn try_build_domain_plan(ctx: &LoopPatternContext) -> Result<Option<D
|
||||
}
|
||||
|
||||
if let Some(domain_plan) = plan_opt {
|
||||
// Phase 286 P3: Pattern8 static box filtering
|
||||
// Plan extractors are pure (no builder access), so we filter here.
|
||||
if matches!(rule_id, PlanRuleId::Pattern8) && ctx.in_static_box {
|
||||
if ctx.debug {
|
||||
trace::trace().debug(
|
||||
"route/plan",
|
||||
&format!(
|
||||
"{} extracted but rejected: static box context (fallback to legacy)",
|
||||
name
|
||||
),
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let log_msg = format!("route=plan strategy=extract pattern={}", name);
|
||||
trace::trace().pattern("route", &log_msg, true);
|
||||
return Ok(Some(domain_plan));
|
||||
@ -116,6 +102,7 @@ fn try_take_planner(planner_opt: &Option<DomainPlan>, kind: PlanRuleId) -> Optio
|
||||
fn fallback_extract(
|
||||
ctx: &LoopPatternContext,
|
||||
kind: PlanRuleId,
|
||||
allow_pattern8: bool,
|
||||
) -> Result<Option<DomainPlan>, 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),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user