wip: phase_z2 evidence 파이프라인 + matching 실험(phase2~26) + 프론트 trace 패널 진행분 스냅샷
- src: phase_z2 composition/mapper/pipeline/placement_planner/retry, ai_fallback(prompts/schema/validate), mdx_text_atoms 신규 - Front: PipelineTracePanel 신규, FramePanel/SlideCanvas/Home/designAgentApi 등 갱신 + 테스트 4종 추가 - templates/phase_z2: catalog(component_expansion_registry, node_slot_mapping 신규), frames, families, slide_base 갱신 - tests/matching: phase2~26 매칭 실험 스크립트·리포트·온톨로지 전체 (미커밋 진행분) - tests: b4_v4 evidence, task5~28.5 시리즈, regression(imp95 baseline) 등 신규 테스트 대량 추가 - docs/reference: MDX 구조 인벤토리, MDX→Frame 구조 계약 문서 - scripts: mdx 계약/parity/coverage/viewport 체크, gitea comment, run sync 유틸 - .gitignore: tmp*.json, chromedriver, .orchestrator, *.pkl, Front_test* 등 임시/스냅샷 제외 미완성 작업의 보존용 스냅샷 커밋 (2026-07-02) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1039,10 +1039,22 @@ def select_composition_units(
|
||||
Args:
|
||||
candidates: full candidate pool from collect_candidates().
|
||||
allowed_statuses: phase_z_status set considered auto-renderable.
|
||||
all_section_ids: ordered section id list (only consulted when
|
||||
allow_provisional_fill=True; required for coverage check).
|
||||
all_section_ids: ordered section id list. Used for final source-order
|
||||
emission; also consulted for provisional coverage fill.
|
||||
allow_provisional_fill: opt-in for last-resort provisional fill.
|
||||
"""
|
||||
source_order_index = {sid: i for i, sid in enumerate(all_section_ids or [])}
|
||||
|
||||
def _source_order_key(c: CompositionUnit) -> tuple[int, int, str]:
|
||||
order_values = [
|
||||
source_order_index[sid]
|
||||
for sid in c.source_section_ids
|
||||
if sid in source_order_index
|
||||
]
|
||||
if not order_values:
|
||||
return (10**9, 10**9, "+".join(c.source_section_ids))
|
||||
return (min(order_values), max(order_values), "+".join(c.source_section_ids))
|
||||
|
||||
scored = [score_candidate(c) for c in candidates]
|
||||
viable = [
|
||||
c for c in scored
|
||||
@@ -1080,6 +1092,11 @@ def select_composition_units(
|
||||
selected.append(c)
|
||||
covered.update(c.source_section_ids)
|
||||
|
||||
# Task 9 (2026-05-28): frame score decides the covering frame, but final
|
||||
# unit emission must preserve MDX source order.
|
||||
if source_order_index:
|
||||
selected.sort(key=_source_order_key)
|
||||
|
||||
return selected
|
||||
|
||||
|
||||
@@ -1163,7 +1180,7 @@ def plan_composition(sections, v4_lookup_fn, v4_label_to_status: dict,
|
||||
units = select_composition_units(
|
||||
candidates,
|
||||
allowed_statuses,
|
||||
all_section_ids=[s.section_id for s in sections] if allow_provisional_fill else None,
|
||||
all_section_ids=[s.section_id for s in sections],
|
||||
allow_provisional_fill=allow_provisional_fill,
|
||||
)
|
||||
preset = select_layout_preset(units)
|
||||
|
||||
Reference in New Issue
Block a user