Skip to content

fix(account-sdk): validate telemetry preference before init - #385

Open
omerbek wants to merge 1 commit into
base:masterfrom
omerbek:fix/validate-telemetry-preference-before-init
Open

fix(account-sdk): validate telemetry preference before init#385
omerbek wants to merge 1 commit into
base:masterfrom
omerbek:fix/validate-telemetry-preference-before-init

Conversation

@omerbek

@omerbek omerbek commented Aug 14, 2026

Copy link
Copy Markdown

Summary

  • reject defined non-boolean telemetry preferences even when the value is falsy
  • validate preferences before one-time telemetry initialization can act on invalid input
  • add regression coverage for telemetry: 0

Fixes #383.

Testing

  • corepack yarn workspace @base-org/account exec vitest run src/util/validatePreferences.test.ts src/interface/builder/core/createBaseAccountSDK.test.ts
  • corepack yarn biome check packages/account-sdk/src/util/validatePreferences.ts packages/account-sdk/src/util/validatePreferences.test.ts packages/account-sdk/src/interface/builder/core/createBaseAccountSDK.ts
  • git diff --check

Note: corepack yarn workspace @base-org/account typecheck still fails on this checkout with the existing generated asset error: src/ui/Dialog/Dialog.tsx(10,17): Cannot find module './Dialog-css.js'.

@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

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.

telemetry preference validation skips falsy non-boolean values and runs after telemetry init

2 participants