1 line
3.0 KiB
JSON
1 line
3.0 KiB
JSON
{"body": "Executing unit: u1\n\n[Claude #1] Stage 3 Round #1 code-edit \u2014 unit u1 (constant + Step 14 JS image_events).\n\n**unit_executed**: `u1`\n\n**files_changed**:\n- `src/phase_z2_pipeline.py`\n\n**diff_summary**:\n1. Added module-level constant `IMAGE_ASPECT_DELTA_TOL = 0.05` just below `DEFAULT_ZONE_MIN_HEIGHT_PX` (Constants block, ~line 131). Anchored to `docs/architecture/PHASE-Z-FIT-CLASSIFIER-ROUTER-SPEC.md \u00a73.1` per Stage 2 plan; importable for u3 tests.\n2. Extended `run_overflow_check` JS payload (previous return at `:2211`) to traverse `<img>` elements under `.slide` and emit `image_events[]`. Each entry includes:\n - `src` \u2014 raw `getAttribute('src')`\n - `zone_position` \u2014 `img.closest('.zone')` data-zone-position with literal `\"unknown\"` fallback (matches issue Fixture C contract)\n - `zone_template_id` \u2014 sibling field for downstream debug surfacing\n - `natural_w / natural_h` \u2014 `img.naturalWidth/Height` (intrinsic)\n - `rendered_w / rendered_h` \u2014 `getBoundingClientRect()` width/height, rounded\n - `natural_ratio / rendered_ratio` \u2014 w/h ratios (null if any dim is 0)\n - `delta` \u2014 `rendered_ratio \u2212 natural_ratio` (null on either side null)\n - `bbox` \u2014 `{x, y, w, h}` slide-relative px (mirrors A-6 zone_geometries_px convention; reserved for \uc2e4\ud589-4 debug.json)\n3. Return object extended from `{ slide, slide_body, zones, frame_slot_metrics, zone_geometries_px }` to `{ ..., image_events }`. Existing keys unchanged.\n\n**verification**:\n- `python -c \"import ast; ast.parse(open(...))\"` \u2192 `AST OK`\n- `from phase_z2_pipeline import IMAGE_ASPECT_DELTA_TOL` \u2192 `0.05` (module-scope import path confirmed for u3 reuse).\n\n**scope_lock_adherence**:\n- No edits to `fail_reasons` aggregator (lines 2226\u20132252 \u2014 reserved for u2). Existing non-image branch strings/order intact.\n- No edits to Step 14 note (lines 4355\u20134359 \u2014 reserved for u2).\n- No new test file (reserved for u3).\n- No edits to `slide_base.html`, fit/classifier/router, frame DB, or any Step \u2260 14 surface.\n\n**remaining_units**:\n- `u2` \u2014 Aggregate `image_aspect_mismatch` fail_reasons (`abs(delta) > IMAGE_ASPECT_DELTA_TOL` \u2192 `image aspect mismatch in zone--<pos>: expected <natural_ratio> rendered <rendered_ratio> delta <d>`) + update Step 14 note from `\"image / table \uac80\uc0ac \ubd80\uc7ac \u2014 Step 14 \u26a0 partial\"` to image-half-closed wording.\n- `u3` \u2014 Add `tests/phase_z2/test_phase_z2_step14_image_check.py` with Fixture A/B/C, chromedriver resolver mirroring pipeline order, skip-guard + strict xfail under `PHASE_Z_REQUIRE_SELENIUM=1`.\n\n**follow_up_issue_candidates**: none beyond the already-planned \uc2e4\ud589-2/3/4 sub-issues (`table_events`, `classifier consumer + visual_check_passed flip`, `debug.json surfacing + spec doc row`).\n\n**not committed / not pushed** per Stage 3 unit-by-unit protocol. Continuing with u2 next turn.\n\nrewind_target: continue_same\nFINAL_CONSENSUS: NO\n"} |