Skip to content

fix(discoveryengine): align error-detail contracts with fi-core - #288

Merged
nik13 merged 2 commits into
devfrom
fix/th-8332-discoveryengine-fi-core-contracts
Oct 28, 2026
Merged

nik13 merged 2 commits into
devfrom
fix/th-8332-discoveryengine-fi-core-contracts

Conversation

@nik13

@nik13 nik13 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the Discovery Engine test contracts exposed by the full source-core Python matrix after #224 merged. The previous run had 13 failures because source fi-core removes error details when content is hidden and normalizes redundant exception-type prefixes, while published fi-instrumentation-otel==1.1.0 retains the instrumentor's redacted error text.

  • Detect the native error-policy API, following sibling integrations, rather than assuming a package version implies a behavior.
  • Assert exact omission of native status descriptions and exception-message fields; on published 1.1.0, require nonempty redacted messages and the corresponding status text.
  • Preserve query, escaped-query, credential, document-content and stacktrace privacy checks; strengthen the async and fail-closed assertions.
  • Pin normalized REST/retry descriptions to the exception message and retain error types/codes.
  • Add ten config/environment cases covering derived error privacy for the other five content-hide flags.

Only five test/support files change. The instrumentor writes through FITracer and does not depend on reading the old status/message representation, so no runtime change is needed. No privacy opt-out, CI allowlist or dependency change.

Validation

  • Reproduced the original failure locally: source core 13 failed / 125 passed; published core 138 passed.
  • Updated package suite with source fi-core built from dev: 148 passed, no skips.
  • Updated package suite with published fi-instrumentation-otel==1.1.0: 148 passed, no skips.
  • Both modes install the Discovery Engine package as a wheel in separate Python 3.11 environments and exercise real SDK gRPC/REST transports against loopback fixtures.
  • Scoped PR CI and the existing python-tests.yml full source-core workflow are required for this branch. Full dispatch uses the same workflow and no inputs as run 40637110632.

No new live vendor call is claimed for this test-only correction.

🤖 Generated with Claude Code

nik13 and others added 2 commits October 27, 2026 22:57
Assert native error-detail omission and legacy redacted messages explicitly. Keep query and credential non-leak checks, pin normalized status text, and cover derived privacy for every content-hide flag.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
@nik13
nik13 merged commit 5f200e1 into dev Oct 28, 2026
78 checks passed
@nik13
nik13 deleted the fix/th-8332-discoveryengine-fi-core-contracts branch October 28, 2026 06:24
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