phase29ap(p6): extend pattern2 plan subsets for stdlib

This commit is contained in:
2025-12-31 06:06:07 +09:00
parent 6910949583
commit 37172791ea
14 changed files with 838 additions and 552 deletions

View File

@ -57,12 +57,30 @@ Gate (SSOT):
- Scope:
- Remove Pattern8 from `LOOP_PATTERNS` so plan/composer stays SSOT for normal loops.
- Keep legacy table as last resort for Pattern2/4/9 only.
- Keep legacy table as last resort for Pattern6_NestedLoopMinimal / Pattern4 / Pattern9 only.
- Guardrails:
- No change to logs or error strings.
- Legacy routing remains a last-resort fallback.
## P5: Remove Pattern2 from JoinIR legacy table ✅
- Scope:
- Remove Pattern2 (with break) from `LOOP_PATTERNS`.
- Keep plan/composer as the only routing path for Pattern2.
- Guardrails:
- No change to logs or error strings.
- Fallback remains `Ok(None)` for non-matching plan cases.
## P6: stdlib trim_start/trim_end subset (Pattern2BreakFacts) ✅
- Scope:
- Add a conservative Pattern2BreakFacts subset for `trim_start`/`trim_end`.
- Normalize `not is_whitespace(...)` into `is_whitespace(...) == false` in facts.
- Restore quick smoke by ensuring stdlib loops are handled by plan/composer.
- Guardrails:
- No new logs or error strings.
- Subset only: if shape deviates, return `Ok(None)`.
## Next (planned)
- P5: Router pattern-name branching reduction (planner outcome + composer SSOT)
- P6: Facts/Feature expansion if needed
- P7: Legacy table shrink (Pattern9 removal) or leave as-is with justification