oops
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOops
Oops
Fix infrastructure failures. Applies to both user-project code and Noodle-internal state.
修复基础设施故障,适用于用户项目代码和Noodle内部状态。
Fix flow
修复流程
Reproduce -> Diagnose -> Fix -> Verify -> Commit
复现 -> 诊断 -> 修复 -> 验证 -> 提交
1. Reproduce
1. 复现
Run the failing command. Capture exact error output. If intermittent, run multiple times to confirm.
运行失败的命令,捕获准确的错误输出。如果是偶发问题,多次运行以确认现象。
2. Diagnose
2. 诊断
Suspect state before code. Check in this order:
- Noodle state — files, queue consistency, config validity
.noodle/ - Environment — Go version, missing deps, stale caches, tmux session health
- Config — (project root),
.noodle.tomlstructure,.agents/skills/integritybrain/ - Persistent files — lock files, temp files, incomplete writes
- Code — only after ruling out state and environment
优先怀疑状态问题,而非代码问题。 按以下顺序排查:
- Noodle 状态 — 目录文件、队列一致性、配置有效性
.noodle/ - 环境 — Go 版本、依赖缺失、缓存过期、tmux 会话健康状态
- 配置 — (项目根目录)、
.noodle.toml目录结构、.agents/skills/完整性brain/ - 持久化文件 — 锁文件、临时文件、未完成写入
- 代码 — 仅在排除状态和环境问题后排查
Principles
原则
- [[fix-root-causes]]
- [[prove-it-works]]
Noodle-internal checklist:
- state files: corrupt, stale, or inconsistent?
.noodle/ - Queue state: orphaned tasks, stuck sessions?
- Config: valid TOML, referenced paths exist?
- tmux sessions: zombie processes, detached sessions?
- [[fix-root-causes]]
- [[prove-it-works]]
Noodle 内部检查清单:
- 状态文件:是否损坏、过期或不一致?
.noodle/ - 队列状态:是否存在孤立任务、卡住的会话?
- 配置:TOML 是否有效,引用的路径是否存在?
- tmux 会话:是否存在僵尸进程、已分离的会话?
3. Fix
3. 修复
Trace to root cause. Never paper over symptoms.
After fixing, grep for the same pattern elsewhere — the bug may exist in multiple locations.
追溯到根本原因,绝不要只掩盖症状。
修复完成后,在其他位置 grep 相同的模式 —— 该 bug 可能存在于多处。
4. Verify
4. 验证
Run the original failing command. Confirm it passes. Run related tests to check for regressions.
运行最初失败的命令,确认其通过。运行相关测试以检查是否存在回归问题。
5. Commit
5. 提交
Commit message describes the root cause, not symptoms.
undefined提交信息需描述根本原因,而非症状。
undefinedGood: fix(queue): stale lock file prevented task dequeue after crash
Good: fix(queue): stale lock file prevented task dequeue after crash
Bad: fix: tasks not running
Bad: fix: tasks not running
undefinedundefined