wta: redact WT event bodies from logs - #544
Open
Gordon Lam (yeelam-gordon) wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the WTA helper’s WT event logging to avoid persisting full WT event envelopes (which may contain terminal output, prompts, or hook payloads) while still retaining lightweight method-level diagnostics for debugging.
Changes:
- Centralized WT event “received” logging into a helper that logs only the event method at
debuglevel. - Removed trace-level logging of full WT event JSON envelopes (including prior special-case redaction logic).
- Added a trace-level sentinel unit test to ensure WT event body content does not appear in logs even when trace logging is enabled.
Comment on lines
+29
to
+32
| // Event bodies may contain terminal output, prompts, or hook payloads. | ||
| // Keep diagnostics to protocol metadata even when trace logging is enabled. | ||
| tracing::debug!(method, "wt_event_rx: received event"); | ||
| method |
Keep method-only debug diagnostics while preventing terminal and hook payloads from being persisted even when trace logging is enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: dd185e71-68e2-4772-83fe-525e877c54f4
Gordon Lam (yeelam-gordon)
force-pushed
the
dev/yeelam/reliability/wt-event-log-redaction
branch
from
August 6, 2026 02:13
cb6fffa to
81bea31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release builds default to info, so debug diagnostics remain disabled unless WTA_LOG or RUST_LOG explicitly enables them.
Validation