Skip to content

app-server: structure and test JSON shutdown logs#30314

Merged
bolinfest merged 1 commit into
mainfrom
pr30314
Jun 27, 2026
Merged

app-server: structure and test JSON shutdown logs#30314
bolinfest merged 1 commit into
mainfrom
pr30314

Conversation

@bolinfest

@bolinfest bolinfest commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Why

LOG_FORMAT=json and RUST_LOG are supported by app-server, but the behavior was only covered indirectly. We should verify the actual JSONL written by both user-facing entry points: codex app-server and the standalone codex-app-server binary.

The existing processor shutdown message also always said the channel closed, even though the processor can exit for several different reasons. Structured fields make that event more accurate and useful to log consumers.

What changed

  • Record the processor exit_reason, remaining connection count, and forced-shutdown state as structured tracing fields.
  • Add a shared process-test helper that enables JSON logging, validates every stderr line as JSON, and verifies the top-level timestamp is RFC 3339.
  • Cover both codex app-server and codex-app-server, asserting the stable level, fields, and target payload.

Test plan

  • just test -p codex-app-server standalone_app_server_emits_json_info_events
  • just test -p codex-cli app_server_emits_json_info_events

@bolinfest bolinfest changed the title app-server: test JSON tracing output app-server: structure and test JSON shutdown logs Jun 27, 2026
@bolinfest bolinfest requested a review from maxj-oai June 27, 2026 00:38
@bolinfest bolinfest merged commit 4f1b5a4 into main Jun 27, 2026
50 of 69 checks passed
@bolinfest bolinfest deleted the pr30314 branch June 27, 2026 01:19
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants