test+docs: backend pytest 30% 축소 + CLAUDE.md core-only 정책#15
Merged
Conversation
… tests only Reduce pytest count 318 → 224, file count 60+ → 54, LOC 10839 → 8099 by removing trivial schema instantiation tests, deduped CRUD wrapper tests, prompt-text assertion tests, and consolidating parametrizable variants. Preserved per task contract: - plan §4.0 P3 safeguard (test_router_safeguards.py 11 cases, test_llm_router.py 12 cases) - FINAL_RESPONSE_STREAM_OWNERSHIP / SSE contract (test_response_collector.py 10, test_event_processor.py 15) - PR #10/#11/#14 regression fixes (multi-turn handoff, retry/salvage, savefig nesting) - routing_eval/ scorer suite - finalizer/validator core edge cases - supervisor safeguards (head/team layer, dispatch limit, HITL) - integration API smoke (test_api.py, test_thread_api.py, test_chat_turn_lifecycle.py) Removed entirely (trivial / deprecated stubs): - test_schemas.py, test_patch_schemas.py, test_analytics_schema.py (pydantic instantiation + SQLAlchemy metadata sanity) - test_research_prompt_policy.py (prompt-text string match) - test_thread_telemetry_service.py, test_usage_backfill_service.py (single-method SQL forwarding wrappers) Compacted within files: - test_thread_api.py: 23 → 8 cases (collapsed AI title 5 → 2; list 4 → 1; upload 5 → 2; delete 2 → 1) - test_thread_service.py: 13 → 7 cases (folded list/sort variants) - test_supervisor.py: 13 → 8 cases (dropped prompt-text assertion duplicates) - test_api.py: 13 → 9 cases (removed redundant boilerplate variants) - test_chat_turn_lifecycle.py: extracted shared _install_lifecycle_mocks helper - Multiple service tests use pytest.parametrize where 2-3 sibling cases collapsed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
backend pytest를 318 → 224 cases (PR로 묶일 ea2e645)로 적극 축소하면서 실수로 trivial/중복 테스트가 다시 누적되지 않도록 정책을 명문화. 추가 정책: - Core 카테고리 5종 (회귀 fix / 계약 / safeguard / 통합 smoke / 핵심 비즈니스 로직) 중 하나에 명확히 해당할 때만 새 테스트 작성 허용 - 추가 금지 7종 (pydantic instantiation sanity, CRUD wrapper, prompt substring, dead feature, input permutation, trivial helper, placeholder/skeleton) - 작성 절차 3단계 (카테고리 자가점검 → 기존 케이스 grep → 도메인 파일 통합) - 회귀 정량 측정은 routing_eval golden dataset이 담당 (plan §4.0 P5) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
보존 (회귀 차단)
test_router_safeguards.py11,test_llm_router.py12 casestest_response_collector.py10,test_event_processor.py15삭제
CLAUDE.md 정책 (요약)
Verification
🤖 Generated with Claude Code