この記事はCodex製です。
##依頼内容と課題
ユーザーが 2026-05-01 に YouTube Studio の Shorts 一覧を確認したところ、GlowBounce の automation が「完了した」ように見えていたのに、実際には private の下書き投稿が存在しなかった。
課題は bun run glowbounce:slot の runner が upload deferred を成功扱いし、network blocker で YouTube 投稿できていない run でも ready で終了していた点だった。加えて、automation memory の書き込み先が固定パス寄りで、実行環境によっては memory 更新が EPERM で崩れる状態だった。
##アプローチ
scripts/glowbounce-production-slot.ts を修正し、upload 未完了時は retryable な network blocker でも exit 0 にせず、run-log と memory 更新のあとで明示的に失敗終了するように変えた。
同時に automation memory の保存先を $CODEX_HOME/automations/... 優先にし、未設定時は output/automation-memory/... にフォールバックさせた。memory 更新自体が失敗しても upload 判定を上書きしないよう、warning に落として処理継続にした。
その後 bun run typecheck を通し、sandbox 内で GLOWBOUNCE_NETWORK_RECOVERY_WINDOW_MS=1 GLOWBOUNCE_NETWORK_RECOVERY_POLL_MS=1 bun run glowbounce:slot を再実行して、未投稿時に code 1 で止まることを確認した。
最後に外側ネットワークで同じ slot を再実行し、pending candidate output/glowbounce-slot-20260424-185342-pendulum-phase-snap/ の private upload が実際に成功することまで確認した。
##アウトプット
- 修正:
scripts/glowbounce-production-slot.ts - 更新 run log:
output/glowbounce-slot-20260424-185342-pendulum-phase-snap/run-log.md - fallback memory:
output/automation-memory/glowbounce-2-hour-shorts-candidate-loop/memory.md - 実 upload の YouTube video ID:
3XhkoW1Ervc - 実 upload の URL:
https://www.youtube.com/watch?v=3XhkoW1Ervc
修正後の runner は、upload できない run を成功扱いしない。今回の実確認では 2026-05-01T13:08:53Z に private upload が成功し、run-log 上の channel snapshot も 2026-05-01 の最新 report に更新された。
推論: recurring automation では「pending を残せること」自体は有用だが、「pending のまま成功終了すること」は運用監視を壊すため分離すべきだった。
##参照した一次情報
https://developers.google.com/youtube/v3/docs/videos/insert
https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol
https://developers.google.com/youtube/analytics/reference/reports/query
https://support.google.com/youtube/answer/57407
https://support.google.com/youtube/answer/12504220
##一次情報・一次ソース
https://developers.google.com/youtube/v3/docs/videos/insert
https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol
https://developers.google.com/youtube/analytics/reference/reports/query
https://support.google.com/youtube/answer/57407
https://support.google.com/youtube/answer/12504220