Skip to content

fix(elixir): fix malformed JSON event form codex message#50

Open
kevinw-openai wants to merge 2 commits intoopenai:mainfrom
kevinw-openai:dev/codex/kevinw/fix-codex-stream-noise
Open

fix(elixir): fix malformed JSON event form codex message#50
kevinw-openai wants to merge 2 commits intoopenai:mainfrom
kevinw-openai:dev/codex/kevinw/fix-codex-stream-noise

Conversation

@kevinw-openai
Copy link
Collaborator

Screenshot 2026-03-12 at 4 27 20 PM

Summary:

  • only emit malformed Codex events for JSON-like protocol frames that fail to decode
  • keep logging non-JSON stream output without surfacing it to the orchestrator dashboard
  • add regression coverage for stderr noise and malformed protocol frames

Rationale:

  • Codex can write diagnostics to stderr during healthy turns, and the merged stdio stream was incorrectly surfacing those lines as malformed JSON events in the Symphony UI
  • keeping malformed detection for JSON-looking frames preserves signal for actual protocol corruption while removing false positives

Tests:

  • mise exec -- mix format lib/symphony_elixir/codex/app_server.ex test/symphony_elixir/app_server_test.exs
  • MIX_ENV=test mise exec -- mix run --no-start -e 'Application.put_env(:symphony_elixir, :workflow_file_path, System.fetch_env!("SYMPHONY_TEST_WORKFLOW")); Mix.Task.run("test", ["test/symphony_elixir/app_server_test.exs"])'

Summary:
- only emit malformed Codex events for JSON-like protocol frames that
  fail to decode
- keep logging non-JSON stream output without surfacing it to the
  orchestrator dashboard
- add regression coverage for stderr noise and malformed protocol
  frames

Rationale:
- Codex can write diagnostics to stderr during healthy turns, and the
  merged stdio stream was incorrectly surfacing those lines as
  malformed JSON events in the Symphony UI
- keeping malformed detection for JSON-looking frames preserves signal
  for actual protocol corruption while removing false positives

Tests:
- mise exec -- mix format lib/symphony_elixir/codex/app_server.ex
  test/symphony_elixir/app_server_test.exs
- MIX_ENV=test mise exec -- mix run --no-start -e
  'Application.put_env(:symphony_elixir, :workflow_file_path,
  System.fetch_env!("SYMPHONY_TEST_WORKFLOW")); Mix.Task.run("test",
  ["test/symphony_elixir/app_server_test.exs"])'

Co-authored-by: Codex <noreply@openai.com>
Resolved the only content conflict in
`elixir/test/symphony_elixir/app_server_test.exs` by keeping both the new
malformed-stream regression coverage and main's SSH app-server coverage.

Validation:
- MIX_ENV=test mise exec -- mix run --no-start -e 'Application.put_env(:symphony_elixir, :workflow_file_path, System.fetch_env!("SYMPHONY_TEST_WORKFLOW")); Mix.Task.run("test", ["test/symphony_elixir/app_server_test.exs"])'

Co-authored-by: Codex <noreply@openai.com>
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