Skip to content

setup.go hand-rolls a ~240-line TOML editor for Codex config #150

Description

@CBosch101

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    survey-fault-lineWeakness surfaced by the code survey

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions