phase29ak(p1): guard pattern1 facts via planner context
This commit is contained in:
@ -2,10 +2,15 @@
|
||||
|
||||
## Current Focus: Phase 29ak(PlanRuleOrder + PlannerContext)
|
||||
|
||||
Next: Phase 29ak P1(TBD)
|
||||
Next: Phase 29ak P2(TBD)
|
||||
運用ルール: integration filter で phase143_* は回さない(JoinIR 回帰は phase29ae pack のみ)
|
||||
運用ルール: phase286_pattern9_* は legacy pack (SKIP) を使う
|
||||
|
||||
**2025-12-29: Phase 29ak P1 完了** ✅
|
||||
- 目的: Pattern1 guard を planner 側へ移して facts 抽出を抑制(仕様不変)
|
||||
- 実装: `src/mir/builder/control_flow/plan/facts/loop_facts.rs` / `src/mir/builder/control_flow/plan/planner/outcome.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 P0 完了** ✅
|
||||
- 目的: PlanRuleOrder SSOT を新設し、PlannerContext の配線だけ先に導入(仕様不変)
|
||||
- 実装: `src/mir/builder/control_flow/plan/single_planner/rule_order.rs` / `src/mir/builder/control_flow/plan/planner/context.rs` / `src/mir/builder/control_flow/plan/single_planner/rules.rs`
|
||||
|
||||
@ -26,8 +26,8 @@ Related:
|
||||
|
||||
- **Phase 29ak(candidate): PlanRuleOrder SSOT + PlannerContext plumbing**
|
||||
- 入口: `docs/development/current/main/phases/phase-29ak/README.md`
|
||||
- 状況: P0 ✅ 完了
|
||||
- Next: Phase 29ak P1(TBD)
|
||||
- 状況: P0/P1 ✅ 完了
|
||||
- Next: Phase 29ak P2(TBD)
|
||||
|
||||
- **Phase 29ai(candidate): Plan/Frag single-planner(Facts SSOT)**
|
||||
- 入口: `docs/development/current/main/phases/phase-29ai/README.md`
|
||||
|
||||
@ -0,0 +1,69 @@
|
||||
# Phase 29ak P1: Guard Pattern1 facts via PlannerContext
|
||||
|
||||
Date: 2025-12-29
|
||||
Status: Ready for execution
|
||||
Scope: planner の Facts 入口で pattern_kind を参照して早期 Ok(None)(保守的)
|
||||
Goal: single_planner の guard 責務を減らし、planner 側へ寄せる第一歩にする(仕様不変)
|
||||
|
||||
## Objective
|
||||
|
||||
- PlannerContext.pattern_kind を使い、Pattern1 以外のループで Pattern1 facts 抽出を行わない
|
||||
- 挙動・ログは不変(single_planner 側の guard は維持)
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Pattern8 static box filter の移動
|
||||
- CandidateSet の順序SSOT化
|
||||
- extractor fallback の撤去
|
||||
|
||||
## Implementation Steps
|
||||
|
||||
### Step 1: loop_facts に guard を追加
|
||||
|
||||
Update:
|
||||
- `src/mir/builder/control_flow/plan/facts/loop_facts.rs`
|
||||
|
||||
Add:
|
||||
- `try_build_loop_facts_with_ctx(ctx, condition, body)` を新設
|
||||
- ctx.pattern_kind が Pattern1 以外のとき pattern1_simplewhile 抽出を抑制
|
||||
|
||||
### Step 2: planner outcome から ctx 版を使う
|
||||
|
||||
Update:
|
||||
- `src/mir/builder/control_flow/plan/planner/outcome.rs`
|
||||
|
||||
Notes:
|
||||
- `build_plan_with_facts_ctx` は `try_build_loop_facts_with_ctx` を使う
|
||||
- `build_plan_with_facts` は既存挙動のまま
|
||||
|
||||
### Step 3: single_planner guard は残す
|
||||
|
||||
Update:
|
||||
- `src/mir/builder/control_flow/plan/single_planner/rules.rs`
|
||||
|
||||
Notes:
|
||||
- planner 側に移した旨を docs に明記(guard は冗長だが安全策として維持)
|
||||
|
||||
### Step 4: テストを追加
|
||||
|
||||
Add:
|
||||
- pattern_kind != Pattern1 のとき pattern1 facts が None になること
|
||||
- pattern_kind == Pattern1 のとき従来通り抽出できること
|
||||
|
||||
### Step 5: 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(p1): guard pattern1 facts via planner context"`
|
||||
@ -8,3 +8,10 @@ Goal: single_planner の「順序・名前・ガード」の SSOT を 1 箇所
|
||||
- ねらい: rule_order.rs を順序/名前 SSOT に固定し、PlannerContext を配線(未使用)
|
||||
- 完了: PlanRuleOrder を追加し、single_planner の手書きテーブルを撤去
|
||||
- 検証: `cargo build --release` / `./tools/smokes/v2/run.sh --profile quick` / `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh`
|
||||
|
||||
## P1: Pattern1 guard を planner 側へ移動(facts 抽出抑制)
|
||||
|
||||
- 指示書: `docs/development/current/main/phases/phase-29ak/P1-PLANNER-PATTERN1-GUARD-INSTRUCTIONS.md`
|
||||
- ねらい: pattern_kind が Pattern1 以外のとき pattern1 facts 抽出を行わない
|
||||
- 完了: PlannerContext を参照して loop_facts 入口で Pattern1 を抑制(single_planner 側の guard は維持)
|
||||
- 検証: `cargo build --release` / `./tools/smokes/v2/run.sh --profile quick` / `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh`
|
||||
|
||||
Reference in New Issue
Block a user