Skip to content

test+docs: backend pytest 30% 축소 + CLAUDE.md core-only 정책#15

Merged
DONGRYEOLLEE1 merged 3 commits into
mainfrom
docs/test-policy-and-backend-reduction
May 22, 2026
Merged

test+docs: backend pytest 30% 축소 + CLAUDE.md core-only 정책#15
DONGRYEOLLEE1 merged 3 commits into
mainfrom
docs/test-policy-and-backend-reduction

Conversation

@DONGRYEOLLEE1
Copy link
Copy Markdown
Owner

Summary

  1. backend pytest 적극 축소 (ea2e645): 318 → 224 cases (-94, -30%) / 10839 → 8099 LOC (-25%) / 60+ → 54 files
  2. CLAUDE.md core-only 테스트 추가 정책 명문화 (be50bb5): 5 Core 카테고리만 허용 + 7가지 금지 항목 + 작성 절차

보존 (회귀 차단)

삭제

  • placeholder 3 (test_supervisor_progression / test_coding_supervisor / test_integration_llm)
  • trivial schema instantiation (test_schemas / test_patch_schemas / test_analytics_schema)
  • service CRUD wrapper (test_thread_telemetry_service / test_usage_backfill_service)
  • prompt substring assertion (test_research_prompt_policy)
  • 중복 variant 다수 통합 (test_thread_api 23→8, test_api 13→9, test_supervisor 13→8, test_memory_api 10→5)

CLAUDE.md 정책 (요약)

  • Core 5 카테고리만 허용: 회귀 fix / 계약(SSE/RouterDecision/ToolErrorPayload) / safeguard / 통합 smoke / 핵심 비즈니스 로직
  • 추가 금지 7종: pydantic instantiation sanity, CRUD wrapper, prompt substring, dead feature 잔재, input permutation 3+, trivial helper, placeholder
  • 작성 절차: 카테고리 자가점검 → 기존 grep → 도메인 파일 통합 우선
  • 회귀 정량 측정은 evaluation harness가 담당 (plan §4.0 P5)

Verification

  • pytest 224/224 PASS, 회귀 0
  • baseline diff 통과

🤖 Generated with Claude Code

DONGRYEOLLEE1 and others added 2 commits May 22, 2026 14:16
… 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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

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

Project Deployment Actions Updated (UTC)
orchagent Ready Ready Preview, Comment May 22, 2026 5:22am
project-vdajw Ready Ready Preview, Comment May 22, 2026 5:22am

@DONGRYEOLLEE1 DONGRYEOLLEE1 merged commit 135b995 into main May 22, 2026
5 checks passed
@DONGRYEOLLEE1 DONGRYEOLLEE1 deleted the docs/test-policy-and-backend-reduction branch May 22, 2026 05:23
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