docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거

Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
Antigravity Agent
2026-07-05 00:33:48 +09:00
parent 1cfd3bbb56
commit 9148c358d0
6455 changed files with 1 additions and 86875 deletions
@@ -0,0 +1,199 @@
---
id: wiki-2026-0508-quality-control
title: Quality Control
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [QC, Software Quality]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [quality, testing, process]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: TypeScript/Python
framework: Playwright/pytest
---
# Quality Control
## 매 한 줄
> **"매 quality 의 inspect 보다 build-in"**. 매 modern QC 의 shift-left — 매 unit test, type checking, static analysis, contract test, e2e — 매 layer 의 different bug class catch. 2026 의 LLM-augmented test generation + property-based testing 의 mainstream.
## 매 핵심
### 매 Test pyramid (2026 update)
- **Unit (60-70%)**: pure function, fast, isolated.
- **Integration (15-25%)**: module + DB/queue, real dependencies via testcontainers.
- **E2E (5-10%)**: full user journey, Playwright/Cypress.
- **Contract (5%)**: Pact, consumer-driven, prevent break-on-deploy.
- **Property-based (cross-cutting)**: Hypothesis/fast-check, find edge cases.
### 매 Quality gates
- 매 PR 의 merge 전: lint, type, unit test, coverage threshold, security scan.
- 매 deploy 전: integration test, smoke test, canary metrics.
- 매 prod: synthetic monitoring, real-user monitoring (RUM).
### 매 Defect classes
- **Functional**: wrong output for given input.
- **Performance**: slow, regression on benchmark.
- **Security**: OWASP categories.
- **Accessibility**: WCAG violations.
- **Compatibility**: browser/OS specific.
### 매 응용
1. CI/CD pipeline gates.
2. Pre-merge bots (Danger, Reviewdog).
3. Mutation testing (Stryker) — quality of tests themselves.
4. Visual regression (Chromatic, Percy).
5. Chaos engineering (production resilience).
## 💻 패턴
### Property-based testing (TypeScript with fast-check)
```typescript
import fc from 'fast-check';
import { reverse } from './lib';
test('reverse twice = identity', () => {
fc.assert(
fc.property(fc.array(fc.integer()), (arr) => {
expect(reverse(reverse(arr))).toEqual(arr);
}),
);
});
```
### Contract test (Pact)
```typescript
// Consumer side
const provider = new Pact({ consumer: 'Web', provider: 'OrdersAPI' });
await provider.addInteraction({
state: 'order 123 exists',
uponReceiving: 'a request for order 123',
withRequest: { method: 'GET', path: '/orders/123' },
willRespondWith: {
status: 200,
body: { id: '123', total: 99.0 },
},
});
// Generates pact.json — provider verifies against it in CI
```
### Mutation testing (Stryker)
```javascript
// stryker.conf.js
export default {
testRunner: 'vitest',
mutate: ['src/**/*.ts'],
thresholds: { high: 80, low: 60, break: 50 },
};
// Mutates code (a + b → a - b) and checks if tests catch it
// Surviving mutants = weak tests
```
### LLM-assisted test generation (2026 pattern)
```typescript
// CI step: claude-code generates edge cases
// $ claude test-gen src/parser.ts --output tests/parser.gen.test.ts
// Then human review before merge — never blind-trust
```
### Visual regression (Playwright)
```typescript
test('homepage matches snapshot', async ({ page }) => {
await page.goto('/');
await page.waitForLoadState('networkidle');
expect(await page.screenshot()).toMatchSnapshot('home.png', {
maxDiffPixelRatio: 0.01,
});
});
```
### Coverage gates (vitest)
```typescript
// vitest.config.ts
export default {
test: {
coverage: {
provider: 'v8',
thresholds: {
lines: 80,
functions: 80,
branches: 75,
statements: 80,
},
},
},
};
```
### Pre-commit hook (lint-staged + husky)
```json
{
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix",
"prettier --write",
"vitest related --run"
]
}
}
```
### Chaos test (Toxiproxy / Litmus)
```yaml
# Inject 500ms latency into Redis dependency
apiVersion: chaos-mesh.org/v1alpha1
kind: NetworkChaos
spec:
action: delay
selector:
labelSelectors: { app: redis }
delay: { latency: 500ms }
duration: 60s
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Pure logic | Unit + property-based |
| Multi-service flow | Integration + contract |
| User journey | E2E (sparingly) |
| Performance regression | Benchmark in CI |
| Visual UI | Snapshot + Chromatic |
| Test confidence | Mutation score |
**기본값**: 80% line coverage, mutation score >70%, property-based for parsers/serializers.
## 🔗 Graph
- 부모: [[Test_Automation]]
- 변형: [[CI_CD_Pipeline]] · [[Test_Automation|Test_Automation_Mastery]]
- 응용: [[Engineering Metrics (DORA)]] · [[Automated Quality & Review]]
- Adjacent: [[Continuous Integration (CI)|Continuous_Integration]] · [[Husky]]
## 🤖 LLM 활용
**언제**: generate edge cases, suggest mutation-resistant assertions, identify untested branches.
**언제 X**: never let LLM write the assertion AND implementation — confirmation bias.
## ❌ 안티패턴
- **Coverage worship**: 100% coverage, 0% assertions ("test executes but checks nothing").
- **Flaky tests ignored**: erodes trust in suite. Quarantine and fix immediately.
- **E2E-heavy pyramid**: slow, flaky, expensive. Push down to integration/unit.
- **Manual QA only**: doesn't scale, regression-prone.
- **No mutation testing**: blind to assertion quality.
## 🧪 검증 / 중복
- Verified (Google Testing Blog, Mike Cohn pyramid, Stryker docs).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — pyramid + 2026 LLM-assisted patterns |