Skip to content

chore(js): enforce safe type assertions - #3566

Merged
mikeldking merged 2 commits into
Arize-ai:mainfrom
LarryHu0217:codex/fix-unsafe-type-assertions-3432
Aug 15, 2026
Merged

chore(js): enforce safe type assertions#3566
mikeldking merged 2 commits into
Arize-ai:mainfrom
LarryHu0217:codex/fix-unsafe-type-assertions-3432

Conversation

@LarryHu0217

Copy link
Copy Markdown
Contributor

Resolves #3432

Summary

  • replace unsafe narrowing assertions with runtime guards and typed helpers
  • preserve SDK-specific promise and wrapper types at instrumentation boundaries
  • promote typescript/no-unsafe-type-assertion from warning to error

Testing

  • corepack pnpm run lint
  • corepack pnpm run fmt:check
  • corepack pnpm run type:check
  • corepack pnpm run -r build
  • corepack pnpm run -r test

@LarryHu0217
LarryHu0217 requested a review from a team as a code owner August 15, 2026 15:08
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Aug 15, 2026
- restore pass-through of non-Promise client.send() results in bedrock handlers
- keep messages with unrecognized content blocks instead of dropping them
- return the caller's module from manuallyInstrument when patched in place
- preserve structured non-Error throws in withSpan recordException
- keep shimmer wrap markers off the original bedrock send via shadow traps
- preserve Mistral tool-call arguments verbatim and keep calls with missing ids
- restore falsy baseURL fallback in openai getLLMProvider
- share TOOL_HOOK_EVENTS between hook injector functions
- add changeset for touched packages
@mikeldking
mikeldking enabled auto-merge (squash) August 15, 2026 23:33
@mikeldking
mikeldking merged commit 74ae809 into Arize-ai:main Aug 15, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

chore(js): fix oxlint type-aware no-unsafe-type-assertion warnings

2 participants