untracked files on main: dceb101 feat(#63): IMP-34 R1 donor capacity measured bound (u1+u2)

This commit is contained in:
kmlee1 committed 2026-05-21 22:07:41 +09:00
commit 8f085a28d3
3220 files changed
+985495

No files matched your search

@@ -0,0 +1 @@
[{"id": 22955, "html_url": "https://gitea.hmac.kr/Kyeongmin/C.E.L_Slide_test2/issues/63#issuecomment-22955", "pull_request_url": "", "issue_url": "https://gitea.hmac.kr/Kyeongmin/C.E.L_Slide_test2/issues/63", "user": {"id": 28, "login": "Kyeongmin", "login_name": "", "source_id": 0, "full_name": "이경민", "email": "kyeongmin@noreply.localhost", "avatar_url": "https://gitea.hmac.kr/avatars/d883a35f9197b080b2a0c535c3f9357dcd5c7d40b3c42bd8f40218cb94609a8e", "html_url": "https://gitea.hmac.kr/Kyeongmin", "language": "", "is_admin": false, "last_login": "0001-01-01T00:00:00Z", "created": "2025-12-30T10:51:04+09:00", "restricted": false, "active": false, "prohibit_login": false, "location": "", "website": "", "description": "", "visibility": "public", "followers_count": 0, "following_count": 0, "starred_repos_count": 1, "username": "Kyeongmin"}, "original_author": "", "original_author_id": 0, "body": "[Claude #1] Stage 1 — IMP-34 problem review (overflow chain step 1 — zone resize + compact retry)\n\n### Root-cause framing\n\nIMP-34 is the **first deterministic step** of the overflow remediation chain (Step 16 → 17). The chain shape (post-IMP-12) is:\n\n```\nzone_ratio_retry ← IMP-34 axis (this issue)\n ↓ fail\ncross_zone_redistribute ← IMP-12 u4 / u8\n ↓ fail\nglue_compression ← IMP-12 u5\n ↓ fail\nfont_step_compression ← IMP-12 u6\n ↓ fail\nlayout_adjust / frame_reselect / details_popup_escalation (IMP-35) — missing\n```\n\nToday, `plan_zone_ratio_retry` (`src/phase_z2_retry.py:43-215`) selects donor zones by **static contract slack** only: `slack = current_height_px − min_height_px` (line 127). This is a *contract* signal — it says \"how far can we shrink this zone before violating its `visual_hints.min_height_px`\" — and ignores **whether the zone actually has empty space rendered**. A donor whose `clientHeight=200`, `min_height_px=120`, but whose internal content already takes `scrollHeight=195` will be picked with `slack=80`, the plan will take 80 from it, and after rerender the donor *itself* overflows by `195 − 120 = 75`. The candidate fails visual_check, the orchestrator reverts (correct), and the cascade falls through to `cross_zone_redistribute` unnecessarily — burning a Selenium rerender on a donor we could have rejected up-front from data already in `overflow[\"zones\"][i]`.\n\nThe issue body reframes axis 7 of #44 (originally \"frame_swap / popup escalation\", **corrected**: frame_swap forbidden — V4 rank-1 protection) to **zone resize**. The concrete enhancement is: donor capacity must be bounded by **measured empty space** (`clientHeight − scrollHeight`), not just static contract slack. The measured signal is already produced by the Selenium JS at `src/phase_z2_pipeline.py:2305-2314` and surfaced into `overflow[\"zones\"][i]` as `clientHeight` / `scrollHeight` / `excess_y` (line 2393 pushes the full `m` dict) — it is read by `_attempt_salvage_chain` for cross_zone_redistribute synthesis (`src/phase_z2_pipeline.py:5117-5130`) but is **not** read by `plan_zone_ratio_retry`.\n\n### Verified facts (value + path + upstream)\n\n- HEAD = `15ef7c65e9f58637e4b4714afb9546c176ceaaa8`; branch = `main`.\n- Source insight #44 axis 7 — `[issue body]`: \"frame_swap / popup escalation — **정정**: frame_swap 자동화 폐기, zone resize 로 재정의\". Confirms automatic frame swap forbidden (V4 rank-1 protection memory: `feedback_partial_figma_audit` + `project_mdx03_frame_lock` Axis A zone lock).\n- Dependency #12 verified — IMP-12 u1 (multi-donor greedy) + u3 (failure router cascade) + u4~u9 (cross-zone redistribute / glue / font-step salvage chain) are live. Tests: `tests/phase_z2/test_phase_z2_retry_multi_donor.py`, `test_phase_z2_failure_router_cascade.py`, `test_phase_z2_step17_salvage_chain.py`.\n- Status board — `docs/architecture/PHASE-Z-PIPELINE-STATUS-BOARD.md:56` confirms Step 17 = `⚠ partial (zone_ratio_retry only)`. Missing actions at line 95-96 = `layout_adjust / frame_reselect / details_popup_escalation / image_fit / frame_internal_fit_candidate`. IMP-34 is *not* a new action label — it enriches the existing `zone_ratio_retry`.\n- IMP-17 carve-out — `docs/architecture/IMP-17-CARVE-OUT.md:3` explicitly names IMP-34 + IMP-35 as the structural prerequisites for unblocking Step 17 AI fallback (`step17_ai_blocked_imp_34_35_prerequisites_missing`, file line 52). Confirms IMP-34 sits before any AI escalation.\n- Donor-selection lock — `src/phase_z2_retry.py:99-137` (loop) + `:127` (`slack = height − min_h`) + `:140` (sort by static slack). Multi-donor greedy aggregation already present at `:165-203`. **No measured-empty signal consulted.**\n- Measured empty available — `src/phase_z2_pipeline.py:2305-2314` (`measure(el)` JS: `clientHeight` / `scrollHeight` / `excess_y` / `overflowed`) + `:2336-2393` (per-zone push of `m`, including `clipped_inner`). `overflow[\"zones\"][i]` already carries `clientHeight` / `scrollHeLine truncated