Skip to content

test: expand patch_builder test coverage (7 → 52 tests)#699

Merged
jk-kim0 merged 1 commit intomainfrom
test/patch-builder-coverage
Feb 13, 2026
Merged

test: expand patch_builder test coverage (7 → 52 tests)#699
jk-kim0 merged 1 commit intomainfrom
test/patch-builder-coverage

Conversation

@jk-kim0
Copy link
Copy Markdown
Contributor

@jk-kim0 jk-kim0 commented Feb 13, 2026

Summary

  • patch_builder.py (470줄, 가장 복잡한 모듈) 전용 테스트를 7개 → 52개로 확충
  • build_patches() 6가지 분기 경로별 테스트 (10개)
  • _resolve_child_mapping() 4단계 fallback 테스트 (8개)
  • Helper 함수 테스트 (20개): is_markdown_table, split_table_rows, normalize_table_row, split_list_items, extract_list_marker_prefix
  • build_table_row_patches, build_list_item_patches 통합 테스트 (6개)
  • 테스트 수: 251 → 296 (전체 통과)

Context

[코드 품질 진단] P1-#3 항목: patch_builder.py의 테스트 비율이 0.14x (470줄 대비 66줄)로 심각하게 부족했던 문제 해결. Phase 2 구현 시 리그레션 감지 안전망으로 활용.

Test plan

  • 신규 52개 테스트 전체 통과
  • 기존 251개 테스트 리그레션 없음

🤖 Generated with Claude Code

Add comprehensive unit tests for the most complex module (470 lines):
- build_patches() 6 branching paths: sidecar match + child resolve,
  child fail + list split, child fail + containing block, sidecar miss +
  text search, sidecar miss + table split, text mismatch + remapping
- _resolve_child_mapping() 4-tier fallback (8 tests)
- Helper functions: is_markdown_table, split_table_rows,
  normalize_table_row, split_list_items, extract_list_marker_prefix
- build_table_row_patches, build_list_item_patches integration
- Edge cases: NON_CONTENT_TYPES skip, multiple changes grouped

Test count: 251 → 296 (all passing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
querypie-docs Ready Ready Preview, Comment Feb 13, 2026 7:11am

Request Review

@jk-kim0 jk-kim0 self-assigned this Feb 13, 2026
@jk-kim0 jk-kim0 merged commit 2cc5820 into main Feb 13, 2026
7 checks passed
@jk-kim0 jk-kim0 deleted the test/patch-builder-coverage branch February 13, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant