Skip to content

fix: wire publicPolicy config through SDK#540

Merged
John-David Dalton (jdalton) merged 1 commit intomainfrom
fix/wire-public-policy-config
Apr 2, 2026
Merged

fix: wire publicPolicy config through SDK#540
John-David Dalton (jdalton) merged 1 commit intomainfrom
fix/wire-public-policy-config

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

Summary

  • Add publicPolicy option to SocketSdkOptions so consumers can pass a custom alert policy map
  • Update reshapeArtifactForPublicPolicy to accept an optional policy parameter (defaults to built-in publicPolicy from constants)
  • Wire this.#publicPolicy through all call sites: batchPackageStream, batchPackageFetch, and checkMalwareFirewall

This was missed when merging #537 and #538 — the publicPolicy map was hardcoded everywhere, making it impossible to customize alert action resolution.

Test plan

  • Build passes (pnpm build)
  • Type check passes (pnpm run type)
  • All 495 tests pass (pnpm test)
  • Lint passes (pnpm run lint)
  • Existing tests continue to work (default policy fallback preserves behavior)

@jdalton John-David Dalton (jdalton) force-pushed the fix/wire-public-policy-config branch from cb11f18 to c9efc8b Compare April 2, 2026 13:01
…rPublicPolicy

The publicPolicy map was hardcoded in reshapeArtifactForPublicPolicy and
checkMalwareFirewall, making it impossible for consumers to customize
alert action resolution. This adds a publicPolicy option to SocketSdkOptions
and wires it through all call sites:

- reshapeArtifactForPublicPolicy now accepts an optional policy parameter
  (defaults to the built-in publicPolicy from constants)
- SocketSdk stores the configured policy as #publicPolicy instance field
- batchPackageStream, batchPackageFetch, and checkMalwareFirewall all
  pass the instance policy through
@jdalton John-David Dalton (jdalton) merged commit bda639a into main Apr 2, 2026
10 checks passed
@jdalton John-David Dalton (jdalton) deleted the fix/wire-public-policy-config branch April 2, 2026 13:54
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.

2 participants