-
Notifications
You must be signed in to change notification settings - Fork 180
Feat/push to dev main #767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add version.json to track iOS/Android build numbers separately - Create version.cjs script for build number management - Add Fastlane version_manager.rb helper - Keep npm version for semver, version.json for build tracking
## What Changed - Updated iOS and Android Fastlane lanes to use version.json for build number management - Added automatic build number increment on deployment - Added deployment timestamp tracking ## How It Works ### iOS Deployment 1. Reads current build number from version.json 2. Increments iOS build number (e.g., 148 → 149) 3. Updates Xcode project with new build number via increment_build_number 4. Proceeds with TestFlight deployment 5. Updates lastDeployed timestamp on successful upload ### Android Deployment 1. Reads current build number from version.json 2. Increments Android build number (e.g., 82 → 83) 3. Updates build.gradle with new version code via increment_version_code 4. Proceeds with Play Store deployment 5. Updates lastDeployed timestamp on successful upload ## Why This Change - Eliminates manual version/build number entry - Prevents version conflicts between deployments - Provides single source of truth for build numbers - Enables automatic deployments without human intervention - Tracks deployment history with timestamps ## Dependencies - Requires version.json file (already created in previous commit) - Uses existing Fastlane plugins: - increment_build_number (iOS - built-in) - increment_version_code (Android - from plugin) - Version numbers still managed by npm version command
- Skip store uploads when test_mode is true - Test version bumps and builds without deployment - Prevent accidental pushes to TestFlight/Play Store
- Remove .cursor/mcp.json - Remove .cursorignore - Remove deployment-automation-summary.md - Remove deployment-meeting-questions.md - Remove pipeline.md
- Commits version.json changes back to repository - Only runs when test_mode is false - Uses [skip ci] to prevent infinite loops - Checks for actual changes before committing
- Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK - Implement cache versioning strategy for easy cache invalidation - Fix cache order: caches now restored after checkout but before dependency installation - Update mobile-setup action to skip installs when dependencies are cached - Add cache size monitoring to track usage against GitHub's 10GB limit - Fix Slack notification bug: skip notifications in test_mode - Add detailed logging for package.json version updates (show from/to versions) Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min)
Yarn was interpreting YARN_CACHE_VERSION as its own config setting. Prefixed all cache version env vars with GH_ to avoid conflicts.
The deployment mode was causing bundler to fail when Gemfile changed (nokogiri was removed). CI should be able to update the lockfile as needed.
- Re-enable bundler deployment mode for strict Gemfile.lock checking - Use yarn install --immutable for strict yarn.lock checking - Add clear error messages when lock files are out of date - Add pre-checks to verify lock files exist - This ensures reproducible builds and makes caching maximally effective When developers change dependencies, they must now: 1. Run yarn install or bundle install locally 2. Commit the updated lock files 3. CI will fail with helpful instructions if they forget
Remove nokogiri from Gemfile.lock since it's excluded in CI environments (GITHUB_ACTIONS=true). This allows the strict lock file checks to pass in CI.
The project uses Yarn workspaces with yarn.lock at the repository root, not in the app directory. Updated paths to check for yarn.lock at workspace root and use it for cache keys.
The test_mode parameter was only checking for string 'true' but could be passed as boolean true from command line. Now handles both cases to ensure test mode works correctly for iOS and Android.
- Replace jq with Node.js for version extraction (jq not available on macOS runners) - Fix concurrent commit race condition by creating separate update-version job - Add platform validation to version_manager.rb and version.cjs scripts - Use POSIX-compatible single = for shell string comparisons - Ensure single atomic commit when deploying to both platforms
- Remove trailing spaces from workflow YAML file - Fix prettier formatting in JavaScript files - Add -y flag to yarn version command for non-interactive mode - Address all lint warnings from CI
- Add mobile-deploy-auto.yml workflow that triggers on PR merges to dev/main - Update mobile-deploy.yml to support workflow_call for reusability - Add deployment_track, version_bump, and auto_deploy parameters - Create new Fastlane lanes (deploy_auto) for iOS and Android - Implement smart version bumping based on PR labels (major/minor/patch) - Add graceful error handling for Play Store permission issues - Enhance Slack notifications with deployment track information This enables automatic deployments when PRs are merged: - dev branch → internal testing track - main branch → production track - Skip deployment with [skip-deploy] in PR or no-deploy label
WalkthroughThis update introduces a comprehensive automated mobile deployment pipeline for both iOS and Android. It adds new GitHub Actions workflows for auto-deployment on PR merges, enhances Fastlane lanes for versioning and track-aware deployment, implements release tagging and changelog generation, and provides extensive documentation and scripts for streamlined release management. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant FL as Fastlane
participant Stores as App/Play Store
Dev->>GH: Merge PR to main/dev (with app/ changes)
GH->>GH: Run mobile-deploy-auto workflow
GH->>GH: Check PR labels, title, branch, skip logic
alt Deployment approved
GH->>GH: Trigger mobile-deploy workflow (with track, bump)
GH->>FL: Run deploy_auto lane (iOS & Android)
FL->>Stores: Upload build (track-aware)
GH->>GH: Tag release, generate changelog, create GitHub Release
else Deployment skipped
GH->>Dev: Log skip message, instructions for manual deploy
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (6)
app/scripts/version.cjs (1)
10-18: Consider adding more robust error handling.The error handling exits immediately on any file operation failure. For a CLI tool, this might be appropriate, but consider providing more specific error messages for different failure scenarios (file not found vs. permission issues vs. malformed JSON).
.github/actions/mobile-setup/action.yml (1)
62-81: Fix trailing spaces and improve dependency validation.The enhanced yarn installation with immutable flag and detailed error messaging is excellent for preventing dependency drift. However, there are trailing spaces that need to be removed.
Remove trailing spaces on lines 62, 66, and 82:
- + - + - +The dependency validation logic itself is excellent for ensuring reproducible builds.
.github/workflows/mobile-deploy-auto.yml (1)
21-94: Fix YAML formatting issuesMultiple formatting issues detected by YAMLlint.
Remove trailing spaces from lines 21, 27, 29, 35, 44, 60, 64 and add a newline at the end of the file. You can use a YAML formatter or configure your editor to automatically trim trailing whitespace.
app/fastlane/Fastfile (2)
77-77: Remove trailing commas for consistencyRuboCop detected trailing commas after the last parameter in method calls.
Remove the trailing commas from these lines to follow Ruby style conventions:
- groups: ENV["IOS_TESTFLIGHT_GROUPS"].split(","), + groups: ENV["IOS_TESTFLIGHT_GROUPS"].split(",")Also applies to: 93-93, 141-141, 148-148, 169-169
325-325: Remove trailing commas in Android lanesSame trailing comma style issue as in iOS lanes.
Remove the trailing commas to maintain consistency:
- gradle_file: android_gradle_file_path.gsub("../", ""), + gradle_file: android_gradle_file_path.gsub("../", "")Also applies to: 411-411, 443-443
.github/workflows/mobile-deploy.yml (1)
69-69: Clean up YAML formattingRemove trailing spaces from the indicated lines for consistent formatting.
Also applies to: 424-424, 429-429, 434-434, 727-727, 732-732, 737-737
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
app/Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing (9)
.github/actions/mobile-setup/action.yml(1 hunks).github/workflows/mobile-deploy-auto.yml(1 hunks).github/workflows/mobile-deploy.yml(9 hunks)app/fastlane/Fastfile(5 hunks)app/fastlane/helpers.rb(1 hunks)app/fastlane/helpers/version_manager.rb(1 hunks)app/scripts/mobile-deploy-confirm.cjs(3 hunks)app/scripts/version.cjs(1 hunks)app/version.json(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
app/version.json (1)
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
🪛 YAMLlint (1.37.1)
.github/actions/mobile-setup/action.yml
[error] 62-62: trailing spaces
(trailing-spaces)
[error] 66-66: trailing spaces
(trailing-spaces)
[error] 82-82: trailing spaces
(trailing-spaces)
[error] 85-85: trailing spaces
(trailing-spaces)
.github/workflows/mobile-deploy-auto.yml
[error] 21-21: trailing spaces
(trailing-spaces)
[error] 27-27: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
[error] 35-35: trailing spaces
(trailing-spaces)
[error] 44-44: trailing spaces
(trailing-spaces)
[error] 60-60: trailing spaces
(trailing-spaces)
[error] 64-64: trailing spaces
(trailing-spaces)
[error] 94-94: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/mobile-deploy.yml
[error] 69-69: trailing spaces
(trailing-spaces)
[error] 424-424: trailing spaces
(trailing-spaces)
[error] 429-429: trailing spaces
(trailing-spaces)
[error] 434-434: trailing spaces
(trailing-spaces)
[error] 727-727: trailing spaces
(trailing-spaces)
[error] 732-732: trailing spaces
(trailing-spaces)
[error] 737-737: trailing spaces
(trailing-spaces)
🪛 actionlint (1.7.7)
.github/workflows/mobile-deploy-auto.yml
25-25: "github.event.pull_request.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions for more details
(expression)
67-67: "github.event.pull_request.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🪛 RuboCop (1.76.1)
app/fastlane/Fastfile
[convention] 77-77: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 93-93: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 141-141: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 148-148: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 169-169: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 325-325: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 411-411: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 414-421: Avoid more than 3 levels of block nesting.
(Metrics/BlockNesting)
[convention] 443-443: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
🪛 GitHub Check: lint
app/scripts/mobile-deploy-confirm.cjs
[warning] 405-405:
Missing radix parameter
[warning] 395-395:
Missing radix parameter
[warning] 375-375:
Missing radix parameter
[warning] 357-357:
Missing radix parameter
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build-ios
- GitHub Check: build-android
🔇 Additional comments (20)
app/version.json (1)
1-10: Clean and well-structured version tracking configuration.The JSON structure is simple and effective for centralized build number and deployment timestamp management. The initial build numbers (iOS: 148, Android: 82) suggest this is migrating from existing versioning, which is appropriate for maintaining continuity.
app/fastlane/helpers.rb (2)
16-16: Proper integration of version manager helper.The require statement follows the established pattern for including Fastlane helpers.
24-24: Consistent module extension pattern.The module extension follows the same pattern as other helpers in the file, maintaining consistency in the codebase.
app/scripts/version.cjs (5)
20-27: Synchronous file operations are acceptable for CLI usage.Using synchronous file operations is appropriate for a CLI tool where blocking behavior is expected. The error handling pattern is consistent with the read function.
39-63: Robust platform validation and build number management.The platform validation is thorough and the build number incrementing logic is safe with proper bounds checking. The console output provides clear feedback to users.
65-87: ISO timestamp generation is appropriate for deployment tracking.Using
new Date().toISOString()provides consistent, timezone-aware timestamps suitable for deployment tracking across different environments.
89-105: Well-structured info display function.The function properly handles both required and optional fields (deployment timestamps), providing clear output formatting for users.
107-136: Comprehensive CLI interface with helpful usage information.The CLI handling covers all expected use cases with clear usage instructions. The help text is informative and includes the important note about version management via npm.
.github/actions/mobile-setup/action.yml (2)
50-57: Excellent addition of strict bundler configuration.Configuring bundler with deployment mode and vendor path ensures consistent gem installation across environments. This prevents local modifications and ensures reproducible builds.
85-101: Robust gem installation with excellent error handling.The bundle install configuration with retry logic and comprehensive error messaging provides excellent guidance for developers when dependency issues occur. The deployment mode ensures consistent gem versions.
app/fastlane/helpers/version_manager.rb (7)
5-11: Well-structured module with proper path resolution.The module follows Ruby best practices with
extend selffor singleton behavior and proper file path resolution usingFile.expand_path. The constant definition is appropriately scoped.
12-21: Robust file reading with comprehensive error handling.The file reading method properly handles both missing files and JSON parsing errors using Fastlane's UI system for consistent error reporting. This follows Fastlane conventions well.
22-28: Safe file writing with proper formatting.The file writing method ensures proper JSON formatting with
JSON.pretty_generateand consistent error handling. The newline addition maintains file formatting standards.
29-35: Proper separation of concerns for version sources.Correctly separates version numbers (from package.json) from build numbers (from version.json). This maintains the intended architecture where npm manages versions and this system manages build numbers.
46-62: Excellent build number management with user feedback.The build number increment methods provide clear feedback about the changes made, including both old and new values. The atomic read-modify-write pattern is safe for this use case.
64-77: Proper platform validation and timestamp handling.The platform validation is comprehensive and the UTC timestamp generation using
Time.now.utc.iso8601ensures consistent timezone-aware timestamps for deployment tracking.
78-92: Well-designed sync function with clear output.The sync function provides excellent visibility into the current state and returns structured data for use in Fastlane workflows. The naming and structure are intuitive.
app/fastlane/Fastfile (1)
401-426: Excellent error handling for Play Store permissions!The enhanced error handling for Play Store upload failures is a great improvement, providing clear feedback for permission issues.
.github/workflows/mobile-deploy.yml (2)
11-17: Well-structured caching implementation!The cache versioning strategy with separate versions for different dependency types is excellent. This allows targeted cache invalidation and the monitoring helps track cache efficiency.
Also applies to: 117-155
798-878: Smart version synchronization approach!The separate update-version job effectively prevents race conditions between parallel iOS and Android builds. The [skip ci] tag prevents infinite loops, and the conditional logic ensures updates only happen after successful deployments.
| - name: Log deployment info | ||
| if: steps.check.outputs.should_deploy == 'true' | ||
| run: | | ||
| echo "📱 Auto-deployment triggered!" | ||
| echo "Branch: ${{ github.base_ref }}" | ||
| echo "Track: ${{ steps.check.outputs.deployment_track }}" | ||
| echo "Version bump: ${{ steps.check.outputs.version_bump }}" | ||
| echo "PR: #${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}" | ||
| echo "Merged by: ${{ github.event.pull_request.merged_by.login }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security issue: Another command injection vulnerability
The PR title is used unsafely again in the logging section.
Apply the same fix by using environment variables:
- name: Log deployment info
if: steps.check.outputs.should_deploy == 'true'
+ env:
+ PR_TITLE: ${{ github.event.pull_request.title }}
run: |
echo "📱 Auto-deployment triggered!"
echo "Branch: ${{ github.base_ref }}"
echo "Track: ${{ steps.check.outputs.deployment_track }}"
echo "Version bump: ${{ steps.check.outputs.version_bump }}"
- echo "PR: #${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}"
+ echo "PR: #${{ github.event.pull_request.number }} - $PR_TITLE"
echo "Merged by: ${{ github.event.pull_request.merged_by.login }}"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Log deployment info | |
| if: steps.check.outputs.should_deploy == 'true' | |
| run: | | |
| echo "📱 Auto-deployment triggered!" | |
| echo "Branch: ${{ github.base_ref }}" | |
| echo "Track: ${{ steps.check.outputs.deployment_track }}" | |
| echo "Version bump: ${{ steps.check.outputs.version_bump }}" | |
| echo "PR: #${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}" | |
| echo "Merged by: ${{ github.event.pull_request.merged_by.login }}" | |
| - name: Log deployment info | |
| if: steps.check.outputs.should_deploy == 'true' | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| echo "📱 Auto-deployment triggered!" | |
| echo "Branch: ${{ github.base_ref }}" | |
| echo "Track: ${{ steps.check.outputs.deployment_track }}" | |
| echo "Version bump: ${{ steps.check.outputs.version_bump }}" | |
| echo "PR: #${{ github.event.pull_request.number }} - $PR_TITLE" | |
| echo "Merged by: ${{ github.event.pull_request.merged_by.login }}" |
🧰 Tools
🪛 actionlint (1.7.7)
67-67: "github.event.pull_request.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🤖 Prompt for AI Agents
In .github/workflows/mobile-deploy-auto.yml around lines 65 to 73, the PR title
is directly echoed in the shell command, creating a command injection risk. To
fix this, assign the PR title and other dynamic values to environment variables
before the run step, then reference those variables safely within the echo
commands. This avoids executing untrusted input as shell commands.
| - name: Check deployment conditions | ||
| id: check | ||
| run: | | ||
| echo "🔍 Checking deployment conditions..." | ||
| # Skip if PR has skip-deploy in title or body | ||
| if [[ "${{ github.event.pull_request.title }}" =~ \[skip-deploy\] ]] || | ||
| [[ "${{ github.event.pull_request.body }}" =~ \[skip-deploy\] ]]; then | ||
| echo "should_deploy=false" >> $GITHUB_OUTPUT | ||
| echo "⏭️ Skipping deployment due to [skip-deploy] flag" | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical security issue: Command injection vulnerability
The PR title is being used directly in shell scripts without proper sanitization, which can lead to command injection attacks.
Instead of using the PR title directly in the shell script, pass it through an environment variable:
- name: Check deployment conditions
id: check
+ env:
+ PR_TITLE: ${{ github.event.pull_request.title }}
+ PR_BODY: ${{ github.event.pull_request.body }}
run: |
echo "🔍 Checking deployment conditions..."
# Skip if PR has skip-deploy in title or body
- if [[ "${{ github.event.pull_request.title }}" =~ \[skip-deploy\] ]] ||
- [[ "${{ github.event.pull_request.body }}" =~ \[skip-deploy\] ]]; then
+ if [[ "$PR_TITLE" =~ \[skip-deploy\] ]] ||
+ [[ "$PR_BODY" =~ \[skip-deploy\] ]]; then
echo "should_deploy=false" >> $GITHUB_OUTPUT
echo "⏭️ Skipping deployment due to [skip-deploy] flag"
exit 0
fi🧰 Tools
🪛 actionlint (1.7.7)
25-25: "github.event.pull_request.title" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🪛 YAMLlint (1.37.1)
[error] 27-27: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents
In .github/workflows/mobile-deploy-auto.yml around lines 23 to 34, the PR title
and body are used directly in the shell script, causing a command injection
risk. To fix this, pass the PR title and body as environment variables to the
script step, then reference these variables inside the shell script instead of
using the GitHub context expressions directly. This avoids executing unsanitized
input in the shell.
| if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) { | ||
| const currentBuild = versions.ios.build; | ||
| const nextBuild = versions.versionJson | ||
| ? versions.versionJson.ios.build + 1 | ||
| : parseInt(currentBuild) + 1; | ||
| const lastDeployed = versions.versionJson | ||
| ? getTimeAgo(versions.versionJson.ios.lastDeployed) | ||
| : 'Unknown'; | ||
|
|
||
| console.log( | ||
| `${CONSOLE_SYMBOLS.APPLE} iOS Version: ${versions.ios.version}`, | ||
| ); | ||
| console.log(`${CONSOLE_SYMBOLS.APPLE} iOS Build: ${versions.ios.build}`); | ||
| console.log( | ||
| `${CONSOLE_SYMBOLS.APPLE} iOS Build: ${currentBuild} → ${nextBuild}`, | ||
| ); | ||
| console.log(`${CONSOLE_SYMBOLS.APPLE} Last iOS Deploy: ${lastDeployed}`); | ||
| } | ||
|
|
||
| if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) { | ||
| const currentBuild = versions.android.versionCode; | ||
| const nextBuild = versions.versionJson | ||
| ? versions.versionJson.android.build + 1 | ||
| : parseInt(currentBuild) + 1; | ||
| const lastDeployed = versions.versionJson | ||
| ? getTimeAgo(versions.versionJson.android.lastDeployed) | ||
| : 'Unknown'; | ||
|
|
||
| console.log( | ||
| `${CONSOLE_SYMBOLS.ANDROID} Android Version: ${versions.android.version}`, | ||
| ); | ||
| console.log( | ||
| `${CONSOLE_SYMBOLS.ANDROID} Android Version Code: ${versions.android.versionCode}`, | ||
| `${CONSOLE_SYMBOLS.ANDROID} Android Version Code: ${currentBuild} → ${nextBuild}`, | ||
| ); | ||
| console.log( | ||
| `${CONSOLE_SYMBOLS.ANDROID} Last Android Deploy: ${lastDeployed}`, | ||
| ); | ||
| } | ||
|
|
||
| // Check for potential issues | ||
| if (versions.versionJson) { | ||
| if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) { | ||
| const jsonBuild = versions.versionJson.ios.build; | ||
| const actualBuild = parseInt(versions.ios.build); | ||
| if (jsonBuild !== actualBuild) { | ||
| console.log( | ||
| `\n${CONSOLE_SYMBOLS.WARNING} iOS build mismatch: version.json has ${jsonBuild}, but Xcode has ${actualBuild}`, | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) { | ||
| const jsonBuild = versions.versionJson.android.build; | ||
| const actualBuild = parseInt(versions.android.versionCode); | ||
| if (jsonBuild !== actualBuild) { | ||
| console.log( | ||
| `\n${CONSOLE_SYMBOLS.WARNING} Android build mismatch: version.json has ${jsonBuild}, but gradle has ${actualBuild}`, | ||
| ); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify radix parameter for parseInt calls
Missing radix parameter in parseInt calls can lead to unexpected behavior.
Update all parseInt calls to include the radix parameter:
- const nextBuild = versions.versionJson
- ? versions.versionJson.ios.build + 1
- : parseInt(currentBuild) + 1;
+ const nextBuild = versions.versionJson
+ ? versions.versionJson.ios.build + 1
+ : parseInt(currentBuild, 10) + 1;- const nextBuild = versions.versionJson
- ? versions.versionJson.android.build + 1
- : parseInt(currentBuild) + 1;
+ const nextBuild = versions.versionJson
+ ? versions.versionJson.android.build + 1
+ : parseInt(currentBuild, 10) + 1;- const actualBuild = parseInt(versions.ios.build);
+ const actualBuild = parseInt(versions.ios.build, 10);- const actualBuild = parseInt(versions.android.versionCode);
+ const actualBuild = parseInt(versions.android.versionCode, 10);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) { | |
| const currentBuild = versions.ios.build; | |
| const nextBuild = versions.versionJson | |
| ? versions.versionJson.ios.build + 1 | |
| : parseInt(currentBuild) + 1; | |
| const lastDeployed = versions.versionJson | |
| ? getTimeAgo(versions.versionJson.ios.lastDeployed) | |
| : 'Unknown'; | |
| console.log( | |
| `${CONSOLE_SYMBOLS.APPLE} iOS Version: ${versions.ios.version}`, | |
| ); | |
| console.log(`${CONSOLE_SYMBOLS.APPLE} iOS Build: ${versions.ios.build}`); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.APPLE} iOS Build: ${currentBuild} → ${nextBuild}`, | |
| ); | |
| console.log(`${CONSOLE_SYMBOLS.APPLE} Last iOS Deploy: ${lastDeployed}`); | |
| } | |
| if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) { | |
| const currentBuild = versions.android.versionCode; | |
| const nextBuild = versions.versionJson | |
| ? versions.versionJson.android.build + 1 | |
| : parseInt(currentBuild) + 1; | |
| const lastDeployed = versions.versionJson | |
| ? getTimeAgo(versions.versionJson.android.lastDeployed) | |
| : 'Unknown'; | |
| console.log( | |
| `${CONSOLE_SYMBOLS.ANDROID} Android Version: ${versions.android.version}`, | |
| ); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.ANDROID} Android Version Code: ${versions.android.versionCode}`, | |
| `${CONSOLE_SYMBOLS.ANDROID} Android Version Code: ${currentBuild} → ${nextBuild}`, | |
| ); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.ANDROID} Last Android Deploy: ${lastDeployed}`, | |
| ); | |
| } | |
| // Check for potential issues | |
| if (versions.versionJson) { | |
| if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) { | |
| const jsonBuild = versions.versionJson.ios.build; | |
| const actualBuild = parseInt(versions.ios.build); | |
| if (jsonBuild !== actualBuild) { | |
| console.log( | |
| `\n${CONSOLE_SYMBOLS.WARNING} iOS build mismatch: version.json has ${jsonBuild}, but Xcode has ${actualBuild}`, | |
| ); | |
| } | |
| } | |
| if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) { | |
| const jsonBuild = versions.versionJson.android.build; | |
| const actualBuild = parseInt(versions.android.versionCode); | |
| if (jsonBuild !== actualBuild) { | |
| console.log( | |
| `\n${CONSOLE_SYMBOLS.WARNING} Android build mismatch: version.json has ${jsonBuild}, but gradle has ${actualBuild}`, | |
| ); | |
| } | |
| } | |
| if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) { | |
| const currentBuild = versions.ios.build; | |
| const nextBuild = versions.versionJson | |
| ? versions.versionJson.ios.build + 1 | |
| : parseInt(currentBuild, 10) + 1; | |
| const lastDeployed = versions.versionJson | |
| ? getTimeAgo(versions.versionJson.ios.lastDeployed) | |
| : 'Unknown'; | |
| console.log( | |
| `${CONSOLE_SYMBOLS.APPLE} iOS Version: ${versions.ios.version}`, | |
| ); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.APPLE} iOS Build: ${currentBuild} → ${nextBuild}`, | |
| ); | |
| console.log(`${CONSOLE_SYMBOLS.APPLE} Last iOS Deploy: ${lastDeployed}`); | |
| } | |
| if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) { | |
| const currentBuild = versions.android.versionCode; | |
| const nextBuild = versions.versionJson | |
| ? versions.versionJson.android.build + 1 | |
| : parseInt(currentBuild, 10) + 1; | |
| const lastDeployed = versions.versionJson | |
| ? getTimeAgo(versions.versionJson.android.lastDeployed) | |
| : 'Unknown'; | |
| console.log( | |
| `${CONSOLE_SYMBOLS.ANDROID} Android Version: ${versions.android.version}`, | |
| ); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.ANDROID} Android Version Code: ${currentBuild} → ${nextBuild}`, | |
| ); | |
| console.log( | |
| `${CONSOLE_SYMBOLS.ANDROID} Last Android Deploy: ${lastDeployed}`, | |
| ); | |
| } | |
| // Check for potential issues | |
| if (versions.versionJson) { | |
| if (platform === PLATFORMS.IOS || platform === PLATFORMS.BOTH) { | |
| const jsonBuild = versions.versionJson.ios.build; | |
| const actualBuild = parseInt(versions.ios.build, 10); | |
| if (jsonBuild !== actualBuild) { | |
| console.log( | |
| `\n${CONSOLE_SYMBOLS.WARNING} iOS build mismatch: version.json has ${jsonBuild}, but Xcode has ${actualBuild}`, | |
| ); | |
| } | |
| } | |
| if (platform === PLATFORMS.ANDROID || platform === PLATFORMS.BOTH) { | |
| const jsonBuild = versions.versionJson.android.build; | |
| const actualBuild = parseInt(versions.android.versionCode, 10); | |
| if (jsonBuild !== actualBuild) { | |
| console.log( | |
| `\n${CONSOLE_SYMBOLS.WARNING} Android build mismatch: version.json has ${jsonBuild}, but gradle has ${actualBuild}`, | |
| ); | |
| } | |
| } |
🧰 Tools
🪛 GitHub Check: lint
[warning] 405-405:
Missing radix parameter
[warning] 395-395:
Missing radix parameter
[warning] 375-375:
Missing radix parameter
[warning] 357-357:
Missing radix parameter
🤖 Prompt for AI Agents
In app/scripts/mobile-deploy-confirm.cjs between lines 353 and 411, all parseInt
calls are missing the radix parameter, which can cause unexpected parsing
results. Update each parseInt call by adding the radix parameter 10 to
explicitly specify decimal parsing, for example, change parseInt(currentBuild)
to parseInt(currentBuild, 10).
- Add automatic git tagging for production deployments (v2.5.5, platform-specific tags) - Create GitHub releases with changelogs for production deployments - Add manual release script (yarn release) for version bumping and tagging - Implement simple changelog generation from git history - Add comprehensive deployment documentation in .github/MOBILE_DEPLOYMENT.md - Update app/README.md with deployment commands and workflows This completes the release automation system requested in the ticket for manual tagging and versioning with automated changelogs and release notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (4)
app/scripts/release.sh (1)
48-54: Usepushd/popd(orcd … || exit) and a trap to guarantee directory rollbackBlindly
cd ..on success paths leaks state if the script aborts midway (e.g. Fastlane failure).
Minimal hardening:-pushd .. >/dev/null -… fastlane … -popd >/dev/null +pushd .. >/dev/null +bundle exec fastlane ios sync_version +bundle exec fastlane android sync_version +popd >/dev/null || trueOr wrap in
trap 'cd "$OLDPWD"' ERR EXIT.app/scripts/generate-changelog.sh (1)
38-57:HASHis unused – drop it to silence SC2034 & speed loop- HASH=$(echo "$line" | cut -d' ' -f1) - MESSAGE=$(echo "$line" | cut -d' ' -f2-) + MESSAGE=$(echo "$line" | cut -d' ' -f2-)No later logic references the hash.
.github/workflows/mobile-deploy.yml (1)
941-956: Shellcheck: quote expansions & avoid repeated redirectionsMinor, but keeps logs clean and avoids globbing surprises. Example:
-git log --pretty=format:"- %s" ${PREV_TAG}..HEAD --no-merges | grep -v "^- Merge" >> release_notes.md +git log --pretty=format:"- %s" "${PREV_TAG}..HEAD" --no-merges | grep -v '^- Merge' >> release_notes.md.github/MOBILE_DEPLOYMENT.md (1)
30-37: Add language identifier to fenced diagram block (MD040)-``` +```textEnsures markdown renderers and linters recognise it.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/MOBILE_DEPLOYMENT.md(1 hunks).github/workflows/mobile-deploy.yml(9 hunks)app/README.md(1 hunks)app/package.json(1 hunks)app/scripts/generate-changelog.sh(1 hunks)app/scripts/release.sh(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- app/package.json
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: transphorm
PR: selfxyz/self#636
File: app/ios/Podfile:14-14
Timestamp: 2025-06-30T15:27:13.795Z
Learning: React Native 0.80 supports iOS 15.1 as the minimum deployment target, not iOS 16.0. This allows for broader device compatibility while still being compatible with the React Native 0.80 upgrade.
🧬 Code Graph Analysis (1)
app/scripts/generate-changelog.sh (1)
contracts/scripts/constants.ts (1)
log(68-74)
🪛 Shellcheck (0.10.0)
app/scripts/generate-changelog.sh
[warning] 39-39: HASH appears unused. Verify use (or export if used externally).
(SC2034)
🪛 YAMLlint (1.37.1)
.github/workflows/mobile-deploy.yml
[error] 69-69: trailing spaces
(trailing-spaces)
[error] 424-424: trailing spaces
(trailing-spaces)
[error] 429-429: trailing spaces
(trailing-spaces)
[error] 434-434: trailing spaces
(trailing-spaces)
[error] 727-727: trailing spaces
(trailing-spaces)
[error] 732-732: trailing spaces
(trailing-spaces)
[error] 737-737: trailing spaces
(trailing-spaces)
[error] 883-883: trailing spaces
(trailing-spaces)
[error] 902-902: trailing spaces
(trailing-spaces)
[error] 907-907: trailing spaces
(trailing-spaces)
[error] 909-909: trailing spaces
(trailing-spaces)
[error] 917-917: trailing spaces
(trailing-spaces)
[error] 926-926: trailing spaces
(trailing-spaces)
[error] 934-934: trailing spaces
(trailing-spaces)
[error] 943-943: trailing spaces
(trailing-spaces)
[error] 946-946: trailing spaces
(trailing-spaces)
[error] 950-950: trailing spaces
(trailing-spaces)
[error] 956-956: trailing spaces
(trailing-spaces)
[error] 961-961: trailing spaces
(trailing-spaces)
🪛 actionlint (1.7.7)
.github/workflows/mobile-deploy.yml
880-880: job "create-release-tags" needs job "update-version-files" which does not exist in this workflow
(job-needs)
883-883: property "update-version-files" is not defined in object type {build-android: {outputs: {}; result: string}; build-ios: {outputs: {}; result: string}}
(expression)
900-900: shellcheck reported issue in this script: SC2002:style:4:15: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead
(shellcheck)
900-900: shellcheck reported issue in this script: SC2002:style:5:17: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead
(shellcheck)
900-900: shellcheck reported issue in this script: SC2002:style:6:21: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead
(shellcheck)
941-941: shellcheck reported issue in this script: SC2086:info:11:34: Double quote to prevent globbing and word splitting
(shellcheck)
941-941: shellcheck reported issue in this script: SC2129:style:16:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
941-941: shellcheck reported issue in this script: SC2086:info:22:30: Double quote to prevent globbing and word splitting
(shellcheck)
966-966: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 markdownlint-cli2 (0.17.2)
.github/MOBILE_DEPLOYMENT.md
30-30: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (3)
app/scripts/release.sh (1)
87-96: Interactive prompt blocks non-interactive runners
read -r responsewill hang if the script ever lands in CI or GitHub Actions. Guard with-tor an env flag (CI,CI_RELEASE_AUTO=yes)..github/workflows/mobile-deploy.yml (1)
425-447: GitHub Actions expression syntax will resolve to empty onworkflow_dispatchInside a
runscript you’re interpolating:DEPLOYMENT_TRACK="${{ inputs.deployment_track || 'internal' }}"
inputs.*only exists for reusable workflows (workflow_call). Forworkflow_dispatchruns this becomes""→ shell variable empty. Use conditional env mapping, e.g.:env: DEPLOYMENT_TRACK: ${{ github.event.inputs.deployment_track || 'internal' }} VERSION_BUMP: ${{ github.event.inputs.version_bump || 'build' }} TEST_MODE: ${{ github.event.inputs.test_mode || false }}and reference
$DEPLOYMENT_TRACKin the script.app/README.md (1)
186-208: Links toscripts/version.cjsassume CJS path; confirm it exists post-refactorMultiple quick-commands reference
node scripts/version.cjs. If that helper moved toapp/scripts/along with the other utilities, docs will drift.
| # Get current version | ||
| CURRENT_VERSION=$(cat package.json | jq -r .version) | ||
| echo "Current version: $CURRENT_VERSION" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid useless cat & rely on jq directly
Shellcheck SC2002: the subshell can be simplified, reads faster and one process less:
-CURRENT_VERSION=$(cat package.json | jq -r .version)
+CURRENT_VERSION=$(jq -r '.version' package.json)Same pattern reappears for NEW_VERSION.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Get current version | |
| CURRENT_VERSION=$(cat package.json | jq -r .version) | |
| echo "Current version: $CURRENT_VERSION" | |
| # Get current version | |
| CURRENT_VERSION=$(jq -r '.version' package.json) | |
| echo "Current version: $CURRENT_VERSION" |
🤖 Prompt for AI Agents
In app/scripts/release.sh around lines 36 to 38, the use of `cat` to read
package.json before piping to jq is unnecessary and inefficient. Replace `cat
package.json | jq -r .version` with `jq -r .version package.json` to eliminate
the useless cat and improve performance. Apply the same change to the assignment
of NEW_VERSION elsewhere in the script.
| set -e | ||
|
|
||
| # Colors for output | ||
| RED='\033[0;31m' | ||
| GREEN='\033[0;32m' | ||
| YELLOW='\033[1;33m' | ||
| NC='\033[0m' # No Color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add -u and -o pipefail to make the script fail fast on unset vars & pipe errors
set -e alone won’t catch (a) unset variables or (b) failures masked by a pipe.
Recommend:
-set -e
+set -euo pipefailThis avoids subtle CI ghosts when an env-var is missing or a jq/grep in a pipe fails silently.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| set -e | |
| # Colors for output | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| NC='\033[0m' # No Color | |
| set -euo pipefail | |
| # Colors for output | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| NC='\033[0m' # No Color |
🤖 Prompt for AI Agents
In app/scripts/release.sh around lines 6 to 12, the script uses 'set -e' but
lacks '-u' and '-o pipefail' options, which means it won't fail on unset
variables or errors in piped commands. Update the 'set' command to 'set -euo
pipefail' to ensure the script fails fast on unset variables and pipe errors,
improving reliability and error detection.
| # Add deployment info | ||
| CHANGELOG="${CHANGELOG}### 📱 Deployment Info\n" | ||
| CHANGELOG="${CHANGELOG}- iOS Build: $(cat version.json | jq -r .ios.build)\n" | ||
| CHANGELOG="${CHANGELOG}- Android Build: $(cat version.json | jq -r .android.build)\n" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gracefully handle missing version.json
The script hard-fails if the file is absent or malformed. Consider:
-CHANGELOG="${CHANGELOG}### 📱 Deployment Info\n"
-CHANGELOG="${CHANGELOG}- iOS Build: $(cat version.json | jq -r .ios.build)\n"
-CHANGELOG="${CHANGELOG}- Android Build: $(cat version.json | jq -r .android.build)\n"
+if [ -f version.json ]; then
+ CHANGELOG+="### 📱 Deployment Info\n"
+ CHANGELOG+="- iOS Build: $(jq -r '.ios.build' version.json)\n"
+ CHANGELOG+="- Android Build: $(jq -r '.android.build' version.json)\n"
+fiPrevents CI from exploding on first release where version.json isn’t yet committed.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Add deployment info | |
| CHANGELOG="${CHANGELOG}### 📱 Deployment Info\n" | |
| CHANGELOG="${CHANGELOG}- iOS Build: $(cat version.json | jq -r .ios.build)\n" | |
| CHANGELOG="${CHANGELOG}- Android Build: $(cat version.json | jq -r .android.build)\n" | |
| # Add deployment info | |
| if [ -f version.json ]; then | |
| CHANGELOG+="### 📱 Deployment Info\n" | |
| CHANGELOG+="- iOS Build: $(jq -r '.ios.build' version.json)\n" | |
| CHANGELOG+="- Android Build: $(jq -r '.android.build' version.json)\n" | |
| fi |
🤖 Prompt for AI Agents
In app/scripts/generate-changelog.sh around lines 76 to 80, the script assumes
version.json exists and is well-formed, causing failure if missing or malformed.
Add a check to verify if version.json exists and is valid before reading it. If
the file is missing or invalid, skip adding iOS and Android build info to the
changelog or add a placeholder message, ensuring the script continues gracefully
without error.
| create-release-tags: | ||
| needs: [build-ios, build-android, update-version-files] | ||
| if: | | ||
| always() && | ||
| needs.update-version-files.result == 'success' && | ||
| (needs.build-ios.result == 'success' || needs.build-android.result == 'success') && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs: update-version-files refers to a non-existent job – workflow will never run
Job earlier is declared as update-version; update the dependency & later references:
-needs: [build-ios, build-android, update-version-files]
+needs: [build-ios, build-android, update-version]
…
-if: |
- always() &&
- needs.update-version-files.result == 'success' &&
+if: |
+ always() &&
+ needs.update-version.result == 'success' &&Without this fix create-release-tags is skipped and Actionlint already flags the error.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| create-release-tags: | |
| needs: [build-ios, build-android, update-version-files] | |
| if: | | |
| always() && | |
| needs.update-version-files.result == 'success' && | |
| (needs.build-ios.result == 'success' || needs.build-android.result == 'success') && | |
| create-release-tags: | |
| needs: [build-ios, build-android, update-version] | |
| if: | | |
| always() && | |
| needs.update-version.result == 'success' && | |
| (needs.build-ios.result == 'success' || needs.build-android.result == 'success') && |
🧰 Tools
🪛 actionlint (1.7.7)
880-880: job "create-release-tags" needs job "update-version-files" which does not exist in this workflow
(job-needs)
883-883: property "update-version-files" is not defined in object type {build-android: {outputs: {}; result: string}; build-ios: {outputs: {}; result: string}}
(expression)
🪛 YAMLlint (1.37.1)
[error] 883-883: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents
In .github/workflows/mobile-deploy.yml around lines 880 to 885, the job
dependency 'needs: update-version-files' is incorrect because the actual job
name is 'update-version'. Update all references from 'update-version-files' to
'update-version' to fix the dependency and ensure the 'create-release-tags' job
runs correctly.
- Keep automation features from feature branch - Update iOS build number to 150 to resolve version conflicts - Integrate deployment automation with latest dev changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (1)
.github/workflows/mobile-deploy.yml (1)
881-886: Critical: Fix job dependency referenceThe job dependency references
update-version-filesbut the actual job name isupdate-version. This will prevent the release tagging job from ever running.This matches the previous review comment about the same issue. Apply the suggested fix:
- needs: [build-ios, build-android, update-version-files] + needs: [build-ios, build-android, update-version]- needs.update-version-files.result == 'success' && + needs.update-version.result == 'success' &&
🧹 Nitpick comments (3)
.github/workflows/mobile-deploy.yml (1)
939-974: Enhance changelog generation and consider security implicationsThe changelog generation is basic but functional. However, consider these improvements:
- The changelog includes all commits since the previous tag, which might expose sensitive information
- No validation of the generated content
- The script assumes a specific git log format
Consider using the dedicated changelog generation script mentioned in the AI summary:
- # Generate simple changelog - echo "## What's Changed" > release_notes.md - echo "" >> release_notes.md - - if [ -n "$PREV_TAG" ]; then - git log --pretty=format:"- %s" ${PREV_TAG}..HEAD --no-merges | grep -v "^- Merge" >> release_notes.md - else - echo "Initial release" >> release_notes.md - fi + # Use dedicated changelog generation script + chmod +x app/scripts/generate-changelog.sh + ./app/scripts/generate-changelog.sh > release_notes.mdapp/fastlane/Fastfile (2)
141-141: Minor: Consider removing trailing commas for Ruby style consistencyStatic analysis flagged trailing commas in method calls. While not critical, removing them would improve code style consistency.
- skip_waiting_for_build_processing: false, + skip_waiting_for_build_processing: falseApply similar changes to the other flagged lines for consistency.
Also applies to: 148-148, 169-169, 325-325, 411-411
414-422: Review nested error handling complexityThe error handling block has 4 levels of nesting, which reduces readability. Consider extracting the error handling to a helper method.
private_lane :handle_play_store_upload_error do |error| if error.message.include?("forbidden") || error.message.include?("403") || error.message.include?("insufficientPermissions") UI.error("❌ Play Store upload failed: Insufficient permissions") UI.error("Please fix permissions in Google Play Console") UI.important("Build saved at: #{android_aab_path}") else raise error end endThen use it in the upload block:
begin upload_to_play_store(...) rescue => e handle_play_store_upload_error(e) end
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/mobile-deploy.yml(4 hunks)app/fastlane/Fastfile(7 hunks)app/package.json(1 hunks)app/version.json(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- app/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
- app/version.json
🧰 Additional context used
🪛 RuboCop (1.76.1)
app/fastlane/Fastfile
[convention] 141-141: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 148-148: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 169-169: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 325-325: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 411-411: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 414-421: Avoid more than 3 levels of block nesting.
(Metrics/BlockNesting)
🪛 actionlint (1.7.7)
.github/workflows/mobile-deploy.yml
880-880: job "create-release-tags" needs job "update-version-files" which does not exist in this workflow
(job-needs)
883-883: property "update-version-files" is not defined in object type {build-android: {outputs: {}; result: string}; build-ios: {outputs: {}; result: string}}
(expression)
966-966: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (8)
.github/workflows/mobile-deploy.yml (4)
51-69: LGTM: Well-structured workflow inputs for flexible deployment configurationThe addition of
deployment_trackandversion_bumpinputs provides good flexibility for different deployment scenarios. The choice constraints and default values are appropriate.
70-90: LGTM: Comprehensive workflow_call interface supports automationThe workflow_call inputs properly expose all necessary parameters for automated deployment, including the
auto_deployandtest_modeflags that enable safe testing and CI/CD integration.
424-448: LGTM: Dynamic deployment configuration with proper parameter passingThe iOS deployment step correctly uses the new input parameters to configure the Fastlane deployment. The conditional logic for test mode is well-implemented.
727-751: LGTM: Consistent Android deployment configurationThe Android deployment follows the same pattern as iOS, maintaining consistency across platforms with proper parameter handling.
app/fastlane/Fastfile (4)
102-172: LGTM: Well-structured iOS deploy_auto lane with comprehensive configurationThe new iOS deployment lane provides excellent flexibility with version bump handling, deployment track mapping, and test mode support. The logic flow from version management through build to notification is well-organized.
302-338: LGTM: Consistent Android deploy_auto implementationThe Android deployment lane mirrors the iOS implementation well, maintaining consistency across platforms. The version management integration and Play Store track mapping are handled appropriately.
401-426: Excellent error handling for Play Store permission issuesThe enhanced error handling for Play Store uploads is a significant improvement. The specific handling of permission errors (403, forbidden, insufficientPermissions) provides clear feedback to developers and gracefully degrades when permissions are insufficient.
434-449: LGTM: Enhanced Slack notifications with deployment contextThe updated Slack notifications now include deployment track information and consistent messaging format. The emoji usage and deploy source identification improve the user experience.
| - name: Create and push tags | ||
| run: | | ||
| cd ${{ env.APP_PATH }} | ||
| # Read current version info | ||
| VERSION=$(cat package.json | jq -r .version) | ||
| IOS_BUILD=$(cat version.json | jq -r .ios.build) | ||
| ANDROID_BUILD=$(cat version.json | jq -r .android.build) | ||
| echo "📦 Creating tags for version $VERSION" | ||
| # Create main version tag | ||
| if ! git tag -l | grep -q "^v${VERSION}$"; then | ||
| git tag -a "v${VERSION}" -m "Release ${VERSION}" | ||
| echo "✅ Created tag: v${VERSION}" | ||
| else | ||
| echo "⏭️ Tag v${VERSION} already exists" | ||
| fi | ||
| # Create platform-specific tags if deployments succeeded | ||
| if [ "${{ needs.build-ios.result }}" = "success" ]; then | ||
| TAG_NAME="v${VERSION}-ios-${IOS_BUILD}" | ||
| if ! git tag -l | grep -q "^${TAG_NAME}$"; then | ||
| git tag -a "${TAG_NAME}" -m "iOS Release ${VERSION} (Build ${IOS_BUILD})" | ||
| echo "✅ Created tag: ${TAG_NAME}" | ||
| fi | ||
| fi | ||
| if [ "${{ needs.build-android.result }}" = "success" ]; then | ||
| TAG_NAME="v${VERSION}-android-${ANDROID_BUILD}" | ||
| if ! git tag -l | grep -q "^${TAG_NAME}$"; then | ||
| git tag -a "${TAG_NAME}" -m "Android Release ${VERSION} (Build ${ANDROID_BUILD})" | ||
| echo "✅ Created tag: ${TAG_NAME}" | ||
| fi | ||
| fi | ||
| # Push all tags | ||
| git push origin --tags | ||
| echo "🚀 Tags pushed to repository" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify git tag creation logic and handle potential conflicts
The tag creation logic looks generally sound, but consider these potential issues:
- The script creates tags without checking if they already exist remotely
- Concurrent deployments could create conflicting tags
- No rollback mechanism if tag pushing fails
🏁 Script executed:
#!/bin/bash
# Check if there are any existing tag creation patterns in the repository
echo "Searching for existing tag creation patterns..."
rg -A 5 -B 5 "git tag" --type yml --type sh
echo "Checking for tag cleanup or rollback mechanisms..."
rg -A 3 -B 3 "tag.*delete|delete.*tag" --type yml --type shLength of output: 379
I couldn’t detect any matches because ripgrep didn’t recognize the yml type. Let’s retry using globbing to cover both YAML and shell files:
🏁 Script executed:
#!/bin/bash
echo "Searching for existing tag creation patterns..."
rg -A 5 -B 5 "git tag" --glob '*.yml' --glob '*.yaml' --glob '*.sh'
echo "Checking for tag cleanup or rollback mechanisms..."
rg -A 3 -B 3 -e "tag.*delete" -e "delete.*tag" --glob '*.yml' --glob '*.yaml' --glob '*.sh'Length of output: 1008
Ensure robust git tag creation and conflict handling
I noticed the workflow’s tag logic and a parallel app/scripts/release.sh both create and push Git tags without fully guarding against existing remote tags or handling failures. To tighten this up:
• In .github/workflows/mobile-deploy.yml (lines 899–937):
- Fetch remote tags first:
git fetch --tags origin
- Check remote existence before local tagging:
if ! git ls-remote --exit-code --tags origin "v${VERSION}" >/dev/null; then git tag -a "v${VERSION}" -m "Release ${VERSION}" else echo "⏭️ Remote tag v${VERSION} already exists" fi
- Push only new tags instead of
--tags(to avoid pushing stale or orphaned tags):git push origin v${VERSION}${TAG_NAMES:+ $TAG_NAMES}
• In app/scripts/release.sh:
- Wrap the
git tag -a "v${NEW_VERSION}"…in a pre-check (eithergit tag -lorgit ls-remote) to prevent duplicate‐tag errors. - After
git push, verify success (|| exit 1) and, on failure, consider deleting any tags you just created to keep the local repo clean:git push origin v${NEW_VERSION} || { git tag -d v${NEW_VERSION} echo "❌ Push failed, cleaned up local tag" >&2 exit 1 }
• Handling concurrency:
- Two runners won’t see each other’s tags, so consider a simple lock file in your CI cache or serialize the deploy job to prevent racing.
These changes will prevent conflicts from duplicate or remote‐existing tags and ensure failed pushes don’t leave orphaned tags behind.
🤖 Prompt for AI Agents
In .github/workflows/mobile-deploy.yml lines 899 to 937, improve git tag
creation by first fetching remote tags with 'git fetch --tags origin' and
checking for remote tag existence using 'git ls-remote' before creating local
tags to avoid duplicates. Replace the unconditional 'git push origin --tags'
with pushing only the newly created tags explicitly to prevent pushing stale or
orphaned tags. Additionally, in app/scripts/release.sh, add pre-checks for
existing tags before creating new ones, and after pushing tags, verify success
and delete local tags if the push fails to keep the repo clean. Consider adding
concurrency controls like a lock file or serializing deploy jobs to avoid race
conditions between parallel runners.
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| tag_name: v${{ steps.changelog.outputs.version }} | ||
| name: Release ${{ steps.changelog.outputs.version }} | ||
| body_path: ${{ env.APP_PATH }}/release_notes.md | ||
| draft: false | ||
| prerelease: false | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update deprecated GitHub Action version
The softprops/action-gh-release@v1 action version is outdated and may not work on current GitHub runners.
- uses: softprops/action-gh-release@v1
+ uses: softprops/action-gh-release@v2📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.changelog.outputs.version }} | |
| name: Release ${{ steps.changelog.outputs.version }} | |
| body_path: ${{ env.APP_PATH }}/release_notes.md | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ steps.changelog.outputs.version }} | |
| name: Release ${{ steps.changelog.outputs.version }} | |
| body_path: ${{ env.APP_PATH }}/release_notes.md | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
🧰 Tools
🪛 actionlint (1.7.7)
966-966: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In .github/workflows/mobile-deploy.yml around lines 965 to 974, the GitHub
Action softprops/action-gh-release@v1 is deprecated and may not function
properly on current runners. Update the action version to the latest stable
release, such as softprops/action-gh-release@v2 or the newest available version,
by changing the uses line accordingly to ensure compatibility and support.
| @@ -0,0 +1,87 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have an sample changelog?
| @@ -0,0 +1,217 @@ | |||
| # Mobile Deployment Guide | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: did we want to keep this markdown readme in a hidden folder? or should we move it to the project root or create a "docs" folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have kept it in folder structure since it's relevant to that folder but i agree we can move it to docs too or atleast internal docs. i have put the same markdown in notion too
* audit fixes (#645) * merge dev branch into main (#624) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> * update contracts (#628) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> * fix: vc_and_disclose_id test (#640) * fix: vc_and_disclose_id test * chore: yarn prettier * fix: check if a config id exists * chore: change the function where the config not set verification is happening * fix: add await * feat: add getConfigId function in SelfVerificationRoot (#650) * feat: add getConfigId function in SelfVerificationRoot * update comment --------- Co-authored-by: motemotech <[email protected]> * chore: fix ofac end index in eu id cards * chore: fix tests * fix: example contracts and tests --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> * Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) * publish npm-package (#651) * App/eu id updates (#638) * fix build issues * generate disclosure proof with euids * generate disclosure proof with euids * Eu id updates 2 (#648) * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * add version and user defined data --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * remove the mock user define data * get the useridentifier as a hash from the user defined data * chore: add version and userDefinedData * feat: use the version in register / dsc proofs as well * update calculateUserIdentifierHash * yarn nice * refactor: consolidate user context data handling and update payload structure * fix typing issues on sha1 * remove console.log(sha1) * fix sha1 import * refactor: streamline userDefinedData handling and adjust payload type for circuit * refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash * yarn nice * yarn lint common * use ts-ignore for sha1 import * fix app ci tests * fix typing issue * remove unused ts-ignore * cast uuid before calling generateinputs * bump qrcode version * add tsup on the qrcode sdk * fix: exports on selfxyz/qrcode * update how we define config.version * fix yarn imports * yarn format --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Ayman <[email protected]> * Hotfix contract compile error (#660) * Fix previous rebase error * Refactor deployment module for Identity Verification Hub V2. * Fix/sdk (#652) * fix: sdk build configs * chore: SelfBackendVerifier (WIP) * feat: add custom verification * feat: consider destination chain in user defined data * chore: export attestation id * chore: export attestation id * chore: export config storage * chore: don't throw an error if the proof is not valid * chore: trim abi and rm typechain types * refactor * chore: rm unnecessary exports * 📝 Add docstrings to `fix/sdk` (#653) Docstrings generation was requested by @remicolin. * https://github.com/selfxyz/self/pull/652#issuecomment-2992046545 The following files were modified: * `sdk/core/src/utils/hash.ts` * `sdk/core/src/utils/proof.ts` * `sdk/core/src/utils/utils.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * review fixes * chore: fix package.json cjs types * chore: add minor changes to checks * feat: add InMemoryConfigStore, allIds constant and verificationResult type * chore: export Verification config * feat: change the verification config types * fix: throw issues early if verification config is null * fix: update yarn.lock file * chore: lint * fix: rm ts expect error directive * fix: contract tests * use excluded countries instead forbidden countries list * chore: change types in constnats --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update npm-publish workflow and bump core package version to 1.0.0 (#661) * update import * Update get verification config visibility (#664) * Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands. * Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment. * Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access. * Apply BUSL v1.1 license headers to app (#665) * Add BSL license headers to app sources * prettier * fix license reference - https://spdx.org/licenses/BUSL-1.1.html * bump build: android 73 (#659) * Contracts/deploy staging (#668) * update scripts * deploy vc and disclose id * fix the deployment scripts on staging * update yarn.lock * bump ios build and version (#669) * configure coderabbitai (#670) * tweak coderabbit * bump * more thorough test spec * Apply BSL to app codebase (#639) * Clean up root license wording * Simplify SPDX header * simplify license and rename BSL to BUSL * fix merge issues * fix missing method --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-423 apply xcode build suggestions (#671) * apply recommended app settings from xcode * stick to portrait orientation and update target settings * remove app clip references * Circuit audit fixes (#644) * feat: add range checks before use of LessEqThan and SelectSubArray * fix: Num2Bits_strict to constrain virtualKey * bump core version * bump core version and fix ci * chore: use npm_auth_token in yarnrc * chroe: rm yarnrc changes * chore: update npm publish * chore: run npm publish manually * chore: change hub contract address (#675) * Update npm-publish.yml * merge dev to main (#657) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) * CAN auth - android (#613) * add missed files * add NFCMethodSelectionScreen * bump android build --------- Co-authored-by: Justin Hernandez <[email protected]> * feat: add MRZ correction method to NFCMethodSelectionScreen (#627) * add npm auth token env (#632) * bump sdk version (#633) * publish npm package when merging on dev * bump common sdk version * replace yarn publish by npm publish * update common package version * Simplify dev mode gesture (#635) * Simplify developer mode gesture * Enable dev mode on MockData screen with five taps * add build smt function to common sdk * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * Bump build: ios 133; android 72 and build fixes (#654) * update gesture version and bump android build * bump and fix ios build * update lock files * fixes * fix fotoapparat library source * Update example contracts to include EUID usage (#656) * refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic * refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations * refactor: remove BASIS_POINTS constant from Airdrop contract * feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721 * fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook * cherry pick commit from add-test-self-verification... * block non-dev pr to main branch * audit fixes (#645) * merge dev branch into main (#624) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> * update contracts (#628) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> * fix: vc_and_disclose_id test (#640) * fix: vc_and_disclose_id test * chore: yarn prettier * fix: check if a config id exists * chore: change the function where the config not set verification is happening * fix: add await * feat: add getConfigId function in SelfVerificationRoot (#650) * feat: add getConfigId function in SelfVerificationRoot * update comment --------- Co-authored-by: motemotech <[email protected]> * chore: fix ofac end index in eu id cards * chore: fix tests * fix: example contracts and tests --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> * Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) * publish npm-package (#651) * App/eu id updates (#638) * fix build issues * generate disclosure proof with euids * generate disclosure proof with euids * Eu id updates 2 (#648) * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * add version and user defined data --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * remove the mock user define data * get the useridentifier as a hash from the user defined data * chore: add version and userDefinedData * feat: use the version in register / dsc proofs as well * update calculateUserIdentifierHash * yarn nice * refactor: consolidate user context data handling and update payload structure * fix typing issues on sha1 * remove console.log(sha1) * fix sha1 import * refactor: streamline userDefinedData handling and adjust payload type for circuit * refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash * yarn nice * yarn lint common * use ts-ignore for sha1 import * fix app ci tests * fix typing issue * remove unused ts-ignore * cast uuid before calling generateinputs * bump qrcode version * add tsup on the qrcode sdk * fix: exports on selfxyz/qrcode * update how we define config.version * fix yarn imports * yarn format --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Ayman <[email protected]> * Hotfix contract compile error (#660) * Fix previous rebase error * Refactor deployment module for Identity Verification Hub V2. * Fix/sdk (#652) * fix: sdk build configs * chore: SelfBackendVerifier (WIP) * feat: add custom verification * feat: consider destination chain in user defined data * chore: export attestation id * chore: export attestation id * chore: export config storage * chore: don't throw an error if the proof is not valid * chore: trim abi and rm typechain types * refactor * chore: rm unnecessary exports * 📝 Add docstrings to `fix/sdk` (#653) Docstrings generation was requested by @remicolin. * https://github.com/selfxyz/self/pull/652#issuecomment-2992046545 The following files were modified: * `sdk/core/src/utils/hash.ts` * `sdk/core/src/utils/proof.ts` * `sdk/core/src/utils/utils.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * review fixes * chore: fix package.json cjs types * chore: add minor changes to checks * feat: add InMemoryConfigStore, allIds constant and verificationResult type * chore: export Verification config * feat: change the verification config types * fix: throw issues early if verification config is null * fix: update yarn.lock file * chore: lint * fix: rm ts expect error directive * fix: contract tests * use excluded countries instead forbidden countries list * chore: change types in constnats --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update npm-publish workflow and bump core package version to 1.0.0 (#661) * update import * Update get verification config visibility (#664) * Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands. * Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment. * Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access. * Apply BUSL v1.1 license headers to app (#665) * Add BSL license headers to app sources * prettier * fix license reference - https://spdx.org/licenses/BUSL-1.1.html * bump build: android 73 (#659) * Contracts/deploy staging (#668) * update scripts * deploy vc and disclose id * fix the deployment scripts on staging * update yarn.lock * bump ios build and version (#669) * configure coderabbitai (#670) * tweak coderabbit * bump * more thorough test spec * Apply BSL to app codebase (#639) * Clean up root license wording * Simplify SPDX header * simplify license and rename BSL to BUSL * fix merge issues * fix missing method --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-423 apply xcode build suggestions (#671) * apply recommended app settings from xcode * stick to portrait orientation and update target settings * remove app clip references * Circuit audit fixes (#644) * feat: add range checks before use of LessEqThan and SelectSubArray * fix: Num2Bits_strict to constrain virtualKey * bump core version * bump core version and fix ci * chore: use npm_auth_token in yarnrc * chroe: rm yarnrc changes * chore: update npm publish * chore: run npm publish manually * chore: change hub contract address (#675) * Update npm-publish.yml --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]> * chore: use proper secret when publishing * feat: enable publishing if workflow was triggered manually * Contracts/update verifier (#673) * update hardhat config * update vc and disclose verifier * update vc and disclose verifier script and run it * update test self verification root * update verifier * bump sdk version and use new hub address * chore: update zk-kit binary merkle root dep (#674) * Dev (#677) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) * CAN auth - android (#613) * add missed files * add NFCMethodSelectionScreen * bump android build --------- Co-authored-by: Justin Hernandez <[email protected]> * feat: add MRZ correction method to NFCMethodSelectionScreen (#627) * add npm auth token env (#632) * bump sdk version (#633) * publish npm package when merging on dev * bump common sdk version * replace yarn publish by npm publish * update common package version * Simplify dev mode gesture (#635) * Simplify developer mode gesture * Enable dev mode on MockData screen with five taps * add build smt function to common sdk * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * Bump build: ios 133; android 72 and build fixes (#654) * update gesture version and bump android build * bump and fix ios build * update lock files * fixes * fix fotoapparat library source * Update example contracts to include EUID usage (#656) * refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic * refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations * refactor: remove BASIS_POINTS constant from Airdrop contract * feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721 * fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook * cherry pick commit from add-test-self-verification... * block non-dev pr to main branch * audit fixes (#645) * merge dev branch into main (#624) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> * update contracts (#628) * remove sdk/tests (#622) * remove sdk/tests * chore: update yarn.lock --------- Co-authored-by: Ayman <[email protected]> * fix: add range check on paddedInLength of shaBytesDynamic (#623) * fix ci (#626) * implement self uups upgradeable (#592) * implement self uups upgradeable * small changes in identityVerificationHubImplV2 * delete aderyn.toml * chore: add custom verifier * chnage return output * feat: use self structs and a Generic output struct * feat: add userIdentifier, nullifier, forbiddencountries to returned output * add root view functions from registry * fix: build and compilation errors * add userDefined data into selfVerificationRoot * "resolve conflicts" * fix compilation problem * fix how to register verification config * test: CustomVerifier * fix verification root and hub integration * add scope check in hub impl * replace poseidon hash to ripemd+sha256 * add todo list * feat: refactor and add test cases for generic formatter * add performUserIdentifierCheck in basicVerification * change how to handle additionalData and fix stack too deep * start adding test codes * fix dependency problems in monorepo * fix: forbidden countries (#612) LGTM! * able to run test code * pass happy path * delete unused codes * change error code name, add caller address validation and add scripts to run test and build in monorepo * add all test cases in vcAndDisclose flow * remove comment out * chore: use actual user identifier outputs * success in registration tests * cover all cases * pass contractVersion instead of circuitVersion * fix disclose test * chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter * change val name and remove unused lines * add val name change * remove userIdentifier from return data * feat: use GenericDiscloseOutput struct in verfication hook fix test cases for user identifier * chore: change the function order for Hub Impl V2 (#625) * fix nat specs * add nat spec in SelfStructs --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Nesopie <[email protected]> * prettier (#629) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> * fix: vc_and_disclose_id test (#640) * fix: vc_and_disclose_id test * chore: yarn prettier * fix: check if a config id exists * chore: change the function where the config not set verification is happening * fix: add await * feat: add getConfigId function in SelfVerificationRoot (#650) * feat: add getConfigId function in SelfVerificationRoot * update comment --------- Co-authored-by: motemotech <[email protected]> * chore: fix ofac end index in eu id cards * chore: fix tests * fix: example contracts and tests --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> * Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) * publish npm-package (#651) * App/eu id updates (#638) * fix build issues * generate disclosure proof with euids * generate disclosure proof with euids * Eu id updates 2 (#648) * update vc_and_disclose_id test (dev branch) (#641) * fix: vc_and_disclose_id test * chore: yarn prettier * Show modal on NFC scan error (#642) * Add help button and error modal actions * fix the screen management * yarn nice * Bump build v2.5.4: ios 132; android 71 (#631) * bump version and build numbers * remove tamagui/toast * fix marketing version * fix: update TD1 and TD3 checks (#643) * bum yarn.lock * add version and user defined data --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> * remove the mock user define data * get the useridentifier as a hash from the user defined data * chore: add version and userDefinedData * feat: use the version in register / dsc proofs as well * update calculateUserIdentifierHash * yarn nice * refactor: consolidate user context data handling and update payload structure * fix typing issues on sha1 * remove console.log(sha1) * fix sha1 import * refactor: streamline userDefinedData handling and adjust payload type for circuit * refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash * yarn nice * yarn lint common * use ts-ignore for sha1 import * fix app ci tests * fix typing issue * remove unused ts-ignore * cast uuid before calling generateinputs * bump qrcode version * add tsup on the qrcode sdk * fix: exports on selfxyz/qrcode * update how we define config.version * fix yarn imports * yarn format --------- Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Ayman <[email protected]> * Hotfix contract compile error (#660) * Fix previous rebase error * Refactor deployment module for Identity Verification Hub V2. * Fix/sdk (#652) * fix: sdk build configs * chore: SelfBackendVerifier (WIP) * feat: add custom verification * feat: consider destination chain in user defined data * chore: export attestation id * chore: export attestation id * chore: export config storage * chore: don't throw an error if the proof is not valid * chore: trim abi and rm typechain types * refactor * chore: rm unnecessary exports * 📝 Add docstrings to `fix/sdk` (#653) Docstrings generation was requested by @remicolin. * https://github.com/selfxyz/self/pull/652#issuecomment-2992046545 The following files were modified: * `sdk/core/src/utils/hash.ts` * `sdk/core/src/utils/proof.ts` * `sdk/core/src/utils/utils.ts` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * review fixes * chore: fix package.json cjs types * chore: add minor changes to checks * feat: add InMemoryConfigStore, allIds constant and verificationResult type * chore: export Verification config * feat: change the verification config types * fix: throw issues early if verification config is null * fix: update yarn.lock file * chore: lint * fix: rm ts expect error directive * fix: contract tests * use excluded countries instead forbidden countries list * chore: change types in constnats --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update npm-publish workflow and bump core package version to 1.0.0 (#661) * update import * Update get verification config visibility (#664) * Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands. * Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment. * Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access. * Apply BUSL v1.1 license headers to app (#665) * Add BSL license headers to app sources * prettier * fix license reference - https://spdx.org/licenses/BUSL-1.1.html * bump build: android 73 (#659) * Contracts/deploy staging (#668) * update scripts * deploy vc and disclose id * fix the deployment scripts on staging * update yarn.lock * bump ios build and version (#669) * configure coderabbitai (#670) * tweak coderabbit * bump * more thorough test spec * Apply BSL to app codebase (#639) * Clean up root license wording * Simplify SPDX header * simplify license and rename BSL to BUSL * fix merge issues * fix missing method --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-423 apply xcode build suggestions (#671) * apply recommended app settings from xcode * stick to portrait orientation and update target settings * remove app clip references * Circuit audit fixes (#644) * feat: add range checks before use of LessEqThan and SelectSubArray * fix: Num2Bits_strict to constrain virtualKey * bump core version * bump core version and fix ci * chore: use npm_auth_token in yarnrc * chroe: rm yarnrc changes * chore: update npm publish * chore: run npm publish manually * chore: change hub contract address (#675) * Update npm-publish.yml * chore: use proper secret when publishing * feat: enable publishing if workflow was triggered manually * Contracts/update verifier (#673) * update hardhat config * update vc and disclose verifier * update vc and disclose verifier script and run it * update test self verification root * update verifier * bump sdk version and use new hub address * chore: update zk-kit binary merkle root dep (#674) --------- Co-authored-by: Ayman <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]> Co-authored-by: nicoshark <[email protected]> Co-authored-by: Nesopie <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Kevin Lin <[email protected]> Co-authored-by: kevinsslin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eric Nakagawa <[email protected]> * refactor deployment scripts (#678) * feat: add register eu id instances (#682) * feat: add register eu id instances * feat: add new instances * chore: update scripts * chore: fix sig alg * chore: rm circuits * update the smart contracts scripts (#684) * remove the && false * fix euid (#685) * keep build and version in sync (#686) * fix env set to null * fix: circuit for register ci (#690) * fix: circuit for register ci * fix: rm duplicate workflow_dispatch * feat: add better error handling (#691) * fix: older than bug (#692) * bump: sdk/[email protected] * fix: config not found bug * decrease parallel circuits to 3 * ci: add prettier check for contract sdk (#602) * Add Prettier check for code formatting in contracts workflow * Update contracts workflow: remove unused checkout action and fix build step name * Run formatter * Run lint fix * chore: update build_cpp to 2 concurrent builds * Contract/fix sdk (#695) * fix contracts sdk * fix contracts sdk * Fix contract example v2 (#694) * feat: add verification config ID functionality to Airdrop, HappyBirthday, and SelfIdentityERC721 contracts * Run formatter * SEL-473: Add lint rule for BUSL headers (#698) * chore(app): enforce license header via eslint * update lock and order * fix formatting * SEL-444: Fix android cloud backup (#697) * feat(android): migrate google backup * update lock and google services config * add bulk format command * backup fixes * working drive settings!!!!!!!! * remove unneeded intent filter * add tests * coderabbit feedback * coderabbit feedback * abstract google method * coderabbit feedback and fix test * more coderabbit suggestions and tests fixes * chore: update relayer verifier enum to include the register circuits (#699) * fix env sample (#700) * Abstract iOS cloud backup logic (#701) * feat(ios): abstract cloud backup logic * prettier and cr feedback * tested on iOS and android and functionality is the same * Fix navigation serialization warnings (#702) * test: cover modal callbacks * coderabbit feedback * feat(app): clarify passport linking (#704) * Show NFC support message (#708) * SEL-425: Add document management analytics events (#706) * Add document management analytics * coderabbit feedback * SEL-447: Improve proof failure feedback (#707) * feat: flag stale proofs as failed * make a constant * format * SEL-330: Add backup check after verification (#711) * route to save phrase if backup disabled * format * SEL-483: Implement recovery backup prompts (#710) * feat: prompt users to back up account * feat: prompt users to back up account * format * Add tests for recovery prompt logic * more lint updates * fix imports * fix unused import * update cursor suggestions * implement coderabbit suggestions and fix tests * SEL-472: Enable production push notifications (#703) * chore: leave sandbox apns token comment * tweak entitlement * coderabbit ai feedback * firebase tweaks * Chore: ensure there is an extra empty line after the license declaration (#712) * ensure there is an extra empty line after the license declaration * ignore adding header to cjs config files * add missing license header * ignore linting metro config * bump version and add mainnet hub address * Bugfix: Show recovery prompt only when user has docs (#714) * feat(app): prompt recovery only when docs exist * cr feedbacl * SEL-487: Prompt user to backup recovery phrase before registering (#715) * feat: prompt backup before registration * coderabbit feedback * fix tests * coderabbitai feedback and fix tests * Remove StartupFlushPolicy (#717) * SEL-479: Multi-ID onboarding mvp flow (#688) * save new launch screen wip * save wip * finalize launch look * replace launch screen * rename * update camera onboarding and scan screen * update tips looks * update nfc scan issue screens * update copy * add launch screen todo * fix casing * update launch screen link, copy and add tracking event * bump project version to match app store * match app store * updated supported bio id link * add dialog message support back in * cr feedback * bump version and build * update images * tweak animation layout * loop with setTimeout * fix onboarding assets (#719) * feat: add flag to use PACEPolling (#680) * feat: add flag to use PACEPolling * fix: santize before storing in store * bump ios build number and update podfile lock * prettier * bump build * feat: add flag to use PACEPolling * fix: santize before storing in store * bump ios build number and update podfile lock * prettier * bump build --------- Co-authored-by: Justin Hernandez <[email protected]> * fix backup button label (#722) * update version to 2.6.0 and bump build numbers (#721) * SEL-179 & SEL-312: Add gitleaks and GitGuardian scanning (#705) * chore: add secret scanning setup * fix: correct GitGuardian action path * cr feedbacak * test husky commit * pr feedback * fix workflows * tweaks * fix versions * upgrade: migrate from husky v8 to v9 - Update husky from ^8.0.0 to ^9.1.7 - Change prepare script from 'husky install' to 'husky' - Remove v8 hook structure (shebang, husky.sh sourcing) - Delete .husky/_/ directory as it's not needed in v9 - Maintain gitleaks pre-commit hook functionality * coderabbitai feedback * add bulk sort command (#723) * feat(app): redirect empty docs to launch (#725) * Apply consistent safe area padding across screens (#726) * Contracts/update verifiers (#729) * update the verifiers * update deployment script * update deployment script and deploy to prod * prettier run write * App/ethcc fixes (#730) * fix mock data screen * increase timout between dsc and register proof * fix the isUserRegisteredWithAlternativeCSCA function * yarn nice * allow people to switch to a mock id (#732) * yarn nice * chore: update default config id method * chore: use named exports * Update README.md * Temporarily disable recovery redirect and reminder prompts (#733) * Revert "SEL-487: Prompt user to backup recovery phrase before registering (#715)" This reverts commit fe14ac655e11b4b9e0c4023002b84fcc79bedd31. * revert update * fix safe area context pkg * Revert "SEL-487: Prompt user to backup recovery phrase before registering (#715)" This reverts commit fe14ac655e11b4b9e0c4023002b84fcc79bedd31. * fix old flow * more silent tests * update lock files * hard code return * SEL-486: Fix unwrap DO (#718) * update podfile: unwrapDO * update lock * bump version and builds * bump build; forgot to enable logs * fix version to not interfere with release --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-494: Update proving machine event tracking (#734) * Add extensive proof analytics instrumentation * prettier and sort events by key name * remove loading screen race condition redirect (#736) * Chore: new build for v2.6.0 ios 145 android 81 (#737) * bump version and build * properly bump app * bump build * Improve manual mobile deploy workflow and docs (#728) * Add basic Fastlane helper tests * Upgrade fastlane and enhance helper tests (#738) * simplify mobile deploy pipelines and make them manual. update readme * update fastlane dev readme * update tests and add helper script * cr feedback, update tests, revert circuits package.json sort change * tweaks * fix slack * cr feedback and fixes * add better cjs eslint support * save wip. add confirmation check script. update scripts * remove auto increment feature * migrate readme items over to DEV due to fastlane auto regen docs flow * use regular xcode * fix hermes compiler path * coderabbit feedback * reinstall when on local dev * fix upload * simplify * simplify confirmation feedback with tests * fix mobile deploys * cr feedback * test iOS building * fix trigger logic * cr feedback * updates * fix env var * fix order * re-enable upload to testflight for ios * updated notes * chore: update readme * Bugfix: android deeplinks (#742) * bugfix: deep linking * add android manifest test * bump build and version * format readme * fix deeplink genmockiddoc * add the gender to the deeplink optoin * bump version (#743) * fix the female bug * bump build 148 (#744) * SEL-496: Add Firebase Remote Config and dev feature flag screen (#735) * feat: add remote config support * update lock * tweak config logic. add feature flag viewing screen * add tests * allow for local overriding of feature flags * save local override work * save wip * clean up ui * update screen to handle multi value types * fix tests * cr feedback and fix tests * remote config upates. fix tests, codex feedback * Improve AGENTS workflow notes (#747) * clarify workflow instructions * agents feedback * Address minor mobile deployment bugs (#745) * feat: improve deployment tooling * cr feedback * for temp testing * clean build artifacts after deploy * add deploy source * uncomment ios commands * Add tests for minor deployment fixes (#750) * Add test coverage for deployment scripts and Fastfile * format * increase github check to 5 minutes * Extend platform build file tests (#748) * Add build file tests * cr feedback * Add proving machine tests (#749) * Add actor mock helper and tests * format tests * fix tests * wip fix tests * address cr feedback * Add thorough test cases for mobile app (#752) * Add actor mock helper and tests * format tests * fix tests * Revert non-app tests * update tests * fix tests * coderabbit feedback * revert change * remove spurious tests * don't use crypto in core sdk * Start of Web App (#689) * Add .cursorignore to optimize AI editor performance and security (#758) Prevents Cursor AI from accessing sensitive files (keys, credentials, deployment configs) and large generated artifacts that slow down indexing. Keeps source code accessible while excluding build outputs, node_modules, and circuit/contract compilation artifacts across the monorepo. * SEL-504: fix fonts and some styles (#762) * fix fonts and some styles * dry config * fix some warnings * lets start with coverage for app (#763) * lets start with coverage for app * lint * better setup * SEL-559: Update td1 regex (#760) * feat: update td1 regex * update review comments * fix: NPE on expirationDate regex * fix user defined data (#766) * fix: name formatting for middle name * bump: sdk/core to 1.0.7-beta.1 * Feat/retrieve OFAC trees from api (#769) * retrieve the ofac trees from the api * remove the ofac trees from the common repo * fix ofac test * yarn nice * yarn nice * yarn nice * refactor ofac fetching * Release new build v2.6.2 (#779) * bump version and build * ignore podfile * Remove failing version test (#780) * remove version check test * remove test all together * SEL-269: Update ESLint rules & lock prettier config (#781) * Update ESLint config and lock prettier config * Refine ESLint config and fix lint issues * Apply eslint fixes * Use socketIo alias (#782) * move gesture handler * save wip updates * fix svg imports * update tsconfig * eslint updates * eslint fixes * improve ignore folders * coderabbit feedback * Fix style prop shorthands (#787) * Expand view style props * Expand remaining style props * update types * fix pipeline * fix test env check * nicer casting * fix booleans * update deeplink url handling and make it more robust * add socket error handler * Add COSE signature verification tests (#788) * Update ESLint config and lock prettier config * Refine ESLint config and fix lint issues * save wip updates * eslint updates * eslint fixes * Add COSE signature verification tests * fix tests * SEL-553: Show NFC Progress (#764) * feat: add haptics * fix: BAC FAILED error event * update lock file --------- Co-authored-by: Justin Hernandez <[email protected]> * SEL-566: Navigate Home based on document validity (#768) * feat: navigate home if atleast one valid document is present * update comments * Review: Remove unnecessary continue statement * feat: add tracking * SEL-544: Generate Mock DSC on mock-passport flow (#772) * feat: Generate mock DSC on mock-passport flow * Remove console log * yarn format * revert to mock dsc generation * SEL-570: Display user ID in prove screen (#790) * Display user ID on prove screen * Add user ID formatting util and tests * Clarify user ID formatting * fix nice * add tests and save toggle wip * update tests based on feedback * say connected wallet when wallet * fix: Add localhost validation to prevent invalid endpoint usage in QR Code SDK (#794) * Feat/mobile deployment automation (#759) * feat: add version management system with build number tracking - Add version.json to track iOS/Android build numbers separately - Create version.cjs script for build number management - Add Fastlane version_manager.rb helper - Keep npm version for semver, version.json for build tracking * feat: integrate version.json with Fastlane deployment process ## What Changed - Updated iOS and Android Fastlane lanes to use version.json for build number management - Added automatic build number increment on deployment - Added deployment timestamp tracking ## How It Works ### iOS Deployment 1. Reads current build number from version.json 2. Increments iOS build number (e.g., 148 → 149) 3. Updates Xcode project with new build number via increment_build_number 4. Proceeds with TestFlight deployment 5. Updates lastDeployed timestamp on successful upload ### Android Deployment 1. Reads current build number from version.json 2. Increments Android build number (e.g., 82 → 83) 3. Updates build.gradle with new version code via increment_version_code 4. Proceeds with Play Store deployment 5. Updates lastDeployed timestamp on successful upload ## Why This Change - Eliminates manual version/build number entry - Prevents version conflicts between deployments - Provides single source of truth for build numbers - Enables automatic deployments without human intervention - Tracks deployment history with timestamps ## Dependencies - Requires version.json file (already created in previous commit) - Uses existing Fastlane plugins: - increment_build_number (iOS - built-in) - increment_version_code (Android - from plugin) - Version numbers still managed by npm version command * feat: enhance deploy confirmation with version.json info * fix: use ENV variable directly in increment_build_number to avoid secret masking * fix: correct xcodeproj path for GitHub Actions workflow * feat: add test mode to workflow for safe testing - Skip store uploads when test_mode is true - Test version bumps and builds without deployment - Prevent accidental pushes to TestFlight/Play Store * fix: use gradle_file_path instead of gradle_file for increment_version_code * fix: use gsub to remove ../ prefix for CI compatibility * chore: remove accidentally committed files - Remove .cursor/mcp.json - Remove .cursorignore - Remove deployment-automation-summary.md - Remove deployment-meeting-questions.md - Remove pipeline.md * feat: auto-commit version.json after successful deployment - Commits version.json changes back to repository - Only runs when test_mode is false - Uses [skip ci] to prevent infinite loops - Checks for actual changes before committing * feat : update package.json in build step using npm version * feat: add comprehensive caching to mobile deployment workflow - Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK - Implement cache versioning strategy for easy cache invalidation - Fix cache order: caches now restored after checkout but before dependency installation - Update mobile-setup action to skip installs when dependencies are cached - Add cache size monitoring to track usage against GitHub's 10GB limit - Fix Slack notification bug: skip notifications in test_mode - Add detailed logging for package.json version updates (show from/to versions) Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min) * fix: move bundler config after Ruby setup in mobile-setup action * fix: rename cache env vars to avoid Yarn conflicts Yarn was interpreting YARN_CACHE_VERSION as its own config setting. Prefixed all cache version env vars with GH_ to avoid conflicts. * fix: remove bundler deployment mode to allow Gemfile updates The deployment mode was causing bundler to fail when Gemfile changed (nokogiri was removed). CI should be able to update the lockfile as needed. * feat: implement strict lock file enforcement (Option 1) - Re-enable bundler deployment mode for strict Gemfile.lock checking - Use yarn install --immutable for strict yarn.lock checking - Add clear error messages when lock files are out of date - Add pre-checks to verify lock files exist - This ensures reproducible builds and makes caching maximally effective When developers change dependencies, they must now: 1. Run yarn install or bundle install locally 2. Commit the updated lock files 3. CI will fail with helpful instructions if they forget * fix: update Gemfile.lock for CI environment Remove nokogiri from Gemfile.lock since it's excluded in CI environments (GITHUB_ACTIONS=true). This allows the strict lock file checks to pass in CI. * fix: correct yarn.lock path for monorepo workspace The project uses Yarn workspaces with yarn.lock at the repository root, not in the app directory. Updated paths to check for yarn.lock at workspace root and use it for cache keys. * fix: handle both boolean and string test_mode parameter The test_mode parameter was only checking for string 'true' but could be passed as boolean true from command line. Now handles both cases to ensure test mode works correctly for iOS and Android. * fix: address code review feedback for mobile deployment workflow - Replace jq with Node.js for version extraction (jq not available on macOS runners) - Fix concurrent commit race condition by creating separate update-version job - Add platform validation to version_manager.rb and version.cjs scripts - Use POSIX-compatible single = for shell string comparisons - Ensure single atomic commit when deploying to both platforms * fix: formatting and linting issues - Remove trailing spaces from workflow YAML file - Fix prettier formatting in JavaScript files - Add -y flag to yarn version command for non-interactive mode - Address all lint warnings from CI --------- Co-authored-by: Jayaditya Gupta <[email protected]> * fix: increment iOS build number * fix: bump app version to 2.6.3 for iOS release * App/deeplink callback (#789) * add deepllinkCallback support * bump package version * yarn nice * fix background countdown * cast the URL to prevent malicious code introduction * fix: use cleanDocumentNumber (#784) * increment iOS bundle version * Feat/push to dev main (#767) * feat: add version management system with build number tracking - Add version.json to track iOS/Android build numbers separately - Create version.cjs script for build number management - Add Fastlane version_manager.rb helper - Keep npm version for semver, version.json for build tracking * feat: integrate version.json with Fastlane deployment process ## What Changed - Updated iOS and Android Fastlane lanes to use version.json for build number management - Added automatic build number increment on deployment - Added deployment timestamp tracking ## How It Works ### iOS Deployment 1. Reads current build number from version.json 2. Increments iOS build number (e.g., 148 → 149) 3. Updates Xcode project with new build number via increment_build_number 4. Proceeds with TestFlight deployment 5. Updates lastDeployed timestamp on successful upload ### Android Deployment 1. Reads current build number from version.json 2. Increments Android build number (e.g., 82 → 83) 3. Updates build.gradle with new version code via increment_version_code 4. Proceeds with Play Store deployment 5. Updates lastDeployed timestamp on successful upload ## Why This Change - Eliminates manual version/build number entry - Prevents version conflicts between deployments - Provides single source of truth for build numbers - Enables automatic deployments without human intervention - Tracks deployment history with timestamps ## Dependencies - Requires version.json file (already created in previous commit) - Uses existing Fastlane plugins: - increment_build_number (iOS - built-in) - increment_version_code (Android - from plugin) - Version numbers still managed by npm version command * feat: enhance deploy confirmation with version.json info * fix: use ENV variable directly in increment_build_number to avoid secret masking * fix: correct xcodeproj path for GitHub Actions workflow * feat: add test mode to workflow for safe testing - Skip store uploads when test_mode is true - Test version bumps and builds without deployment - Prevent accidental pushes to TestFlight/Play Store * fix: use gradle_file_path instead of gradle_file for increment_version_code * fix: use gsub to remove ../ prefix for CI compatibility * chore: remove accidentally committed files - Remove .cursor/mcp.json - Remove .cursorignore - Remove deployment-automation-summary.md - Remove deployment-meeting-questions.md - Remove pipeline.md * feat: auto-commit version.json after successful deployment - Commits version.json changes back to repository - Only runs when test_mode is false - Uses [skip ci] to prevent infinite loops - Checks for actual changes before committing * feat : update package.json in build step using npm version * feat: add comprehensive caching to mobile deployment workflow - Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK - Implement cache versioning strategy for easy cache invalidation - Fix cache order: caches now restored after checkout but before dependency installation - Update mobile-setup action to skip installs when dependencies are cached - Add cache size monitoring to track usage against GitHub's 10GB limit - Fix Slack notification bug: skip notifications in test_mode - Add detailed logging for package.json version updates (show from/to versions) Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min) * fix: move bundler config after Ruby setup in mobile-setup action * fix: rename cache env vars to avoid Yarn conflicts Yarn was interpreting YARN_CACHE_VERSION as its own config setting. Prefixed all cache version env vars with GH_ to avoid conflicts. * fix: remove bundler deployment mode to allow Gemfile updates The deployment mode was causing bundler to fail when Gemfile changed (nokogiri was removed). CI should be able to update the lockfile as needed. * feat: implement strict lock file enforcement (Option 1) - Re-enable bundler deployment mode for strict Gemfile.lock checking - Use yarn install --immutable for strict yarn.lock checking - Add clear error messages when lock files are out of date - Add pre-checks to verify lock files exist - This ensures reproducible builds and makes caching maximally effective When developers change dependencies, they must now: 1. Run yarn install or bundle install locally 2. Commit the updated lock files 3. CI will fail with helpful instructions if they forget * fix: update Gemfile.lock for CI environment Remove nokogiri from Gemfile.lock since it's excluded in CI environments (GITHUB_ACTIONS=true). This allows the strict lock file checks to pass in CI. * fix: correct yarn.lock path for monorepo workspace The project uses Yarn workspaces with yarn.lock at the repository root, not in the app directory. Updated paths to check for yarn.lock at workspace root and use it for cache keys. * fix: handle both boolean and string test_mode parameter The test_mode parameter was only checking for string 'true' but could be passed as boolean true from command line. Now handles both cases to ensure test mode works correctly for iOS and Android. * fix: address code review feedback for mobile deployment workflow - Replace jq with Node.js for version extraction (jq not available on macOS runners) - Fix concurrent commit race condition by creating separate update-version job - Add platform validation to version_manager.rb and version.cjs scripts - Use POSIX-compatible single = for shell string comparisons - Ensure single atomic commit when deploying to both platforms * fix: formatting and linting issues - Remove trailing spaces from workflow YAML file - Fix prettier formatting in JavaScript files - Add -y flag to yarn version command for non-interactive mode - Address all lint warnings from CI * feat: implement automated branch-based mobile deployments - Add mobile-deploy-auto.yml workflow that triggers on PR merges to dev/main - Update mobile-deploy.yml to support workflow_call for reusability - Add deployment_track, version_bump, and auto_deploy parameters - Create new Fastlane lanes (deploy_auto) for iOS and Android - Implement smart version bumping based on PR labels (major/minor/patch) - Add graceful error handling for Play Store permission issues - Enhance Slack notifications with deployment track information This enables automatic deployments when PRs are merged: - dev branch → internal testing track - main branch → production track - Skip deployment with [skip-deploy] in PR or no-deploy label * feat: add automated git tagging and release system - Add automatic git tagging for production deployments (v2.5.5, platform-specific tags) - Create GitHub releases with changelogs for production deployments - Add manual release script (yarn release) for version bumping and tagging - Implement simple changelog generation from git history - Add comprehensive deployment documentation in .github/MOBILE_DEPLOYMENT.md - Update app/README.md with deployment commands and workflows This completes the release automation system requested in the ticket for manual tagging and versioning with automated changelogs and release notes. --------- Co-authored-by: Jayaditya Gupta <[email protected]> * Implement basic code splitting * cm feedback * update lock * yarn nice * add typing to crypto loader * fix type. more opportunities * lint suggestions * build dependencies before linting * fix build command * save updated imports * update build checks * fix import * fix imports and test * fix install commands * Update Gemfile.lock to exclude nokogiri in CI environments - Regenerated Gemfile.lock with GITHUB_ACTIONS=true to match the conditional nokogiri exclusion in the Ge…
based on #759 . this PR adds auto deploy on dev->testing and main->prod
Summary by CodeRabbit
New Features
Documentation
Chores