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

+1
View File
@@ -0,0 +1 @@
{"id":19645,"html_url":"https://gitea.hmac.kr/Kyeongmin/C.E.L_Slide_test2/issues/47#issuecomment-19645","pull_request_url":"","issue_url":"https://gitea.hmac.kr/Kyeongmin/C.E.L_Slide_test2/issues/47","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":"Executing unit: u2\n\n📌 **[Claude #3] Stage 3 (코드 수정) Round #2 — u2 (pure-dict classifier tests) 완료**\n\n■ **unit_executed**: `u2` (Stage 2 plan — Add pure-dict classifier tests)\n\n■ **files_changed**:\n- `tests/phase_z2/test_phase_z2_visual_classifier.py` (NEW, 116 lines incl. docstring)\n\n■ **diff_summary**\n\n1. **NEW file** — `tests/phase_z2/test_phase_z2_visual_classifier.py` — 4 pure-dict unit tests for the new `classify_visual_runtime_check` consumer behavior landed in u1. No Selenium / chromedriver dependency; no fixtures; no parametrize. Each test constructs an overflow dict by hand and asserts on the classifier's return shape.\n\n2. **Imports (single source of truth)** — tolerances pulled from `phase_z2_pipeline`, not duplicated as literals:\n ```python\n from src.phase_z2_classifier import classify_visual_runtime_check\n from src.phase_z2_pipeline import IMAGE_ASPECT_DELTA_TOL, TABLE_SCROLL_TOL_PX\n ```\n Tests derive thresholds from imported constants (`IMAGE_ASPECT_DELTA_TOL + 0.05`, `TABLE_SCROLL_TOL_PX + 10`, `TABLE_SCROLL_TOL_PX + 50`) — if the SSoT in `phase_z2_pipeline.py:134/:139` shifts, the tests track automatically.\n\n3. **`_base_overflow(**overrides)` helper** — minimal clean overflow dict (passed=True, empty zones / image_events / table_events, no slide / slide_body overflow). Each test overlays only the array it exercises. Keeps test bodies focused on the axis under inspection (image_events scan or table_events scan).\n\n4. **Four required cases (1:1 with issue acceptance criteria)**:\n\n - **`test_image_aspect_mismatch_emits_classification`** — `delta = IMAGE_ASPECT_DELTA_TOL + 0.05` (above tolerance). Asserts:\n - `visual_check_passed is False` (widened semantic flips even though zone overflow is clean)\n - `categories_seen == [\"image_aspect_mismatch\"]`\n - `classifications[0]` carries `category=\"image_aspect_mismatch\"`, `source=\"image_event\"`, `zone_position=\"top\"`, `delta=\u003cexpected\u003e`.\n\n - **`test_image_aspect_delta_below_tol_no_classification`** — `delta = IMAGE_ASPECT_DELTA_TOL / 2.0` (below tolerance). Asserts:\n - `visual_check_passed is True`\n - `categories_seen == []` and `classifications == []` (no false positive).\n\n - **`test_standalone_table_overflow_emits_classification`** — `wrapper_clipped_index=None`, `excess_y = TABLE_SCROLL_TOL_PX + 10`. Asserts:\n - `visual_check_passed is False`\n - `categories_seen == [\"tabular_overflow\"]` (existing `tabular_overflow` category reused verbatim — `phase_z2_classifier.py:234`)\n - `classifications[0]` carries `category=\"tabular_overflow\"`, `source=\"table_event\"`, `zone_position=\"bottom_l\"`, `excess_y=\u003cexpected\u003e`.\n\n - **`test_table_dedup_when_wrapper_clipped`** — `wrapper_clipped_index=0` (non-null) with `excess_y = TABLE_SCROLL_TOL_PX + 50` (well above tolerance — proves the dedup branch wins over the threshold check). Asserts:\n - `visual_check_passed is True`\n - `classifications == []` (honors producer-side dedup contract from `phase_z2_pipeline.py:2287-2325`; the wrapper's existing `clipped_inner` cascade owns this case).\n\n5. **No changes to**:\n - `src/phase_z2_classifier.py` (already complete in u1).\n - `src/phase_z2_pipeline.py` (out-of-scope — image_events / table_events production landed in 실행-1/2).\n - Existing classifier tests / 8-rule cascade tests — untouched.\n\n■ **verification**\n```\n$ PYTHONPATH=. python -m pytest tests/phase_z2/test_phase_z2_visual_classifier.py -v\ncollected 4 items\n\ntests/phase_z2/test_phase_z2_visual_classifier.py::test_image_aspect_mismatch_emits_classification PASSED [ 25%]\ntests/phase_z2/test_phase_z2_visual_classifier.py::test_image_aspect_delta_below_tol_no_classification PASSED [ 50%]\ntests/phase_z2/test_phase_z2_visual_classifier.py::test_standalone_table_overflow_emits_classification PASSED [ 75%]\ntests/phase_z2/test_phase_z2_visual_classifier.py::test_table_dedup_when_wrapper_clipped PASSED [100%]\n\n============================== 4 passed in 0.16s =============================Line truncated