Claude Code’s Godot Installer Failed Until It Tested the Actual Export
In a first-person report, a developer says Claude Code built an ad-hoc signed macOS test installer for a Godot game, then mistakenly passed 412 tests before the installed app crashed at launch. The author traced one failure to an empty resource-path array in the export and another to a callback left by startup profiling. Claude Code then changed the build process to mount the exported disk image, play a level automatically, and treat nonzero exit codes or logged errors as failures.
The case demonstrates that AI-assisted build pipelines should test the distributed artifact rather than assume that passing project-level tests validates the packaged application.
前三篇讲了开工、美术和战役玩法。这一篇讲第一次把游戏交给别人玩:打一个 Mac 试玩包。
10 月 26 日 17:00 到 18:16,我对 Claude Code 说了 4 句话:「帮我打包一个安装包」「启动太慢了,性能优化一下」「打开一下,我试玩一下」「崩了?」。这 76 分钟里,AI 只下载了导出模板里需要的 126 MB(完整包 1281 MB),打出了带签名和打开说明的安装包;把 1.5 到 3.5 秒的启动时间拆开,确认游戏自己只占 0.5 秒左右;然后它的启动优化让安装包一点「出征」就崩。本文按顺序讲这三段,重点是最后一段:崩溃怎么来的,以及之后打包流程改成了什么样。
崩溃这件事值得单独说。那一版交付前,412 个测试全部通过,从项目目录运行也没有任何报错,AI 交付时写的是「新包也确认过启动图已经打进去」。问题在于它验证的是项目,我和试玩的人用的是安装包,两者加载资源的方式不一样。测试数量再多,测的不是交付物,就证明不了交付物能用。修完之后,AI 把「用导出的安装包实际打一关,看退出码」加进了打包命令,这条检查第一次运行就抓到了第二个崩溃。