Files
C.E.L_Slide_test2/.orchestrator/tmp/claude1_imp09_b4.md
T

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)

  1. Override branch is hard-gated to 2 presetssrc/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).
    • elseprint("[override-warning] zone-geometry override 는 layout '{layout_preset}' 미지원 ...", file=sys.stderr) and fall through (lines 1205-1212).
  2. Dynamic dispatcher routes 2 topologies onlysrc/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.
  3. Catalog claims render_ready: true for all 8 presetstemplates/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.
  4. Existing PR 1 test lock confirms the gaptests/phase_z2/test_build_layout_css_pr1.py:144-158:

    • top-1-bottom-2 produces computation == "fr_default_from_preset", dynamic_rows is False, dynamic_cols is False. This is the regression target to invert in B-4.
  5. Retry-gate fixture documents the same gaptests/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_preset listed as a retry-skip reason.

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 (topology T, R=2 C=2)
  • top-2-bottom-1 (topology inverted-T, R=2 C=2)
  • left-1-right-2 (topology side-T-left, R=2 C=2)
  • left-2-right-1 (topology side-T-right, R=2 C=2)
  • grid-2x2 (topology 2x2, R=2 C=2)

OUT-of-scope (consciously deferred — not part of B-4):

  • single — only 1 zone; zone-geometry is trivially the entire slide-body. _build_fr_default is already the correct path. Promoting it would be a no-op or worse. Code comment at src/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

  1. Length contract preserved (PR 1 lock — src/phase_z2_pipeline.py:1125-1129): for each of the 5 new presets, len(heights_px) == R == 2 and len(widths_px) == C == 2.
  2. Kei build_containers_type_b regression-freesrc/space_allocator.py:445, called from src/pipeline.py:531-532. Old page_structure path independent of new dispatcher.
  3. 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-1212 must be replaced (not left dead).
  4. PR 1 test updatetests/phase_z2/test_build_layout_css_pr1.py:144-158 (test_top_1_bottom_2_fr_default_populates_geometry) must invert: top-1-bottom-2 no longer at fr_default_from_preset. New expected values for computation, dynamic_rows, dynamic_cols. Equivalent new tests for the other 4 presets.
  5. Retry-gate fixture refreshtests/phase_z2/fixtures/retry_gate/single_fr_default.yaml: after promotion, only single falls through; preset list in the fixture must be narrowed accordingly.
  6. 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.
  7. AI-isolation invariant (PZ-1): layout dispatch stays purely deterministic — no LLM in build_layout_css path.

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_default over src/phase_z2_pipeline.py (6 hits, all at lines 1025/1056/1086/1132-1135/1216/1218/1221), fr_default_from_preset across 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 of single in any of the 3 sources.