Surfaced by the detritus code survey.
What: setup.go:663-899 reimplements TOML table upsert — including inline-table brace matching and string-aware entry splitting (findMatchingBrace, splitInlineTOMLEntries) — ~240 lines of bespoke parser to edit Codex's config.toml without a TOML library.
Why it matters: a partial hand-parser over someone else's config format is a standing correctness/maintenance liability — the exact "every addition must justify its cost / reject fragility" the doctrine preaches.
Direction: use a real TOML library (BurntSushi/toml or pelletier/go-toml) for the read-modify-write, or narrow the surface it must handle and document the constraint.
Surfaced by the detritus code survey.
What:
setup.go:663-899reimplements TOML table upsert — including inline-table brace matching and string-aware entry splitting (findMatchingBrace,splitInlineTOMLEntries) — ~240 lines of bespoke parser to edit Codex'sconfig.tomlwithout a TOML library.Why it matters: a partial hand-parser over someone else's config format is a standing correctness/maintenance liability — the exact "every addition must justify its cost / reject fragility" the doctrine preaches.
Direction: use a real TOML library (
BurntSushi/tomlorpelletier/go-toml) for the read-modify-write, or narrow the surface it must handle and document the constraint.