Skip to content

fix(cli): safely patch Codex TOML stdio args - #3075

Open
fahreddinozcan wants to merge 3 commits into
masterfrom
ctx7-2471-fix-toml-editor-on-ctx7
Open

fix(cli): safely patch Codex TOML stdio args#3075
fahreddinozcan wants to merge 3 commits into
masterfrom
ctx7-2471-fix-toml-editor-on-ctx7

Conversation

@fahreddinozcan

Copy link
Copy Markdown
Collaborator

Summary

  • replace the line-by-line TOML/JSON parsing path with a focused, dependency-free TOML string-array editor
  • patch only the existing Context7 args value so pinned package versions, comments, cwd, inline env, and nested environment tables remain untouched
  • support multiline arrays, trailing commas, comments, literal/basic strings, escapes, and CRLF
  • fail closed without writing when an existing stdio entry cannot be edited safely
  • keep the TOML parsing/editing utilities isolated in setup/toml-editor.ts

Fixes #3060

Verification

  • pnpm --filter ctx7 test — 258/258 passed
  • pnpm --filter ctx7 typecheck
  • pnpm --filter ctx7 lint:check
  • pnpm --filter ctx7 format:check
  • pnpm --filter ctx7 build
  • git diff --check

@linear-code

linear-code Bot commented Aug 25, 2026

Copy link
Copy Markdown

CTX7-2471

@context7

context7 Bot commented Aug 25, 2026

Copy link
Copy Markdown

Docs7 preview for context7.com

Status Commit Updated (UTC)
✅ Ready (visit preview) e028827 2026-08-25 08:07

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

Labels

None yet

Projects

None yet

2 participants