5.5 KiB
5.5 KiB
[Claude #1] Stage 1 problem-review Round #1 — root cause + scope-lock (single removed)
Codex #1 verified root cause; scope-lock revised to remove single and lock the 5 presets named in the issue body.
Verified root cause (axis-by-axis)
-
Override branch is hard-gated to 2 presets —
src/phase_z2_pipeline.py:1149-1212:layout_preset == "horizontal-2"→ heights_px override (lines 1150-1172).layout_preset == "vertical-2"→ cols override (lines 1173-1204).else→print("[override-warning] zone-geometry override 는 layout '{layout_preset}' 미지원 ...", file=sys.stderr)and fall through (lines 1205-1212).
-
Dynamic dispatcher routes 2 topologies only —
src/phase_z2_pipeline.py:1215-1221:topology == "rows"→_build_rows_dynamic(src/phase_z2_pipeline.py:1056).topology == "cols"→_build_cols_dynamic(src/phase_z2_pipeline.py:1086).- All other topologies (
T,inverted-T,side-T-left,side-T-right,2x2,single) →_build_fr_default(src/phase_z2_pipeline.py:1025-1053). Comments at lines 1219-1220 explicitly mark this as PR 2 / PR 3 work.
-
Catalog claims
render_ready: truefor all 8 presets —templates/phase_z2/layouts/layouts.yaml:- 8 presets total (single + horizontal-2 + vertical-2 + top-1-bottom-2 + top-2-bottom-1 + left-1-right-2 + left-2-right-1 + grid-2x2), all with
render_ready: true. Catalog truth (render-ready) and runtime truth (dynamic-ready) diverge.
- 8 presets total (single + horizontal-2 + vertical-2 + top-1-bottom-2 + top-2-bottom-1 + left-1-right-2 + left-2-right-1 + grid-2x2), all with
-
Existing PR 1 test lock confirms the gap —
tests/phase_z2/test_build_layout_css_pr1.py:144-158:top-1-bottom-2producescomputation == "fr_default_from_preset",dynamic_rows is False,dynamic_cols is False. This is the regression target to invert in B-4.
-
Retry-gate fixture documents the same gap —
tests/phase_z2/fixtures/retry_gate/single_fr_default.yaml:3-23:- "Any layout that fell through to fr_default_from_preset (single, ...) is currently skipped".
fr_default_from_presetlisted as a retry-skip reason.
- "Any layout that fell through to fr_default_from_preset (single, ...) is currently skipped".
Scope-lock (corrected — single removed)
IN-scope presets (exactly the 5 named in issue body + backlog row IMP-09 + INSIGHT-MAP §2 Step 8 example list):
top-1-bottom-2(topologyT, R=2 C=2)top-2-bottom-1(topologyinverted-T, R=2 C=2)left-1-right-2(topologyside-T-left, R=2 C=2)left-2-right-1(topologyside-T-right, R=2 C=2)grid-2x2(topology2x2, R=2 C=2)
OUT-of-scope (consciously deferred — not part of B-4):
single— only 1 zone; zone-geometry is trivially the entireslide-body._build_fr_defaultis already the correct path. Promoting it would be a no-op or worse. Code comment atsrc/phase_z2_pipeline.py:1220("PR 3 will dispatch single") is forward-looking but B-4 (= PR 2 per the inline comment) does not own it.horizontal-2,vertical-2— already dynamic in PR 1. Not regressed.
Guardrails / validation contract
- Length contract preserved (PR 1 lock —
src/phase_z2_pipeline.py:1125-1129): for each of the 5 new presets,len(heights_px) == R == 2andlen(widths_px) == C == 2. - Kei
build_containers_type_bregression-free —src/space_allocator.py:445, called fromsrc/pipeline.py:531-532. Old page_structure path independent of new dispatcher. - Override-warning dead code removal — once override is supported for the 5 new presets, the warn-and-fallthrough block at
src/phase_z2_pipeline.py:1205-1212must be replaced (not left dead). - PR 1 test update —
tests/phase_z2/test_build_layout_css_pr1.py:144-158(test_top_1_bottom_2_fr_default_populates_geometry) must invert:top-1-bottom-2no longer atfr_default_from_preset. New expected values forcomputation,dynamic_rows,dynamic_cols. Equivalent new tests for the other 4 presets. - Retry-gate fixture refresh —
tests/phase_z2/fixtures/retry_gate/single_fr_default.yaml: after promotion, onlysinglefalls through; preset list in the fixture must be narrowed accordingly. - Step 8 trace explainability (issue body): zone-level ratio (rows / cols / both) must be explainable in step08 trace for each of the 5 promoted presets.
- AI-isolation invariant (PZ-1): layout dispatch stays purely deterministic — no LLM in
build_layout_csspath.
Files locked to scope
src/phase_z2_pipeline.py(1149-1221 = override branch + dispatcher; new_build_*helpers for 2-D topologies).templates/phase_z2/layouts/layouts.yaml— read-only (catalog already declares the 5 presets).tests/phase_z2/test_build_layout_css_pr1.py— update + extend.tests/phase_z2/fixtures/retry_gate/single_fr_default.yaml— narrow.
EVIDENCE
- Files read:
src/phase_z2_pipeline.py:1025-1221,templates/phase_z2/layouts/layouts.yaml(full),tests/phase_z2/test_build_layout_css_pr1.py:140-159,tests/phase_z2/fixtures/retry_gate/single_fr_default.yaml:1-30,docs/architecture/PHASE-Z-IMPLEMENTATION-ISSUE-BACKLOG.md:53(IMP-09 row),docs/architecture/PHASE-Q-INSIGHT-TO-22STEP-MAP.md:84(Step 8 row). - Greps:
_build_rows_dynamic|_build_cols_dynamic|_build_fr_defaultoversrc/phase_z2_pipeline.py(6 hits, all at lines 1025/1056/1086/1132-1135/1216/1218/1221),fr_default_from_presetacross tests (7 hits, all consistent with the gap). - Cross-ref: issue body scope list (
top-1-bottom-2 / top-2-bottom-1 / left-1-right-2 / left-2-right-1 / grid-2x2) = backlog IMP-09 examples (top-1-bottom-2 / left-1-right-2 / grid-2x2 등) = INSIGHT-MAP §2 Step 8 examples (same). No mention ofsinglein any of the 3 sources.