Files
hermes-agent/tests
Maciej Lisiewski efcf4e1bee fix(gateway): hold unsettled text out of every streamed frame, split and seal
The first streamed-redaction pass held back only the trailing whitespace token, and only for
the seal path. The first-send splitter still hard-cut inside it, a multi-token secret
(Authorization + scheme + token, a PEM block) was sealed at an inner space or newline, and
preview/draft frames showed each partial key: first raw below the pattern floor, then as a
head/tail mask whose window slides as the key grows. On stream-is-the-message drafts every
re-mask is a non-prefix frame, so the connector re-appends it.

gateway/stream_consumer_redact.py computes a settled boundary. Text after it could still be,
or still complete, a secret: a trailing token that a secret prefix or a probed continuation
would mask, an auth/credential label with its value still open, a BEGIN block with no END, a
PuTTY body, a control-split run. Frames, sealed heads and both splitters stop at that
boundary. The settled text is redacted in place, and each tick only redacts the newly settled
text plus the start of its line, so redaction cost is linear. Before, the whole buffer was
redacted 2-3x per tick, which was quadratic. Turn/segment ends and finalize frames are still
redacted whole.

Fixes #56039
2026-11-13 16:57:18 +01:00
..
…
…