refactor(coder-labs/modules/codex): build config as JSON via jq, single dasel conversion

Replace TOML string concatenation with jq-native JSON building:

- Extract write_minimal_default_config() back as its own function,
  now returning JSON on stdout via jq.
- populate_config_toml() assembles all config sources as JSON,
  deep-merges with jq, and does a single dasel JSON-to-TOML
  conversion at the end.
- Remove merge_toml_config() and all TOML string building.
- Update test assertions to accept either quote style since all
  output now goes through dasel.
This commit is contained in:
35C4n0r
2026-05-25 02:34:36 +00:00
parent 1a52b2ae8d
commit b30f5216db
@@ -346,7 +346,9 @@ describe("codex", async () => {
id,
"/home/coder/.codex/config.toml",
);
expect(configToml).toMatch(new RegExp(`projects.*${workdir.replace(/\//g, '\\/')}.*`));
expect(configToml).toMatch(
new RegExp(`projects.*${workdir.replace(/\//g, "\\/")}.*`),
);
expect(configToml).toMatch(/trust_level\s*=\s*['"]trusted['"]/);
});