Attach compressed rollouts to diagnostic reports as JSONL (#44175)

## Why

Diagnostic attachment reads assume the queued file path still exists and contains plain bytes. Compressed rollouts can therefore be omitted when only the logical `.jsonl` path is available, or attached as compressed data when a `.jsonl.zst` path is supplied.

## What changed

- Read rollout attachments through a bounded decoder that resolves plain or compressed representations without materializing a durable JSONL file.
- Use canonical `.jsonl` filenames for attachments and app-server report metadata, while preserving filename overrides.
- Apply size limits to decoded bytes and preserve JSONL prefix truncation.

## Testing

Add regression tests for compressed attachments, representation changes after queuing, plain-sibling preference, filename overrides, decoded size limits, truncation, nonregular files, and unrelated `.zst` attachments.

GitOrigin-RevId: b30f7dd08a741b0c99283460a1ce8933d2920ddf
This commit is contained in:
jif authored and copyberry committed 2026-09-09 15:12:19 +00:00
1 parent 17e64839eb
commit 0df1daf526
7 files changed
+292 -15

No files matched your search

@@ -206,7 +206,7 @@ impl FeedbackRequestProcessor {
.await
&& seen_attachment_paths.insert(rollout_path.clone())
{
thread.rollout_filename = rollout_path
thread.rollout_filename = codex_rollout::plain_rollout_path(&rollout_path)
.file_name()
.map(|name| name.to_string_lossy().into_owned());
attachment_paths.push(FeedbackAttachmentPath {