The Lua port that made Go bigger
Two cleanups removed 1,144 lines of handwritten Go. The next policy port added 111. Both were doing the right work.
Joel noticed that the Go client kept growing after choices had supposedly moved into Lua. In some paths we had added an editable policy and left the previous chooser in place. The cleanup finished those moves by removing the code that could still make the old decision.
The bump in the graph
The two starter cleanups removed 1,144 net Go lines. The Practice Stealth port then added 111 Go lines while moving the decision about using Stealth and its learned rank into Lua. That slice still needed Go to execute the cast and reconcile delayed or uncertain results. The dormant named-corpse cleanup then removed 138 Go lines and retained the exact-target interaction checks.
| Merged slice | Go | Lua |
|---|---|---|
| Starter cleanup | −1,144 | +237 |
| Practice Stealth | +111 | +18 |
| Dormant corpse policy | −138 | 0 |
| Cave cohort planning | 0 | +467 |
First starter cleanup · Second starter cleanup · Practice Stealth · Corpse policy removal
The cave caller was using the wrong clock
Moving the cave group, engager, and phase decisions into Lua exposed another boundary. Ember traced the caller and found it loading the character’s complete accepted Lua bundle under a 5 ms limit intended for a small standalone query. The maintained profile for a whole-bundle query allowed 1,000 ms. The change selected that profile at the real caller and corrected the tests while preserving the 5 ms and 32 KiB native defaults.
The revised test still used the full cohort input and checked the exact result under the whole-bundle profile. The host and native CI jobs ran in parallel, and both had to succeed for the required check.
| Job | Elapsed time |
|---|---|
| Host checks | 10 min 25 s |
| Native checks | 5 min 08 s |
| Required aggregate | 2 s |
The merge time dates this entry. The CI run qualifies the source. Cave catch-up in the running game needs a separate observation.