Repository navigation
fix(sse): keep PII warn/off Responses text deltas byte-identical and guard completed snapshot redaction (#15507) - #15845
Merged
Conversation
Contributor
CI Coverage Report
Coverage artifact was not available for this run. |
3 tasks
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.
Closes #15507 (completes it) — depends on #15824 (stacked on
fix/15507-responses-pii-warn-bytes).Root cause
In
warn(detect-only) andoffmode the PII SSE transform still ran Responses text deltas through the sliding-window buffer, so deltas were emptied and re-chunked later instead of being passed through unchanged. Theresponse.completed/*.donetext snapshots are already sanitized as standalone strings (AGENTS.md "SSE Snapshot Handling"); this PR adds a regression guard for that.Fix
streamingPiiTransform.ts: inwarnmode runsanitizePIIfor detection logging only and emit the original text immediately;offreturns text untouched.redact/blockkeep the existing buffered path. Flag defaults untouched (Hard Rule feat: v0.2.0 — advanced routing services, cost analytics, pricing overhaul #20).piiSanitizer.ts: exportgetPiiResponseMode().Tests
tests/unit/issue-15507-pii-responses-text-snapshots.test.tsresponse.completedsnapshot contains[EMAIL_REDACTED].Existing PII suites run one file per invocation, all green (tool-lifecycle, pii-opt-in-default, sseTextTransform, streamingPiiTransform, piiSanitizer, adversarialPii, piiReproduction, issue-13488, chatcore-streaming-pipeline, ...).
Gates
typecheck:core, eslint (via pre-commit), check-file-size, complexity, cognitive-complexity, any-budget, tracked-artifacts, ai-attribution (commit hook).