The Codex agent's drift lists its config's tables on every look
(TOMLTables), and the list came from the whole parse. Over a Codex
config.toml with ~11k projects, the drift polls of an open page kept that
parse (3 to 5 MB) alive and it was never let go. GetTOMLTop and
GetTOMLTable answers were already kept beside the parse. The table list
is now kept there too, copied out of the file's text, so the idle drop
can let the parse go while a page is open.
Run (mote, at 648cd3fdb + this; mote's load was ~29 on 18 cores and
mica's ~31 on 12, so neither had room and the run went to mote):
- go vet ./internal/edit; go test -count=1 ./internal/edit
./internal/agent ./internal/library: ok.
- New TestTOMLTablesKeptWhenIdle: red on the old toml.go ("listing the
tables parsed the file 1 times"), green with this.
- Real-account sandbox with the owner's real probe history, web mode, page
open in Playwright Chromium, heap at 2m32s, alternating builds:
w39 (before) live heap 80.2 / 80.8 MB, tomlFileOf holding 6 MB;
w40 (this) live heap 76.4 / 76.7 MB, no tomlFileOf in the heap.
The footprint is noise (127-136 MB in both).
Not run: the full suite and the GUI suite (no GUI change).