- 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>
69 lines
1.6 KiB
Python
69 lines
1.6 KiB
Python
from pathlib import Path
|
|
from uuid import uuid4
|
|
|
|
from phase_z2_pipeline import parse_mdx
|
|
|
|
|
|
def _tmp_mdx(name: str) -> Path:
|
|
base = Path("data") / "_tmp_task15_tests" / uuid4().hex
|
|
base.mkdir(parents=True, exist_ok=True)
|
|
return base / name
|
|
|
|
|
|
def test_task15_note_summary_is_footer_not_body():
|
|
mdx = _tmp_mdx("02.sample.mdx")
|
|
mdx.write_text(
|
|
"""---
|
|
title: Sample
|
|
---
|
|
|
|
## 1. Body
|
|
|
|
- **A**
|
|
- original text
|
|
|
|
:::note[핵심 요약]
|
|
* **핵심 문장**은 본문 프레임이 아니라 footer로 간다.
|
|
:::
|
|
""",
|
|
encoding="utf-8",
|
|
)
|
|
|
|
title, sections, footer = parse_mdx(mdx)
|
|
|
|
assert title == "Sample"
|
|
assert [s.section_id for s in sections] == ["02-1"]
|
|
assert "핵심 문장" not in sections[0].raw_content
|
|
assert footer == "핵심 문장은 본문 프레임이 아니라 footer로 간다."
|
|
|
|
|
|
def test_task15_summary_subsection_is_removed_from_body():
|
|
mdx = _tmp_mdx("04.sample.mdx")
|
|
mdx.write_text(
|
|
"""---
|
|
title: Sample
|
|
---
|
|
|
|
## 1. Parent
|
|
|
|
### 1.1 본문 소목차
|
|
- 원문 본문
|
|
|
|
### 1.2 핵심 요약
|
|
- 요약 문장은 footer로 이동
|
|
|
|
### 1.3 다른 본문
|
|
- 다른 원문
|
|
""",
|
|
encoding="utf-8",
|
|
)
|
|
|
|
_, sections, footer = parse_mdx(mdx)
|
|
|
|
assert [s.section_id for s in sections] == ["04-1"]
|
|
assert "### 1.2 핵심 요약" not in sections[0].raw_content
|
|
assert "요약 문장은 footer로 이동" not in sections[0].raw_content
|
|
assert "### 1.1 본문 소목차" in sections[0].raw_content
|
|
assert "### 1.3 다른 본문" in sections[0].raw_content
|
|
assert footer == "요약 문장은 footer로 이동"
|