refactor: heading transforms + dedup moved to shared layer

- conversion_planner.py: caps normalization in _build_chapters()
- conversion_executor.py: heading dedup + state machine via headings_equivalent()
- Fixed seg_start_time → chapter_body_start bug in executor
- Removed getattr fallback defaults in both adapters
- Added 4 tests for caps normalization and heading dedup
- Updated ARCHITECTURE_REFACTOR_PLAN.md with deferred WebUI cleanup
This commit is contained in:
Artem Akymenko
2026-07-26 11:41:59 +03:00
parent f516cf1985
commit 0b953d48e8
6 changed files with 180 additions and 4 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ def build_conversion_request_from_thread(thread: Any) -> ConversionRequest:
read_title_intro=getattr(thread, "read_title_intro", False),
read_closing_outro=getattr(thread, "read_closing_outro", True),
auto_prefix_chapter_titles=getattr(thread, "auto_prefix_chapter_titles", True),
normalize_chapter_opening_caps=getattr(thread, "normalize_chapter_opening_caps", False),
normalize_chapter_opening_caps=thread.normalize_chapter_opening_caps,
# Metadata
metadata_tags=getattr(thread, "metadata_tags", {}) or {},
# Artifacts