Skip to content

output: improve terminal text event readability - #1099

Merged
cfc4n merged 1 commit into
masterfrom
bugfix/readable-terminal-text
Nov 22, 2026
Merged

cfc4n merged 1 commit into
masterfrom
bugfix/readable-terminal-text

Conversation

@cfc4n

@cfc4n cfc4n commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

HTTP requests and responses currently repeat the event prefix on every terminal line and render CRLF as visible \x0d escapes. This change prints one prefix per text event and preserves the payload bytes, including line endings and blank lines.

Decoded text summaries now show pid and pname as separate fields. The displayed connection contains only the original endpoint tuple, transport, and generation; its legacy PID-FD-name prefix is removed. SDK connection IDs and typed event UUIDs remain unchanged. Operational logs and keylog records keep their existing line labels and control-character escaping.

Console and formatter tests, strict OpenSSL stdout/stderr E2E assertions, shared terminal projections, and output documentation are updated together. The E2E cases use text/pcapng and compare complete terminal payloads with decoded JSON TEXT events.

Validation: the maintainer manually verified both terminal layout and process/connection display on a Linux VM. Automated builds, tests, lint, and E2E were not run at the maintainer's request.


Devin Review

Print one prefix per text event and preserve its payload bytes so HTTP
headers and bodies remain readable. Show PID and process name separately
from the displayed connection tuple, retaining the SDK connection identity
and typed event UUID.

Update console and formatter expectations, strict stdout/stderr E2E
assertions, and output documentation for the revised representation.
Copilot AI balanced review requested due to automatic review settings November 22, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

4 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment on lines +52 to +58
case domain.CaptureFormatText:
record := append([]byte(fmt.Sprintf("[log_type=event capture_format=%s module=%s] ", e.Format, e.Module)), e.Payload...)
// Keep the next record on its own line without altering the payload.
if len(e.Payload) == 0 || e.Payload[len(e.Payload)-1] != '\n' {
record = append(record, '\n')
}
return p.write(ctx, record)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟥 Terminal injection through captured HTTP

When an operator captures HTTPS traffic, PublishEvent writes control bytes from a peer’s response directly to the terminal. The peer can erase or falsify displayed capture output.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions

Copy link
Copy Markdown

🔧 Debug Build Complete (PR #1099)

📦 Direct Download Links (GitHub login required):

Each link downloads a single .tar.gz package; extract it once to get the executable.

⏰ Files will be retained for 7 days, please download and test promptly.


Build targets: Linux (amd64/arm64/loong64) and Android (amd64/arm64). Available packages are listed above.

@cfc4n
cfc4n merged commit 71e191c into master Nov 22, 2026
16 of 18 checks passed
@cfc4n
cfc4n deleted the bugfix/readable-terminal-text branch November 22, 2026 13:42
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.

2 participants