Skip to content

fix(core): harden content privacy and sampling (1.2.2) - #313

Merged
nik13 merged 5 commits into
devfrom
fix/core-content-privacy-1.2.2
Oct 31, 2026
Merged

nik13 merged 5 commits into
devfrom
fix/core-content-privacy-1.2.2

Conversation

@nik13

@nik13 nik13 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Prepare fi-instrumentation-otel 1.2.2 with the reviewed privacy and safety repairs.

  • Redact creation/link and sampler-produced content before downstream processing; preserve sampling decisions, trace state, ordinary attributes and application inputs.
  • Cover directional tool/image/retrieval/audio content, events, exceptions, links, embedding vectors and structured content without evaluating hidden lazy values.
  • Restore nested/concurrent async suppression and honor explicit HTTP/gRPC exporter endpoints.
  • Keep signal handlers application-owned. Document explicit provider.shutdown() during termination, remove automatic signal-export guarantees, and retain native Replicate held/in-flight span-export assertions, including application-selected exit status.
  • Update Perplexity and Anannas masked invocation-parameter contracts. Require the redaction sentinel on the repaired source core; retain JSON checks for visible inputs and the exact historical published-core 1.1.0 compatibility wheel. Imported-file checks prevent stale wheel metadata from relaxing source tests.

Core content hiding is not default credential-field redaction for visible payloads; that remains an instrumentor responsibility.

Verification

All local test processes used a credential-scrubbed environment with outbound networking denied except localhost. External denial was positively verified.

  • Core installed-wheel regressions: 301 passed + 24 subtests on Python 3.10 / OTel 1.29.0 and Python 3.13 / OTel 1.45.2. All 18 production modules in the existing 1.2.2 wheel/sdist match this head; the sdist shutdown README matches too.
  • Full core source suite: floor 678 passed, 2 failed, 6 skipped + 24 subtests; current 675 passed, 5 failed, 6 skipped + 24 subtests. The two native gRPC IPv4 sandbox failures and three current-OTel private _timeout assertion failures reproduce on untouched dev; they remain visible and unwaived.
  • Native Replicate 1.0.7: 395 passed, 1 failed in each cell. All 51 signal/in-flight lifecycle tests pass in each, including batch/simple exports, SIGTERM/SIGINT and nonzero application exit status. The remaining no-thread-count failure also reproduces on untouched dev.
  • Final Perplexity/Anannas suites: 187/187 and 36/36 in each of four cells (892 passed total): current and floor Python/OTel with OpenAI 3.24.0; current with OpenAI 1.69.0; published traceAI-openai==0.1.10 / core 1.1.0 with OpenAI 3.24.0. Untouched-source negative controls still fail the five masked cases, even with a legacy wheel installed, proving source privacy assertions remain strict.
  • The exact public shutdown snippet executes and exports its pending span; all three relative documentation links resolve. git diff --check passes.
  • Updated-head GitHub recipe and Python workflows have been requested. This is not a fully-green release verdict; check the current head's results before merging.

Integration notes

No dependency on #292–#307. Excluded unrelated #304 README content, #306 registry metadata and the #303 release-please version marker. The new core README section is limited to the shutdown migration. Preserve 1.2.2 when integrating overlapping version/metadata work. No merge, tag or publication is performed here.

🤖 Generated with Claude Code

Apply content hiding before SDK sampling and processors, preserve sampler retention, cover event and link content, and restore safe suppression and exporter endpoint behavior.

Co-Authored-By: Claude Code <noreply@anthropic.com>
nik13 and others added 3 commits October 30, 2026 21:24
Document explicit provider shutdown for application termination, remove automatic signal-export promises, and preserve native held/in-flight export assertions with application-owned handlers and exit codes.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Require the redaction sentinel only when input hiding is enabled, retain parsed JSON assertions for visible inputs and output-only hiding, and keep response and top-level metadata assertions intact.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Keep invocation-parameter sentinel assertions strict for source and repaired core, while preserving JSON assertions for the exact published 1.1.0 compatibility wheel. Verify imported package paths so stale installed metadata cannot exempt source tests.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Resolve python/README.md against the README rebuilt by #304: keep dev's
README and add this PR's application-owned shutdown guidance as a short
"Shutdown on termination" section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nik13
nik13 merged commit 7e50147 into dev Oct 31, 2026
103 checks passed
@nik13
nik13 deleted the fix/core-content-privacy-1.2.2 branch October 31, 2026 07:05
nik13 added a commit that referenced this pull request Oct 31, 2026
Resolve against core 1.2.2 (#313), MCP 0.1.3 (#311) and Vertex AI (#312):
- version.py: keep 1.2.2 with the x-release-please-version marker.
- mcp CHANGELOG: keep the real 0.1.3 fixes from #311 instead of the
  bootstrap placeholder for the same version.
- vertexai CHANGELOG: record #312's fixes under the 0.1.11 release.
- manifest: python (fi-instrumentation-otel) 1.2.1 -> 1.2.2 to match.
release_plan.py --check and bootstrap_audit.py --check pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant