Skip to content

fix(installer): preserve Codex TOML array tables#624

Open
chiehwangs wants to merge 1 commit into
colbymchenry:mainfrom
chiehwangs:codex/fix-installer-preserve-toml-array-tables
Open

fix(installer): preserve Codex TOML array tables#624
chiehwangs wants to merge 1 commit into
colbymchenry:mainfrom
chiehwangs:codex/fix-installer-preserve-toml-array-tables

Conversation

@chiehwangs
Copy link
Copy Markdown

Summary

  • preserve TOML [[array-of-tables]] sections that follow the Codex MCP entry
  • add regression coverage for both reinstall and uninstall paths
  • document the user-visible installer fix in the changelog

Root cause

The Codex TOML helper located the end of [mcp_servers.codegraph] by searching for the next table header, but intentionally skipped [[array-of-tables]] headers. When an array table followed the CodeGraph MCP entry, reinstalling or uninstalling CodeGraph treated that sibling configuration as part of the CodeGraph block and removed it.

Validation

  • git diff --check
  • npx vitest run __tests__/installer-targets.test.ts
  • npm run build
  • full Vitest suite with fork workers using --liftoff-only: 52 test files passed, 1096 tests passed, 2 skipped

Notes

On Node v24.15.0, plain npm test reproduces the repository-documented V8 WASM Turboshaft Fatal process out of memory: Zone failure. Passing --liftoff-only to Vitest fork workers applies the existing runtime workaround and completes the full suite.

Treat following [[array-of-tables]] headers as sibling boundaries when replacing or removing [mcp_servers.codegraph], so codegraph install and uninstall do not remove unrelated Codex configuration.

Tests:
- npx vitest run __tests__/installer-targets.test.ts
- npm run build
- full Vitest suite with fork workers using --liftoff-only
@chiehwangs chiehwangs marked this pull request as ready for review June 1, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant