This commit is contained in:
commit
8f085a28d3
3220 files changed
+985495
No files matched your search
@@ -0,0 +1 @@
|
||||
{"id":18689,"html_url":"https://gitea.hmac.kr/Kyeongmin/C.E.L_Slide_test2/issues/9#issuecomment-18689","pull_request_url":"","issue_url":"https://gitea.hmac.kr/Kyeongmin/C.E.L_Slide_test2/issues/9","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 #6] Stage 3 Round #4 — IMP-09 PR 2 u4\n\n### unit_executed\n- **id**: `u4`\n- **summary**: Add `_derive_axis_tracks_from_override` single-axis helper (per-group max override; dynamic-solver fallback when all zero)\n\n### files_changed\n- `src/phase_z2_pipeline.py` (+48 / -0 this unit; +172 / -0 cumulative across u1+u2+u3+u4)\n\n### diff_summary\n- Inserted directly after `_build_2d_dynamic` (u3) closing `}` and before the existing `# Layout preset → zone position 순서 …` comment block. PR 1 helpers (`_parse_css_areas`, `_parse_fr_string`, `compute_zone_layout`, `compute_zone_layout_cols`, `_compute_per_zone_geometry`, `_build_fr_default`, `_build_rows_dynamic`, `_build_cols_dynamic`) untouched. u1 (`TOPOLOGY_AXIS_MAP`, `_TWO_D_TOPOLOGIES`), u2 (`_aggregate_axis_zone`), and u3 (`_build_2d_dynamic`) surfaces untouched. `build_layout_css` not modified.\n- Helper signature: `_derive_axis_tracks_from_override(axis_groupings: list[list[str]], override_zone_geometries: dict[str, dict], axis_key: str, total_extent: int, gap: int, dynamic_tracks_px: list[int]) -\u003e dict`.\n- Behavior (axis-agnostic; called once per axis by u5):\n 1. For each grouping in `axis_groupings`, take **MAX** of `geom[axis_key]` (`'h'` for row tracks, `'w'` for col tracks) across positions in that grouping.\n 2. Compute `space = total_extent - gap * max(n - 1, 0)` — matches PR 1 solver convention (`compute_zone_layout` / `compute_zone_layout_cols` both produce tracks that sum to `total_extent - gap * (n-1)`).\n 3. If `sum(per_group_max) \u003c= 0` (all positions missing or zero on this axis): **fall back** to `dynamic_tracks_px` verbatim; ratios re-derived as `track / space`; `override_applied = False`.\n 4. Otherwise: normalize per-group maxes to a ratio vector summing to 1, scale to `space`, and apply rounding fix to the last track to length-lock the sum to `space`. `override_applied = True`.\n- Return contract: `{tracks_px: list[int], ratios: list[float], override_applied: bool}`. u5 (`_override_to_grid_tracks`) will call this helper twice (rows with `axis_key='h'` / `total_extent=SLIDE_BODY_HEIGHT`; cols with `axis_key='w'` / `total_extent=SLIDE_BODY_WIDTH`) and assemble the dual-axis layout_css dict.\n- **Length-locked invariant**: `len(tracks_px) == len(axis_groupings) == len(dynamic_tracks_px)` is guaranteed by construction in both override and fallback branches.\n- **Per-group MAX semantics** match Stage 2 spec — picks the dominant override within a track regardless of how many positions share the track, which is what the 2-D presets need (e.g. `2x2` rows = `[['top-left','top-right'], ['bottom-left','bottom-right']]`).\n- No dispatch wiring is added in this unit. `build_layout_css` normal path still routes only `topology in {\"rows\",\"cols\"}` to dynamic sinks; the 5 in-scope 2-D topologies still fall through to `_build_fr_default`. The override branch still warn-and-fallthroughs for non-{horizontal-2, vertical-2} presets. u5 will build `_override_to_grid_tracks` on top of `_derive_axis_tracks_from_override`; u6/u7 will then wire dispatch.\n\n### evidence\n- `git log -1 --format=%H` → `201099e53b0048f3040e17ee9b0394ba9ad6e940` (Stage 2 baseline preserved; no commit/push per Stage 3 contract).\n- `git diff --stat src/phase_z2_pipeline.py` → `1 file changed, 172 insertions(+)` (cumulative across u1+u2+u3+u4; u4-only delta = 172 − 124 = **48 lines** ≤ 50-line gate ✓).\n- `git diff --numstat` → `172 0 src/phase_z2_pipeline.py` (single file ≤ 3-file gate ✓; 0 deletions = pure insertion).\n- `git diff --name-only` → `src/phase_z2_pipeline.py` only (no other tracked changes).\n- `git diff --name-only HEAD -- src/space_allocator.py` → empty (Kei legacy invariant preserved ✓).\n- `git diff --check src/phase_z2_pipeline.py` → no whitespace errors.\n- `python -c \"import ast; ast.parse(open('src/phase_z2_pipeline.py').read())\"` → `PARSE OK`.\n- AST top-level function-presence check:\n - `_aggregate_axis_zone`: PRESENT (u2 surface intact)\n - `_build_2d_dynamic`: PRESENT (u3 surface intact)\n - `_derive_axis_tracks_from_override`: PRESENT (u4 added) ✓\nLine truncated
|
||||
Reference in new issue
Block a user