FIELD NOTES
Give your AI-built app a small recovery drill
Test a harmless failure in staging, capture the recovery timeline, and turn the result into a runbook someone else can follow.

“We can roll it back” sounds great until the first time somebody asks who has the command, which image was good, and whether the database still understands that old version. I would rather discover those questions during a small rehearsal. AI-generated code deserves the same operational homework as everything else we ship.
This exercise uses an isolated staging application and synthetic records. It is not an invitation to break a live service. The Google SRE Workbook chapter on incident response provides useful background on coordination. Here is my practical starter drill for a small team.
Choose one failure you can reverse
Pick a read-only dependency timeout. Replace the staging dependency with a stub that delays its response beyond the client's configured deadline. Write down the expected user experience: an understandable error, a bounded wait, and a working retry button. Define a stop condition before injecting the fault, such as unexpected writes or traffic reaching production.
Assign an operator and an observer. The operator follows the runbook; the observer records events and checks the stop condition. For a solo project, record a sanitized timeline and repeat the exercise later using only the written instructions. Familiarity with the application can hide missing steps.
Start the clock at the symptom
Record when the fault starts, when monitoring detects it, when someone identifies the affected dependency, and when the user-facing check recovers. These are different moments. A green process-health endpoint is not recovery if the user's request still hangs.
Capture the release identifier, relevant trace IDs, and the configuration switch used for the drill. Do not paste complete prompts, customer payloads, or secrets into the incident note. The question is whether the evidence helps distinguish a model error, a tool timeout, and a broken service boundary.
Recover, then verify from the outside
Remove the injected delay or restore the known-good staging configuration. Use a fresh client request to verify the actual workflow. Inspect queued work and background retries; the visible page can recover while a queue keeps replaying failed jobs. If rollback is your chosen recovery, verify the image and schema compatibility beforehand rather than guessing during the drill.
Your recovery note should include the exact environment, command or UI action, expected response, validation request, and stop condition. “Restart it” is not a runbook. “Restart staging worker X, expect ready within Y seconds, then submit this synthetic request and inspect its recorded result” is something another person can execute.
Keep the lesson small enough to use
Finish with three observations: what detected the failure, what delayed diagnosis, and which instruction was missing. Give each correction an owner and a verification step. Rerun the affected part after the fix; writing a ticket alone does not prove recovery improved.
Avoid turning one rehearsal into a reliability score for the whole app. You tested one failure mode under particular conditions. Next time, choose a different boundary, such as an unavailable model endpoint or a full queue. In Japanese, 復旧を確認しました means “I verified recovery.” Save that sentence for the point when the user's workflow actually works again.
AIで作ったアプリの復旧を小さく練習する
「前の版に戻せます」と言うのは簡単だ。でも、誰が操作するのか、どのイメージが正常だったのか、古い版で現在のデータを読めるのか。その疑問は、本番障害より小さな練習で見つけたい。AI生成コードにも運用の準備は必要だ。
ここでは独立した検証環境と架空のデータを使う。本番を壊す練習ではない。連携の考え方はGoogle SREの障害対応の章も参考になる。
元に戻せる故障を一つ選ぶ
読み取り専用の依存サービスを、応答が遅い模擬サービスに置き換える。クライアントの制限時間を超えたら、分かるエラー、有限の待ち時間、使える再試行ボタンが必要だ。想定外の書き込みや本番への通信が出たら中止する、と先に決めておく。
操作担当と観察担当を分けよう。一人なら、機密情報のない時系列を残し、後日、手順書だけで繰り返す。アプリに詳しい人ほど、説明に必要な手順を省いてしまうことがある。
症状から回復までを記録する
故障開始、監視による検知、原因となる依存先の特定、利用者の操作の回復を別々に記録する。プロセスの健康確認が成功しても、利用者の要求が止まったままなら復旧ではない。
版のID、必要なトレースID、練習で変更した設定を残す。プロンプト全文、顧客データ、秘密情報は貼らない。モデルの誤り、ツールの待ち時間超過、サービス間の問題を区別できる証拠が欲しい。
外側から復旧を確かめる
遅延を取り除くか、正常だった設定へ戻す。新しい要求を送って利用者の流れを確認する。画面が直っても、キューや背景処理の再試行が失敗し続けているかもしれない。ロールバックを使うなら、イメージとデータ形式の互換性を事前に確認する。
手順書には環境、操作、期待する応答、確認方法、中止条件を書く。「再起動する」だけでは足りない。どのワーカーを再起動し、いつまでに何が起き、どの架空の要求で確かめるかを書こう。
次に使える改善を残す
何が検知したか、何が診断を遅らせたか、どの指示が不足したかをまとめる。修正には担当者と確認方法を付け、直した部分を再試験する。チケットを作っただけで改善したとは言えない。
一回の練習でアプリ全体の信頼性を評価しない。今回は特定の条件で一種類の故障を試しただけだ。次はモデルの接続先やキューを選べる。「復旧を確認しました」は、利用者の操作が実際に戻ったときに使いたい言葉だ。



