Skip to content

fix(sse): keep PII warn/off Responses text deltas byte-identical and guard completed snapshot redaction (#15507) - #15845

Merged
diegosouzapw merged 3 commits into
release/v3.8.52from
fix/15507-pii-snapshots-warn-bytes
Oct 8, 2026
Merged

diegosouzapw merged 3 commits into
release/v3.8.52from
fix/15507-pii-snapshots-warn-bytes

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Closes #15507 (completes it) — depends on #15824 (stacked on fix/15507-responses-pii-warn-bytes).

Root cause

In warn (detect-only) and off mode 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. The response.completed / *.done text snapshots are already sanitized as standalone strings (AGENTS.md "SSE Snapshot Handling"); this PR adds a regression guard for that.

Fix

Tests

tests/unit/issue-15507-pii-responses-text-snapshots.test.ts

  • RED before fix: warn mode output was re-chunked (empty deltas, merged tail, replayed delta) != input bytes.
  • GREEN after: byte-identical; redact mode leaves no email leak and response.completed snapshot 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).

⚠️ base-red inherited: #15306 — unit/integration/package-artifact gates timing out, vitest open-sse/mcp-server/tests/audit.test.ts, check:ai-attribution range error

@diegosouzapw
diegosouzapw merged commit a5cd58b into release/v3.8.52 Oct 8, 2026
13 of 14 checks passed
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw
diegosouzapw deleted the fix/15507-pii-snapshots-warn-bytes branch October 18, 2026 23:49
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.

fix(backend): Responses PII warn transform corrupts call_id and replays output_item.done on completed

1 participant