feat(sdk): capture SDK name + version (SIT-235 · core)#28
Merged
onamfc merged 1 commit intoJun 8, 2026
Merged
Conversation
39c7f1a to
87d4c13
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
onamfc
added a commit
that referenced
this pull request
Jun 8, 2026
…handling PR #28 review follow-ups: - Add recordInstallEvent tests pinning sdk_name/sdk_version as the LAST two positional params of the 17-arg install_events INSERT (arrayContaining in the existing test doesn't catch positional drift), plus the empty/absent -> null case. - Standardize the event-insert sdk values on `|| null` (was `?? null`) so an empty sdkName/sdkVersion stores null on both the install AND event rows, matching fingerprint.ts. No rejection — keeps free-form input. - Comment the deliberate deferral of the sdk_version index to the consumer (SDK Doctor, cloud PR #118) so it matches the health-rollup query shape. - Document the free-form sdkVersion contract on both SDK schemas (non-semver tolerated by the consumer; never reject a request over this metadata).
Persist sdkName/sdkVersion (sent by the SDKs) on install_events and in_app_events for SDK version diagnostics. Backward compatible — older SDKs omit the fields, which store null. - /install and /event accept optional sdkName/sdkVersion (free-form, max 50; non-semver is tolerated downstream — never reject a request over this metadata). - recordInstallEvent forwards them as the last two positional params of the install_events INSERT; tests pin those positions (guarding column drift) and cover the empty/absent -> null case. - Empty values normalize to null consistently (|| null) on both rows. - No index on sdk_name/sdk_version yet: deferred until a consumer aggregates them (e.g. "installs by version"), so the index can match the real query shape.
250d6cb to
4628be3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SDK Health + Doctor - core slice. Stacked on the SIT-237 core PR (#27); base will auto-retarget to
mainwhen #27 merges.Persist which SDK (name + version) sent each install/event - the prerequisite for the SDK Health indicator + version Doctor.
in_app_events+install_events: nullablesdk_name/sdk_version(idempotent ALTERs). On both tables - an updated app keeps its original install row but emits events with the new version (needed for version-fragmentation diagnostics)./api/sdk/v1/install+/eventZod schemas acceptsdkName/sdkVersion; persisted viarecordInstallEvent+ the event insert(s). Backward compatible. 129 tests.