[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,95 +2,193 @@
|
||||
id: wiki-2026-0508-science-of-failure
|
||||
title: Science of Failure
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [P-Reinforce-AUTO-SCFA-001]
|
||||
aliases: [Failure Science, Postmortem Culture, Learning from Failure]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.94
|
||||
tags: [auto-reinforced, Psychology, engineering, learning-from-fail, Innovation]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [reliability, postmortem, sre, chaos-engineering, learning-org]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-20
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: english
|
||||
framework: SRE
|
||||
---
|
||||
|
||||
# [[Science of Failure|Science of Failure]]
|
||||
# Science of Failure
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> "실패를 자산으로 전환하는 연금술: 실수를 비난하고 감추는 대신, 그 속에 숨겨진 인과관계를 객관적으로 분해하여 시스템의 취약점을 보완하는 실용적 학습 과학."
|
||||
## 매 한 줄
|
||||
> **"매 failure 는 system 의 information signal — 매 blame 의 X, 매 learning 의 O"**. 매 origin 은 1979 Three Mile Island 와 NASA Challenger postmortem culture; 매 modern state 는 Google SRE blameless postmortem, Netflix Chaos Monkey, Honeycomb observability + AI-aided incident review (Claude Opus 4.7 transcript summarization).
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
실패학(Science of Failure)은 발생한 사고나 실수의 원인을 과학적으로 규명하여 재발을 방지하고 조직의 학습 역량을 극대화하는 학문적 접근입니다.
|
||||
## 매 핵심
|
||||
|
||||
1. **실패의 층위 (The Fail Hierarchy)**:
|
||||
* **Simple Failure**: 조심성 부족이나 사소한 부주의로 인한 실패. (관리 대상)
|
||||
* **Systemic Failure**: 프로세스의 결함으로 인해 누가 그 자리에 있어도 일어날 수밖에 없는 실패. (개선 대상)
|
||||
* **Intelligent Failure**: 가설을 검증하기 위한 실험 과정에서 발생하는 유익한 실패. (권장 대상)
|
||||
2. **분석 도구**:
|
||||
* **Post-mortem (사후 검토)**: 사건 발생 후 비난 없이(Blameless) 타임라인과 원인을 철저히 복기.
|
||||
* **Root Cause [[Analysis|Analysis]] (RCA)**: '5 Whys' 기법 등을 통해 겉으로 드러난 증상 너머의 근본 원인 탐색.
|
||||
* **Swiss Cheese Model**: 여러 겹의 방어막에 뚫린 구멍이 일직선이 될 때 사고가 일어남을 이해.
|
||||
3. **학습 문화**:
|
||||
* 실패를 용인하는 심리적 안전감(Psycho[[Logic|Logic]]al Safety)이 혁신의 선결 조건임을 강조.
|
||||
### 매 failure 의 분류 (Westrum 1988 → 매 현대 적용)
|
||||
- **Pathological**: 매 messenger shoot, 매 hide failure → 매 pre-mortem culture.
|
||||
- **Bureaucratic**: 매 narrow responsibility, 매 novelty crush.
|
||||
- **Generative**: 매 high cooperation, 매 inquiry, 매 messenger trained — 매 Google/Netflix 의 target.
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌**: 과거에는 "실패는 성공의 어머니"라는 격언적 수준에 머물렀으나, 현대 기업 정책은 실패 데이터를 수집하고 분류하여 '위험 예측 알고리즘'에 주입하는 통계적 자산화 단계로 발전함(RL Update).
|
||||
- **정책 변화(RL Update)**: 항공 및 원자력 등 고위험 산업에서 적용되던 '비난 없는 보고 정책(Non-punitive Reporting)'이 IT 서비스 운영 및 일반 기업 인사 정책으로 확산되며, 실수 보고 시 포상을 주는 역발상 정책이 도입되기도 함.
|
||||
### 매 blameless postmortem 의 5 components
|
||||
- **Timeline**: UTC, 매 minute precision.
|
||||
- **Impact**: user-facing metric (RPS, error budget burn).
|
||||
- **Root cause**: 매 5 whys + contributing factors.
|
||||
- **Action items**: owner + due date.
|
||||
- **Lessons**: 매 process change, 매 not individual blame.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- [[Psychology & Behavior|Psychology & Behavior]], [[Risk Management|Risk Management]], [[Rapid-Prototyping|Rapid-Prototyping]], [[Philosophy|Philosophy]] of Science, Human-Error-Analysis
|
||||
- **Modern Tech/Tools**: Incident reporting[[_system|system]]s, Blameless Post-mortem templates.
|
||||
---
|
||||
### 매 응용
|
||||
1. SRE error budget — 매 SLO violation 시 launch freeze.
|
||||
2. Chaos engineering — 매 prod fault injection 으로 latent failure surface.
|
||||
3. Pre-mortem — 매 launch 전 "matrix this failed, why?".
|
||||
4. Game days — 매 quarterly disaster sim.
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
## 💻 패턴
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
### 매 blameless postmortem template (Markdown)
|
||||
```markdown
|
||||
# Incident: <name> (YYYY-MM-DD)
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
**Severity**: SEV-2
|
||||
**Duration**: 47 min (14:03–14:50 UTC)
|
||||
**Impact**: 12% of /api/v2 requests 5xx
|
||||
**On-call**: @alice (commander), @bob (comms)
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
## Timeline (UTC)
|
||||
- 14:03 — deploy v2.41.0 to prod
|
||||
- 14:05 — error rate alarm fires (PagerDuty)
|
||||
- 14:12 — rollback initiated
|
||||
- 14:50 — error rate normal
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
## Root cause
|
||||
DB migration added NOT NULL on `users.email` w/o backfill.
|
||||
Old code paths (canary not yet drained) wrote NULL → constraint violation.
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
## Contributing factors
|
||||
- Migration runner did not block on canary drain (process gap)
|
||||
- Schema diff review missed NOT NULL implication (review gap)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
## Action items
|
||||
- [ ] @alice — migration runner: enforce canary-drain gate (P0, 2026-05-17)
|
||||
- [ ] @bob — schema-diff bot: flag NOT NULL on existing column (P1, 2026-05-24)
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
## What went well
|
||||
- Rollback under 10 min (rollback runbook v3 worked)
|
||||
- On-call comms was fast
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
## What did not
|
||||
- Canary drain assumption was tribal knowledge
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
## Lessons
|
||||
Migration-runner gate is the structural fix.
|
||||
Not "alice should have known" — process is the fix.
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### 매 5-whys (chained, 매 not individual blame)
|
||||
```text
|
||||
Why 5xx? → DB constraint violation
|
||||
Why violation? → NULL written to NOT NULL col
|
||||
Why NULL? → old canary still running old code
|
||||
Why canary running? → migration ran w/o waiting for canary drain
|
||||
Why no wait? → migration runner has no canary-state hook
|
||||
→ FIX: migration runner must check canary state
|
||||
```
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### 매 chaos monkey (매 Litmus / Chaos Mesh, K8s native, 2026)
|
||||
```yaml
|
||||
apiVersion: chaos-mesh.org/v1alpha1
|
||||
kind: PodChaos
|
||||
metadata:
|
||||
name: kill-payments-pod-randomly
|
||||
spec:
|
||||
action: pod-kill
|
||||
mode: one
|
||||
selector:
|
||||
namespaces: [payments]
|
||||
labelSelectors:
|
||||
app: payments-api
|
||||
scheduler:
|
||||
cron: "@every 30m" # 매 prod hour 동, 매 random pod kill
|
||||
```
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### 매 error budget burn alert (Google SRE, multi-window)
|
||||
```yaml
|
||||
# 매 fast burn (1h window, 14.4x rate) + slow burn (6h, 6x) — 2-window
|
||||
- alert: SLOFastBurn
|
||||
expr: |
|
||||
(1 - sum(rate(http_requests_success[1h])) / sum(rate(http_requests_total[1h])))
|
||||
> (1 - 0.999) * 14.4
|
||||
labels: { severity: page }
|
||||
annotations: { summary: "Burning SLO 14.4x — page on-call" }
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
- alert: SLOSlowBurn
|
||||
expr: |
|
||||
(1 - sum(rate(http_requests_success[6h])) / sum(rate(http_requests_total[6h])))
|
||||
> (1 - 0.999) * 6
|
||||
labels: { severity: ticket }
|
||||
```
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
### 매 pre-mortem prompt (매 team session)
|
||||
```text
|
||||
"매 6개월 후 — 매 launch 가 catastrophic failure.
|
||||
매 NYTimes headline 이 'Company X loses $100M'.
|
||||
매 어떻게 그 일이 일어났을지 — 매 5 most likely scenarios 작성."
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
→ 매 pre-mortem 은 cognitive bias (overconfidence) 회피, 매 risk 표면화.
|
||||
```
|
||||
|
||||
### 매 incident summarizer (Claude Opus 4.7, transcript → postmortem draft)
|
||||
```python
|
||||
import anthropic
|
||||
client = anthropic.Anthropic()
|
||||
|
||||
slack_log = open("incident-2026-05-09.log").read()
|
||||
msg = client.messages.create(
|
||||
model="claude-opus-4-7",
|
||||
max_tokens=4096,
|
||||
system=(
|
||||
"You are an SRE writing a blameless postmortem. "
|
||||
"Extract: timeline (UTC), impact, root cause (5 whys), "
|
||||
"contributing factors, action items. Never name-blame; "
|
||||
"frame failures as process gaps."
|
||||
),
|
||||
messages=[{"role": "user", "content": slack_log}],
|
||||
)
|
||||
print(msg.content[0].text)
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| 매 SEV-1 user-impacting | full blameless postmortem (24h SLA) |
|
||||
| 매 SEV-3 internal-only | lightweight 5-whys (1 page) |
|
||||
| 매 near-miss (no impact) | "near-miss log" — 매 still learn |
|
||||
| 매 individual error pattern | 매 process gap 분석 (매 PIP X) |
|
||||
|
||||
**기본값**: 매 SEV-2+ → blameless postmortem with action items + owners.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[SRE]] · [[Reliability Engineering]]
|
||||
- 변형: [[Chaos Engineering]] · [[Pre-mortem]]
|
||||
- 응용: [[Incident Response]] · [[Error Budget]] · [[Postmortem]]
|
||||
- Adjacent: [[Learning Organization]] · [[Just Culture]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 Slack/PagerDuty transcript → postmortem first draft (Claude Opus 4.7 1M ctx 으로 매 long incident 통째로). 매 5-whys facilitation.
|
||||
**언제 X**: 매 root cause 의 final attribution — 매 human judgment 필요. 매 LLM 의 "blame" hallucination 위험.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Blame culture**: 매 "who screwed up?" → 매 hide future failure.
|
||||
- **Action-item theater**: 매 owner X, due date X → 매 never done.
|
||||
- **Single root cause**: 매 real failure 는 multi-factor — 매 swiss-cheese model.
|
||||
- **Postmortem-as-punishment**: 매 PIP 와 결합 → 매 honesty 죽음.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Google SRE Book Ch.15, Westrum 1988, Sidney Dekker "Field Guide to Understanding Human Error").
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — blameless postmortem + chaos eng + LLM-aided draft |
|
||||
|
||||
Reference in New Issue
Block a user