Loading...
Loading...
Compare original and translation side by side
不做根因调查,不许提修复方案No root cause investigation, no fix proposal对每个组件边界:
- 记录进入组件的数据
- 记录离开组件的数据
- 验证环境/配置的传递
- 检查每一层的状态
执行一次以收集证据,确定断裂点在哪里
然后分析证据,定位故障组件
然后针对该组件深入调查# 第 1 层:工作流
echo "=== Secrets available in workflow: ==="
echo "IDENTITY: ${IDENTITY:+SET}${IDENTITY:-UNSET}"
# 第 2 层:构建脚本
echo "=== Env vars in build script: ==="
env | grep IDENTITY || echo "IDENTITY not in environment"
# 第 3 层:签名脚本
echo "=== Keychain state: ==="
security list-keychains
security find-identity -v
# 第 4 层:实际签名
codesign --sign "$IDENTITY" --verbose=4 "$APP"root-cause-tracing.mdFor each component boundary:
- Record data entering the component
- Record data leaving the component
- Verify environment/configuration propagation
- Check state at each layer
Execute once to collect evidence, identify where the break occurs
Then analyze evidence to locate the faulty component
Then investigate that component in depth# Layer 1: Workflow
echo "=== Secrets available in workflow: ==="
echo "IDENTITY: ${IDENTITY:+SET}${IDENTITY:-UNSET}"
# Layer 2: Build script
echo "=== Env vars in build script: ==="
env | grep IDENTITY || echo "IDENTITY not in environment"
# Layer 3: Signing script
echo "=== Keychain state: ==="
security list-keychains
security find-identity -v
# Layer 4: Actual signing
codesign --sign "$IDENTITY" --verbose=4 "$APP"root-cause-tracing.mdsuperpowers:test-driven-developmentsuperpowers:test-driven-development| 借口 | 现实 |
|---|---|
| "问题很简单,不需要走流程" | 简单问题也有根本原因。对于简单 bug,流程很快就能走完。 |
| "紧急情况,没时间走流程" | 系统化调试比反复猜测式修复更快。 |
| "先试一下,再排查" | 第一次修复就定下了基调。从一开始就做对。 |
| "确认修复有效后再写测试" | 没有测试的修复留不住。先写测试才能证明修复有效。 |
| "一次修多个问题省时间" | 无法隔离哪个生效了。还会引入新 bug。 |
| "参考实现太长了,我自己改改" | 一知半解必然出 bug。完整阅读。 |
| "我看出问题了,让我修一下" | 看到症状 ≠ 理解根因。 |
| "再试一次"(在 2 次以上失败后) | 3 次以上失败 = 架构问题。质疑模式,不要继续修。 |
| Excuse | Reality |
|---|---|
| "The problem is simple, no need to follow the process" | Even simple problems have root causes. For simple bugs, the process is quick to complete. |
| "It's an emergency, no time for the process" | Systematic debugging is faster than trial and error. |
| "Try it first, then investigate" | The first fix sets the tone. Do it right from the start. |
| "Write tests after confirming the fix works" | Fixes without tests don't last. Writing tests first proves the fix works. |
| "Fixing multiple issues at once saves time" | You can't isolate what worked. It also introduces new bugs. |
| "The reference implementation is too long, I'll modify it myself" | Partial understanding inevitably leads to bugs. Read it fully. |
| "I see the problem, let me fix it" | Seeing the symptom ≠ understanding the root cause. |
| "Just try one more time" (after 2+ failures) | 3+ failures = architectural issue. Question the pattern, don't keep fixing. |
| 阶段 | 关键活动 | 通过标准 |
|---|---|---|
| 1. 根因 | 阅读错误、复现、检查变更、收集证据 | 理解了什么出了问题以及为什么 |
| 2. 模式 | 找到正常示例、对比 | 识别出差异 |
| 3. 假设 | 提出理论、最小化验证 | 假设被验证或产生新假设 |
| 4. 实施 | 创建测试、修复、验证 | bug 已修复,测试通过 |
| Phase | Key Activities | Pass Criteria |
|---|---|---|
| 1. Root Cause | Read errors, reproduce, check changes, collect evidence | Understand what went wrong and why |
| 2. Pattern | Find working examples, compare | Identify differences |
| 3. Hypothesis | Form theory, minimal verification | Hypothesis is verified or new hypothesis formed |
| 4. Implementation | Create test, fix, verify | Bug is fixed, tests pass |
root-cause-tracing.mddefense-in-depth.mdcondition-based-waiting.mdroot-cause-tracing.mddefense-in-depth.mdcondition-based-waiting.md