Skip to content

[codex] Make command exec delta tests chunk tolerant#17999

Merged
euroelessar merged 2 commits intomainfrom
ruslan/command-exec-delta-chunks
Apr 16, 2026
Merged

[codex] Make command exec delta tests chunk tolerant#17999
euroelessar merged 2 commits intomainfrom
ruslan/command-exec-delta-chunks

Conversation

@euroelessar
Copy link
Copy Markdown
Collaborator

@euroelessar euroelessar commented Apr 15, 2026

Summary

  • Make command/exec output-delta tests accumulate streamed chunks instead of assuming complete logical output in a single notification.
  • Collect stdout and stderr independently so stream interleaving does not fail the pipe streaming test.

Why

The command/exec protocol exposes output as deltas, so tests should not rely on chunk boundaries being stable. A line like out-start\n may arrive split across multiple notifications, and stdout/stderr notifications may interleave.

Validation

  • just fmt
  • git diff --check
  • cargo test -p codex-app-server suite::v2::command_exec

@euroelessar euroelessar marked this pull request as ready for review April 15, 2026 21:23
assert!(delta.cap_reached);
let deadline = Instant::now() + DEFAULT_READ_TIMEOUT;
let mut stdout = String::new();
loop {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't we add a mehtod below do to just this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are slightly different, but let me think a bit more

@euroelessar euroelessar merged commit f948690 into main Apr 16, 2026
54 of 58 checks passed
@euroelessar euroelessar deleted the ruslan/command-exec-delta-chunks branch April 16, 2026 00:57
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 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