Skip to content

feat: add native SDK version validation + bump workflow (mirrors Flutter PR #1853)#1614

Open
ygit wants to merge 1 commit into
chore/track-claude-skillsfrom
chore/sdk-version-native-validation
Open

feat: add native SDK version validation + bump workflow (mirrors Flutter PR #1853)#1614
ygit wants to merge 1 commit into
chore/track-claude-skillsfrom
chore/sdk-version-native-validation

Conversation

@ygit

@ygit ygit commented Apr 30, 2026

Copy link
Copy Markdown
Member

Summary

Brings the 100ms-react-native SDK updater up to parity with the equivalent shipped in 100ms-flutter PR #1853. Three additions on top of the SDK updater script (commit c93fbfe5 already on dev):

  1. Native SDK version validation — primary validator is HTTPS HEAD against the CocoaPods CDN (per pod) and Maven Central (per artifact). Catches typo'd versions in ~200ms before any npm install runs. The side-effect refresh (pod install --repo-update, ./gradlew :app:dependencies --refresh-dependencies) runs after.
  2. .github/workflows/bump-sdk-versions.yml — a workflow_dispatch GitHub Action that exposes the script via the GitHub UI and opens a PR via peter-evans/create-pull-request@v6.
  3. Skill updates.claude/skills/update-sdk-versions.md now documents the validation behavior so Claude can walk the user through it.

Why HTTP HEAD instead of pod install for validation

pod install reuses Podfile.lock when the lockfile is already satisfiable, so a Podspec change pointing at a non-existent HMSSDK version can be silently swallowed. The HTTP HEAD against CocoaPods CDN is the source of truth for "does this version exist on the registry". Same finding from Flutter PR #1853 — fully documented in the script's inline comment.

Other changes

  • --legacy-peer-deps on npm install to tolerate the pre-existing react-native-video-plugin@1.1.3react-native-hms@1.12.x peer mismatch in this monorepo. Without this, every bump that runs the peer-dep auto-correction would fail npm install on otherwise-fine state.

Verification

$ node scripts/update-sdk-versions.js --ios-sdk 1.99.99 --hms-bump skip --room-kit-bump skip --yes
  ✗ HMSSDK 1.99.99 — not found on CocoaPods CDN
  ✓ HMSBroadcastExtensionSDK 1.0.1
  ✓ HMSHLSPlayerSDK 0.0.2
  ✓ HMSNoiseCancellationModels 1.0.0
❌ One or more iOS native versions don't exist on CocoaPods.
exit 1

Branching note

This PR is stacked on chore/track-claude-skills (PR #1613) — it modifies .claude/skills/update-sdk-versions.md which is added by that PR. Merge order: #1613 first, then this one. After #1613 merges to dev, GitHub will automatically retarget this PR's base to dev.

Test plan

  • --ios-sdk 1.99.99 (nonexistent) — script exits 1 with clear ✗/✓ matrix
  • --ios-sdk 1.17.1 (real latest) — script continues, refreshes Podfile.lock entries
  • --no-install skips all native validation/refresh
  • Help text + skill doc reflect new behavior
  • Smoke-test the workflow via GitHub Actions UI after merge

🤖 Generated with Claude Code

Mirrors the Flutter repo's validation pattern (PR #1853). Three
additions to the SDK updater work:

1. scripts/update-sdk-versions.js — adds native version validation:

   PRIMARY validator: HTTPS HEAD against the CocoaPods CDN for each
   pod (HMSSDK, HMSBroadcastExtensionSDK, HMSHLSPlayerSDK,
   HMSNoiseCancellationModels) and against Maven Central for the
   live.100ms artifacts (android-sdk, video-view, hls-player).
   Catches typo'd versions in ~200ms, fails the script before any
   npm install runs.

   SIDE-EFFECT refresh: after HTTP validation passes, runs
   `pod install --repo-update` in both iOS example dirs and
   `./gradlew :app:dependencies --refresh-dependencies` in both
   Android example dirs. These don't validate (pod install reuses
   the lockfile in this monorepo) but they refresh transitive
   lock entries.

   Also adds --legacy-peer-deps to the npm install step to tolerate
   the pre-existing react-native-video-plugin / react-native-hms
   peer-dep mismatch.

   Validation is gated on --no-install (skipping it when the user
   wants a fast, source-only run).

2. .github/workflows/bump-sdk-versions.yml — workflow_dispatch
   GitHub Action mirroring the Flutter equivalent. Runs the script
   with --no-install, then explicitly runs npm install and the
   HTTP HEAD validation in separate steps for visibility, then opens
   a PR via peter-evans/create-pull-request@v6.

3. .claude/skills/update-sdk-versions.md — updated to document
   the validation behavior so Claude walks the user through it.

Verified with --ios-sdk 1.99.99 (nonexistent): ✗ HMSSDK 1.99.99
not found, exit 1. With --ios-sdk 1.17.1 (real): ✓ all four pods
verified, continues to lock refresh.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@trunk-io

trunk-io Bot commented Apr 30, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions Bot added the Stale label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant