Skip to content

SELF-1684: Ensure checks are run with pull requests to staging/main#1523

Merged
jcortejoso merged 11 commits intostagingfrom
jcortejoso/no-path-filter
Dec 24, 2025
Merged

SELF-1684: Ensure checks are run with pull requests to staging/main#1523
jcortejoso merged 11 commits intostagingfrom
jcortejoso/no-path-filter

Conversation

@jcortejoso
Copy link
Member

@jcortejoso jcortejoso commented Dec 19, 2025

paths filter in the trigger section can be problematic, if the list of changed files is too large. Refactor to use a dedicated filter step that runs in a runner, to reduce this problem


Note

Modernizes and streamlines CI across the repo while reducing unnecessary runs.

  • Upgrade: Replace actions/checkout@v4 with @v6 in all workflows
  • Selective execution: Add check_changes jobs in circuits.yml and contracts.yml to gate runs by base branch and changed paths (removes paths triggers)
  • Circuits CI improvements: Use self-hosted runners, set up Node/Corepack, cache Yarn, and keep Circom install with checksum verification
  • NPM publish fix: Update Mobile SDK package path to packages/mobile-sdk-alpha in npm-publish.yml
  • Minor CI polish: Consistent caches/build artifact restores across mobile/core/common SDK workflows; small reliability tweaks (e.g., Corepack, Xcode path config)
  • Tests: Mark two Aadhaar register circuit tests as skipped (it.skip) to stabilize CI

Written by Cursor Bugbot for commit ec69e20. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Chores

    • Bumped GitHub Actions checkout from v4 to v6 across workflows.
  • CI Improvements

    • Added conditional checks to only run specific test workflows when relevant files or branches change.
    • Inserted Node.js/Corepack setup steps for affected workflows.
  • Tests

    • Marked two circuit tests as skipped to prevent their execution in current runs.

✏️ Tip: You can customize this high-level summary in your review settings.

…nges. Added checks for 'circuits' in circuits.yml and 'contracts' or 'common' in contracts.yml to determine if tests should execute on dev branch. This avoids too wide changelist in trigger filter that is problematic
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Added per-workflow change detection jobs that gate circuit/contract test runs; upgraded actions/checkout from v4→v6 across many workflows; two Circuits tests converted to skipped; a path fix in npm-publish.yml and Node/Corepack setup steps added to circuits workflow.

Changes

Cohort / File(s) Summary
Conditional Job Execution
.github/workflows/circuits.yml, .github/workflows/contracts.yml
New check_changes job outputs should_run by inspecting base branch and diffs; run_circuit_tests / test_contracts now needs: check_changes and run only when PR is non-draft and should_run == 'true'. Removed paths filter from contracts.yml. Added Node.js and Corepack setup steps in circuits.yml.
Checkout Action Upgrade (v4→v6)
.github/workflows/... (many files) — e.g., circuits-build.yml, common-ci.yml, core-sdk-ci.yml, gitleaks.yml, mobile-*.yml, npm-publish.yml, qrcode-sdk-ci.yml, release-calendar.yml, web.yml, workspace-ci.yml, app/.github/workflows/test-coverage.yml
Replaced actions/checkout@v4 with actions/checkout@v6 across multiple workflows; no other behavioral changes in those jobs.
npm-publish path fix
.github/workflows/npm-publish.yml
Updated package path from sdk/mobile-sdk-alpha/package.jsonpackages/mobile-sdk-alpha/package.json; checkout bumped to v6.
Test adjustments
circuits/tests/register/register_aadhaar.test.ts
Two it tests changed to it.skip, disabling their execution.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

skip-deploy

Suggested reviewers

  • remicolin
  • shazarre
  • Nesopie

Poem

Workflows sharpen, gates in place,
Check diffs, then run the race.
Checkouts newer, tests paused neat,
CI hums a steady beat. 🚦✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: refactoring GitHub Actions workflows to ensure checks run on pull requests to staging/main branches.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jcortejoso/no-path-filter

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4252757 and ec69e20.

📒 Files selected for processing (1)
  • circuits/tests/register/register_aadhaar.test.ts
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,jsx,ts,tsx}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g., ***-***-1234 for passport numbers, J*** D*** for names).

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Use React Navigation with createStaticNavigation for type-safe navigation in React Native applications.
Implement platform-specific handling with Platform.OS === 'ios' ? 'iOS' : 'Android' checks before platform-specific code in React Native.
Initialize native modules with initializeNativeModules() before any native operations in React Native.
Implement lazy loading for screens using React.lazy() in React Native applications.
Implement custom modal system with useModal hook and callback registry in React Native.
Integrate haptic feedback using useHapticNavigation hook in React Native navigation.
Use platform-specific initial routes: web uses 'Home', mobile uses 'Splash' in React Navigation.
Use Zustand for global state management in React Native applications.
Use custom hooks for complex state (useModal, useHapticNavigation) instead of inline logic.
Use AsyncStorage for simple data, SQLite for complex data, and Keychain for sensitive data in React Native.
Use @/ alias for src imports and @tests/ alias for test imports in TypeScript/JavaScript files.
Use conditional rendering with Platform.OS for platform-specific code in React Native.
Use Tamagui for UI components in React Native applications.
Do not log sensitive data in production, including identity verification and passport information.
Use Keychain for secure storage of sensitive data in React Native.
Implement proper cleanup of sensitive data after use.
Implement certificate validation for passport data verification.
Always use try-catch for async operations in React Native and TypeScript code.
Implement graceful degradation when native modules fail in React Native.
Provide user-friendly error messages in UI and error handlers.
Lazy load screens and components to optimize bundle size in React Native.
Prevent memory leaks in native modules in React Native.

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.test.{ts,tsx,js,jsx}: Use renderHook for testing custom React hooks instead of rendering components.
Mock console.error in tests to avoid test output clutter while testing error scenarios.
Test error boundaries and recovery mechanisms in React components.
Mock SQLite operations with executeSql method in database tests using utilities from tests/__setup__/databaseMocks.ts.

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.{tsx,jsx,ts,js}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper cleanup in useEffect and component unmount hooks in React.

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/{circuits,age,verification,zk,proof}/**/*.{circom,ts,tsx,js,py}

📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)

Implement zero-knowledge proof of age without disclosing actual date of birth

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/{circuits,country,verification,zk,proof}/**/*.{circom,ts,tsx,js,py}

📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)

Implement zero-knowledge proof of country non-inclusion without revealing actual country code

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/{circuits,proof,zk,compliance}/**/*.{circom,ts,tsx,js,py}

📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)

Bind timestamp into proof signature to prevent replay attacks

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

**/*.{ts,tsx,js}: Never log PII, credentials, or private keys in production code; use DEBUG_SECRETS_TOKEN flag for debug-level secrets
Use consistent redaction patterns for sensitive fields in logs and test data

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.{test,spec}.{ts,js,tsx,jsx}

⚙️ CodeRabbit configuration file

**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:

  • Test coverage completeness
  • Test case quality and edge cases
  • Mock usage appropriateness
  • Test readability and maintainability

Files:

  • circuits/tests/register/register_aadhaar.test.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/proving/**/*.{ts,tsx} : Migrate proof input generation from app/src/utils/proving/ to packages/mobile-sdk-alpha/src/proving/ with tests for register, disclose, and TEE input generation

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/attestation/**/*.{ts,tsx} : Migrate attestation verification from app/src/utils/ to packages/mobile-sdk-alpha/src/attestation/ with tests for PCR0 validation and certificate chain validation

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.integration.{test.ts,test.tsx,spec.ts,spec.tsx} : Test end-to-end flows covering complete user journeys through the identity verification process

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/processing/**/*.{ts,tsx} : Migrate MRZ processing helpers from app/src/utils/ to packages/mobile-sdk-alpha/src/processing/ with comprehensive tests for MRZ parsing and cross-platform compatibility

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.{test.ts,test.tsx,spec.ts,spec.tsx} : Create comprehensive test fixtures and mock data for each migrated module without exposing sensitive information

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.test.{ts,tsx} : Test `isPassportDataValid()` with realistic, synthetic passport data and never use real user PII

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.test.{ts,tsx} : Verify `extractMRZInfo()` using published sample MRZ strings (e.g., ICAO examples) rather than fake data

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.{ts,tsx,test.ts,test.tsx} : Create tests BEFORE migrating logic to verify functionality works correctly in the mobile-sdk-alpha package

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/crypto/**/*.{ts,tsx} : Migrate crypto adapters from app/src/utils/ to packages/mobile-sdk-alpha/src/crypto/ with tests for WebCrypto vs noble/* fallback and timing-safe comparisons

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/validation/**/*.{ts,tsx} : Migrate document validation logic from app/src/utils/ to packages/mobile-sdk-alpha/src/validation/ with unit tests for each validation rule and edge cases

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
⏰ 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). (11)
  • GitHub Check: build-android
  • GitHub Check: build-ios
  • GitHub Check: test
  • GitHub Check: type-check
  • GitHub Check: run_circuit_tests
  • GitHub Check: analyze-android
  • GitHub Check: analyze-ios
  • GitHub Check: iOS E2E Tests Demo App
  • GitHub Check: e2e-ios
  • GitHub Check: Android E2E Tests Demo App
  • GitHub Check: android-build-test
🔇 Additional comments (1)
circuits/tests/register/register_aadhaar.test.ts (1)

54-67: [rewritten review comment]
[classification tag]


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f3d7f6b and b68f52e.

📒 Files selected for processing (2)
  • .github/workflows/circuits.yml (1 hunks)
  • .github/workflows/contracts.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.

Applied to files:

  • .github/workflows/contracts.yml
  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.

Applied to files:

  • .github/workflows/contracts.yml
  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation

Applied to files:

  • .github/workflows/contracts.yml
  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, build all workspaces except `contracts` using `yarn build`, and compile Solidity contracts with `yarn workspace selfxyz/contracts build`.

Applied to files:

  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.

Applied to files:

  • .github/workflows/circuits.yml
⏰ 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: type-check
  • GitHub Check: run_circuit_tests
🔇 Additional comments (4)
.github/workflows/contracts.yml (2)

14-17: LGTM! Clean job definition.

The check_changes job is properly configured with outputs that will gate the downstream test job.


38-40: LGTM! Proper dependency and gating logic.

The test_contracts job correctly depends on check_changes and evaluates both the draft status and the should_run output before executing.

.github/workflows/circuits.yml (2)

9-12: LGTM! Consistent job definition.

The check_changes job follows the same pattern as the contracts workflow, providing a unified gating mechanism.


33-35: LGTM! Proper dependency and gating logic.

The run_circuit_tests job correctly depends on check_changes and evaluates both conditions before executing, maintaining consistency with the contracts workflow.

…in circuits.yml and contracts.yml. This change ensures that the full history is available for subsequent steps in the workflows.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/circuits.yml (1)

9-33: Well-implemented dynamic path filtering.

The check_changes job correctly addresses the large changeset issue by moving path filtering from trigger-level to job-level. The logic appropriately bypasses filtering for staging and main (ensuring comprehensive checks on release branches) while maintaining targeted filtering for dev.

The fetch-depth: 0 configuration and triple-dot git diff syntax are correct for comparing against the merge base.

Optional: Add pipefail for more robust error handling

To ensure git errors don't get masked by grep's exit code:

       - name: Check if should run
         id: filter
         run: |
+          set -eo pipefail
           if [[ "${{ github.base_ref }}" == "main" ]] || [[ "${{ github.base_ref }}" == "staging" ]]; then
.github/workflows/contracts.yml (1)

46-46: Consider aligning checkout action versions.

The check_changes job uses actions/checkout@v6 (line 19) while test_contracts uses actions/checkout@v4. While both versions work, aligning to v6 across both jobs would improve consistency.

🔎 Optional alignment to v6
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v6
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b68f52e and df7f7f9.

📒 Files selected for processing (2)
  • .github/workflows/circuits.yml (1 hunks)
  • .github/workflows/contracts.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.

Applied to files:

  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.

Applied to files:

  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation

Applied to files:

  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, build all workspaces except `contracts` using `yarn build`, and compile Solidity contracts with `yarn workspace selfxyz/contracts build`.

Applied to files:

  • .github/workflows/contracts.yml
⏰ 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). (3)
  • GitHub Check: type-check
  • GitHub Check: run_circuit_tests
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (2)
.github/workflows/circuits.yml (1)

36-37: Correct dependency and conditional gating.

The job dependency structure is properly configured, ensuring run_circuit_tests only executes when check_changes determines it's necessary and the PR isn't a draft. This prevents wasted CI resources while maintaining comprehensive coverage for staging and main branches.

.github/workflows/contracts.yml (1)

41-42: Correct dependency and conditional gating.

The test job correctly depends on check_changes and properly gates execution based on both the draft status and the should_run output. This implementation aligns well with the PR objectives to avoid path filter issues on large changesets.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/circuits.yml (1)

49-49: Optional: Consider updating checkout action version.

Line 49 uses actions/checkout@v4 while the check_changes job (line 14) uses @v6. For consistency, consider updating to v6 here as well, though this is low priority.

🔎 Suggested change
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v6
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6efffb6 and ffef0bb.

📒 Files selected for processing (1)
  • .github/workflows/circuits.yml (2 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before creating a PR, ensure `yarn nice` passes in affected workspaces.
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure Node.js 22.x is installed as specified in `.nvmrc`, then run `nvm use`, `corepack enable && corepack prepare yarnstable --activate`, and verify with `node -v && yarn -v`.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Use Yarn via Corepack (`corepack enable && corepack prepare yarnstable --activate`) for package management

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-07-14T09:03:08.292Z
Learnt from: aaronmgdr
Repo: selfxyz/self PR: 763
File: app/.github/workflows/test-coverage.yml:0-0
Timestamp: 2025-07-14T09:03:08.292Z
Learning: Node.js 22 is supported by actions/setup-nodev4 and has been in Active LTS since October 2024. It works on Linux, macOS, and Windows runners (Windows issues were resolved after version 22.8.0).

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Run `yarn install` once before running any other commands to install root dependencies and set up husky hooks.

Applied to files:

  • .github/workflows/circuits.yml
🪛 actionlint (1.7.9)
.github/workflows/circuits.yml

40-40: label "selfxyz-org" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


41-41: label "ubuntu-24-04" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

⏰ 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). (4)
  • GitHub Check: type-check
  • GitHub Check: test-common
  • GitHub Check: run_circuit_tests
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (3)
.github/workflows/circuits.yml (3)

9-34: LGTM! Change detection logic is sound.

The check_changes job correctly addresses the past review concern about shallow clones by setting fetch-depth: 0. The logic appropriately gates tests: always runs for main/staging PRs (safe default), and for dev branch only when circuits/ files change. The grep pattern ^circuits/ correctly anchors to paths starting with the circuits directory.


35-41: Job gating correctly implemented.

The conditional logic properly combines the draft PR check with the should_run output from the check_changes job. The self-hosted runner labels (selfxyz-org, ubuntu-24-04) triggering static analysis warnings are expected custom labels for your organization's runners—actionlint simply can't know your custom labels without additional configuration.


137-143: Node.js setup aligns with project standards.

The addition of actions/setup-node@v6 with .nvmrc and Corepack enablement correctly follows the project's dependency management approach.

… checks. Added error handling for git diff command in circuits.yml and contracts.yml to ensure robust execution and prevent workflow failures due to diff errors.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/circuits.yml (1)

2-8: Consider adding a concurrency group for consistency.

The contracts.yml workflow includes a concurrency group to cancel in-progress runs when new commits are pushed. This workflow lacks one, which could lead to resource waste on self-hosted runners if multiple workflow runs queue up.

🔎 Proposed addition
 on:
   pull_request:
     branches:
       - dev
       - staging
       - main
+
+concurrency:
+  group: circuits-ci-${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 jobs:
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ffef0bb and ab3ad25.

📒 Files selected for processing (2)
  • .github/workflows/circuits.yml (2 hunks)
  • .github/workflows/contracts.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.

Applied to files:

  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation

Applied to files:

  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure Node.js 22.x is installed as specified in `.nvmrc`, then run `nvm use`, `corepack enable && corepack prepare yarnstable --activate`, and verify with `node -v && yarn -v`.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Use Yarn via Corepack (`corepack enable && corepack prepare yarnstable --activate`) for package management

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-07-14T09:03:08.292Z
Learnt from: aaronmgdr
Repo: selfxyz/self PR: 763
File: app/.github/workflows/test-coverage.yml:0-0
Timestamp: 2025-07-14T09:03:08.292Z
Learning: Node.js 22 is supported by actions/setup-nodev4 and has been in Active LTS since October 2024. It works on Linux, macOS, and Windows runners (Windows issues were resolved after version 22.8.0).

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Run `yarn install` once before running any other commands to install root dependencies and set up husky hooks.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.

Applied to files:

  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, build all workspaces except `contracts` using `yarn build`, and compile Solidity contracts with `yarn workspace selfxyz/contracts build`.

Applied to files:

  • .github/workflows/contracts.yml
🪛 actionlint (1.7.9)
.github/workflows/circuits.yml

45-45: label "selfxyz-org" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


46-46: label "ubuntu-24-04" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

⏰ 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). (4)
  • GitHub Check: type-check
  • GitHub Check: test-common
  • GitHub Check: run_circuit_tests
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (5)
.github/workflows/contracts.yml (2)

14-43: Solid implementation of change detection gating.

The check_changes job correctly:

  • Uses fetch-depth: 0 for full git history
  • Has set -e and proper error handling for the git diff
  • Gates on main/staging branches vs path-based filtering for dev

This approach elegantly sidesteps the GitHub API limitations with large changesets.


45-83: LGTM - Job gating looks correct.

The dependency on check_changes and the combined condition for draft PRs and should_run is properly implemented.

Note: Tests remain disabled (if: false) per the comment on line 81. Ensure there's a tracking issue to re-enable them once fixed.

.github/workflows/circuits.yml (3)

9-38: Change detection gating correctly implemented.

Mirrors the contracts.yml pattern with proper error handling and branch-based logic. The path filter for circuits/ is appropriate for this workflow.


43-46: Self-hosted runner labels are valid.

The actionlint warnings about unknown labels are expected false positives—these are custom labels for your self-hosted runner pool. Consider adding an actionlint.yaml config to suppress these warnings if they become noisy in CI.


142-148: Good addition of explicit Node.js setup.

Using .nvmrc for version specification and enabling Corepack before Yarn operations follows the project's established patterns. Based on learnings, this aligns with the expected setup flow.

…tibility and performance across all CI configurations. This change replaces the previous version v4 in circuits, contracts, and other workflow files.
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/contracts.yml (1)

79-83: Tests are disabled—verify this is tracked for re-enabling.

The contracts test suite is currently disabled with if: false. While the comment indicates this is temporary ("skip until they get fixed"), having contract tests disabled poses a reliability and security risk since contract code won't be validated in CI.

Ensure there's a tracking issue to re-enable these tests. Would you like me to verify the test failures or help create a tracking issue?

🧹 Nitpick comments (1)
.github/workflows/contracts.yml (1)

52-68: Consider upgrading to actions/setup-node@v6 for consistency.

The Node.js version sanitization logic is robust and handles edge cases well. However, note that this workflow uses actions/setup-node@v4 (line 66) while:

  • The same workflow uses actions/checkout@v6 (line 51)
  • The circuits workflow uses actions/setup-node@v6 (circuits.yml line 143)

For consistency and to benefit from the latest updates, consider upgrading to @v6.

🔎 Proposed change
       - name: Set Node.js
-        uses: actions/setup-node@v4
+        uses: actions/setup-node@v6
         with:
           node-version: ${{ env.NODE_VERSION }}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ab3ad25 and 655026c.

📒 Files selected for processing (19)
  • .github/workflows/circuits-build.yml
  • .github/workflows/circuits.yml
  • .github/workflows/common-ci.yml
  • .github/workflows/contracts.yml
  • .github/workflows/core-sdk-ci.yml
  • .github/workflows/gitleaks.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-deploy.yml
  • .github/workflows/mobile-e2e.yml
  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/mobile-sdk-demo-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/qrcode-sdk-ci.yml
  • .github/workflows/release-calendar.yml
  • .github/workflows/web.yml
  • .github/workflows/workspace-ci.yml
  • app/.github/workflows/test-coverage.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/mobile-sdk-demo-e2e.yml
🧰 Additional context used
🧠 Learnings (23)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before creating a PR, ensure `yarn nice` passes in affected workspaces.
📚 Learning: 2025-07-14T09:03:08.292Z
Learnt from: aaronmgdr
Repo: selfxyz/self PR: 763
File: app/.github/workflows/test-coverage.yml:0-0
Timestamp: 2025-07-14T09:03:08.292Z
Learning: Node.js 22 is supported by actions/setup-nodev4 and has been in Active LTS since October 2024. It works on Linux, macOS, and Windows runners (Windows issues were resolved after version 22.8.0).

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • app/.github/workflows/test-coverage.yml
  • .github/workflows/circuits.yml
  • .github/workflows/qrcode-sdk-ci.yml
  • .github/workflows/mobile-e2e.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/mobile-sdk-demo-ci.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure Node.js 22.x is installed as specified in `.nvmrc`, then run `nvm use`, `corepack enable && corepack prepare yarnstable --activate`, and verify with `node -v && yarn -v`.

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • app/.github/workflows/test-coverage.yml
  • .github/workflows/circuits.yml
  • .github/workflows/qrcode-sdk-ci.yml
  • .github/workflows/mobile-e2e.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/mobile-sdk-demo-ci.yml
  • .github/workflows/web.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.

Applied to files:

  • .github/workflows/core-sdk-ci.yml
  • .github/workflows/circuits.yml
  • .github/workflows/workspace-ci.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/artifacts/**/*.{ts,tsx} : Migrate artifact management from app/src/utils/ to packages/mobile-sdk-alpha/src/artifacts/ with tests for manifest validation, CDN downloads, signature verification, and storage

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-22T23:16:26.719Z
Learnt from: transphorm
Repo: selfxyz/self PR: 1446
File: .github/workflows/mobile-bundle-analysis.yml:117-117
Timestamp: 2025-11-22T23:16:26.719Z
Learning: In the selfxyz/self repository, for mobile workflows (bundle analysis, deployment, CI/CD):
- Both iOS and Android builds now cache Ruby gems at the unified path `app/vendor/bundle`
- The previous separate paths (app/ios/vendor/bundle for iOS) have been deprecated in favor of this unified approach

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/mobile-deploy.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to app/src/**/*.{ts,tsx} : Update app to consume mobile-sdk-alpha modules after migration and validate all existing app tests pass

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/attestation/**/*.{ts,tsx} : Migrate attestation verification from app/src/utils/ to packages/mobile-sdk-alpha/src/attestation/ with tests for PCR0 validation and certificate chain validation

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/processing/**/*.{ts,tsx} : Migrate MRZ processing helpers from app/src/utils/ to packages/mobile-sdk-alpha/src/processing/ with comprehensive tests for MRZ parsing and cross-platform compatibility

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn build` to ensure the build succeeds

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/web.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Run `yarn install` once before running any other commands to install root dependencies and set up husky hooks.

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/circuits.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/web.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Use Yarn v4 for package management; execute commands using `yarn install`, `yarn add`, and `yarn remove`. Do not use npm or pnpm.

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/web.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/web.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run type-checking across the repo with `yarn types`.

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/contracts.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/web.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, build all workspaces except `contracts` using `yarn build`, and compile Solidity contracts with `yarn workspace selfxyz/contracts build`.

Applied to files:

  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/contracts.yml
  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Use Node.js 22.x for development (verify with `nvm use`)

Applied to files:

  • app/.github/workflows/test-coverage.yml
  • .github/workflows/qrcode-sdk-ci.yml
  • .github/workflows/mobile-sdk-demo-ci.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.

Applied to files:

  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Include context for AI reviewers in PR descriptions; add inline comments for complex changes explaining intent.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation

Applied to files:

  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Use Yarn via Corepack (`corepack enable && corepack prepare yarnstable --activate`) for package management

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn nice` to fix linting and formatting issues automatically

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn test` to ensure all tests pass

Applied to files:

  • .github/workflows/npm-publish.yml
🪛 actionlint (1.7.9)
.github/workflows/circuits.yml

45-45: label "selfxyz-org" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


46-46: label "ubuntu-24-04" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

⏰ 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). (12)
  • GitHub Check: test
  • GitHub Check: build-ios
  • GitHub Check: build-android
  • GitHub Check: type-check
  • GitHub Check: run_circuit_tests
  • GitHub Check: Cursor Bugbot
  • GitHub Check: e2e-ios
  • GitHub Check: analyze-ios
  • GitHub Check: android-build-test
  • GitHub Check: Android E2E Tests Demo App
  • GitHub Check: iOS E2E Tests Demo App
  • GitHub Check: analyze-android
🔇 Additional comments (22)
.github/workflows/mobile-deploy.yml (1)

171-171: LGTM - Checkout upgrade is consistent.

The upgrade to actions/checkout@v6 in the bump-version job aligns with the repository-wide checkout action modernization. All five checkout instances in this workflow have been consistently upgraded.

app/.github/workflows/test-coverage.yml (1)

20-20: LGTM - Clean checkout upgrade.

The upgrade to actions/checkout@v6 is straightforward with no other workflow changes.

.github/workflows/mobile-bundle-analysis.yml (1)

23-23: LGTM - Consistent checkout upgrades across jobs.

Both the analyze-android and analyze-ios jobs have been upgraded to actions/checkout@v6 consistently.

.github/workflows/mobile-sdk-demo-ci.yml (1)

15-15: LGTM - Simple checkout upgrade.

The upgrade to actions/checkout@v6 is the only change in this workflow.

.github/workflows/common-ci.yml (1)

11-11: LGTM - Complete checkout modernization.

All four jobs (build, lint, type-check, test-common) have been consistently upgraded to actions/checkout@v6.

.github/workflows/gitleaks.yml (1)

10-12: LGTM - Checkout upgrade preserves required configuration.

The upgrade to actions/checkout@v6 correctly maintains fetch-depth: 0, which is essential for Gitleaks to scan the complete Git history.

.github/workflows/mobile-e2e.yml (1)

40-40: LGTM - Consistent E2E workflow upgrades.

Both the android-build-test and e2e-ios jobs have been upgraded to actions/checkout@v6 consistently.

.github/workflows/circuits-build.yml (1)

45-45: No issues identified with actions/checkout@v6 upgrade.

actions/checkout v6.0.1 is stable and is the latest release. The upgrade involves a security improvement where credentials are stored in a separate file under $RUNNER_TEMP instead of directly in .git/config, with no workflow changes required. The only consideration is for Docker container scenarios, which require a minimum Actions Runner version of v2.329.0—not applicable for standard GitHub-hosted runners.

.github/workflows/mobile-ci.yml (1)

41-41: LGTM - Mobile CI workflow upgraded consistently.

All jobs (build-deps, test, build-ios, build-android) now use actions/checkout@v6.

Also applies to: 99-99, 214-214, 410-410

.github/workflows/npm-publish.yml (1)

31-31: LGTM - Other jobs upgraded correctly.

The checkout action upgrade in detect-changes, publish-core, publish-qrcode, publish-qrcode-angular, and publish-msdk jobs is correct.

Also applies to: 75-75, 103-103, 183-183, 211-211

.github/workflows/mobile-sdk-ci.yml (1)

15-15: LGTM - Mobile SDK CI workflow upgraded consistently.

All jobs (build, lint, format, types, test) now use actions/checkout@v6.

Also applies to: 38-38, 59-59, 80-80, 101-101

.github/workflows/qrcode-sdk-ci.yml (1)

28-28: LGTM - QRCode SDK CI workflow upgraded consistently.

All jobs now use actions/checkout@v6 with no issues.

Also applies to: 88-88, 156-156, 218-218

.github/workflows/web.yml (1)

19-19: LGTM - Web CI workflow upgraded.

The checkout action has been upgraded to v6.

.github/workflows/core-sdk-ci.yml (1)

17-17: LGTM - Core SDK CI workflow upgraded consistently.

All jobs (build, lint, types, test) now use actions/checkout@v6.

Also applies to: 41-41, 70-70, 99-99

.github/workflows/workspace-ci.yml (1)

21-21: LGTM - Workspace CI workflow upgraded consistently.

All jobs (including disabled and commented ones) now use actions/checkout@v6.

Also applies to: 50-50, 79-79, 109-109, 150-150, 179-179

.github/workflows/release-calendar.yml (1)

80-80: Review the runner version compatibility for v6.

The upgrade to v6 improves credential security with persist-credentials now storing credentials in a separate file under $RUNNER_TEMP, and requires a minimum Actions Runner version of v2.327.1. Ensure your CI environment runs this minimum runner version or later. Verify that fetch-depth: 0 is explicitly set in both checkout steps if full git history is required for the release workflow.

.github/workflows/circuits.yml (4)

9-38: LGTM! Well-structured change detection gate.

The check_changes job correctly implements runtime path filtering by:

  • Always running for main/staging branches
  • Checking file changes for dev branch
  • Using fetch-depth: 0 to ensure base branch is available
  • Including proper error handling with set -e and explicit failure on git diff errors

The pattern of outputting should_run and gating downstream jobs is a solid approach to avoid GitHub's paths filter limitations on pull_request triggers.


40-42: LGTM! Proper gating implementation.

The job correctly gates on both draft status and the should_run output from check_changes. The use of needs ensures the dependency chain is respected.


43-46: Self-hosted runner labels are correctly configured.

The static analysis warning about unknown labels can be ignored—these are custom self-hosted runner labels (selfxyz-org, ubuntu-24-04) specific to your organization's runner infrastructure.


142-148: LGTM! Node.js setup follows best practices.

The setup correctly:

  • Reads Node version from .nvmrc (maintaining consistency)
  • Uses actions/setup-node@v6 (aligned with checkout@v6)
  • Enables Corepack for Yarn management (per project conventions)

Based on learnings, this setup is consistent with the project's package management approach.

.github/workflows/contracts.yml (2)

14-43: LGTM! Change detection includes relevant dependencies.

The check_changes job correctly:

  • Checks both contracts/ and common/ directories (appropriate since contracts depend on common)
  • Uses the same robust pattern as circuits.yml
  • Includes proper error handling and fetch configuration

46-47: LGTM! Consistent gating pattern.

The dependency and conditional logic matches the circuits workflow, ensuring consistent behavior across both workflows.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/npm-publish.yml (1)

157-163: CRITICAL: Remove duplicate checkout action.

The publish-contracts job has two consecutive actions/checkout@v6 steps at lines 157 and 163. The second checkout is redundant and should be removed to avoid unnecessary repository cloning.

🔎 Proposed fix
       - uses: actions/checkout@v6
       - name: Set up Node.js
         uses: actions/setup-node@v4
         with:
           node-version-file: .nvmrc
           registry-url: "https://registry.npmjs.org"
-      - uses: actions/checkout@v6
       - name: Install Dependencies
         uses: ./.github/actions/yarn-install
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 655026c and 5bb9efa.

📒 Files selected for processing (1)
  • .github/workflows/npm-publish.yml
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before creating a PR, ensure `yarn nice` passes in affected workspaces.
📚 Learning: 2025-07-14T09:03:08.292Z
Learnt from: aaronmgdr
Repo: selfxyz/self PR: 763
File: app/.github/workflows/test-coverage.yml:0-0
Timestamp: 2025-07-14T09:03:08.292Z
Learning: Node.js 22 is supported by actions/setup-nodev4 and has been in Active LTS since October 2024. It works on Linux, macOS, and Windows runners (Windows issues were resolved after version 22.8.0).

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure Node.js 22.x is installed as specified in `.nvmrc`, then run `nvm use`, `corepack enable && corepack prepare yarnstable --activate`, and verify with `node -v && yarn -v`.

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn build` to ensure the build succeeds

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run type-checking across the repo with `yarn types`.

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn nice` to fix linting and formatting issues automatically

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Run `yarn install` once before running any other commands to install root dependencies and set up husky hooks.

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn test` to ensure all tests pass

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, build all workspaces except `contracts` using `yarn build`, and compile Solidity contracts with `yarn workspace selfxyz/contracts build`.

Applied to files:

  • .github/workflows/npm-publish.yml
⏰ 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). (13)
  • GitHub Check: test
  • GitHub Check: build-ios
  • GitHub Check: build-android
  • GitHub Check: test-common
  • GitHub Check: type-check
  • GitHub Check: run_circuit_tests
  • GitHub Check: Cursor Bugbot
  • GitHub Check: android-build-test
  • GitHub Check: iOS E2E Tests Demo App
  • GitHub Check: Android E2E Tests Demo App
  • GitHub Check: e2e-ios
  • GitHub Check: analyze-ios
  • GitHub Check: analyze-android

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/npm-publish.yml (1)

66-68: CRITICAL: Wrong path breaks msdk version detection.

Line 66 checks sdk/mobile-sdk-alpha/package.json but the correct path is packages/mobile-sdk-alpha/package.json (as used in the trigger at line 11, detection at line 43, and working-directory at line 225). This prevents the msdk package from being published when its version changes, unless manually dispatched.

🔎 Proposed fix
-      if git diff HEAD^ HEAD -- sdk/mobile-sdk-alpha/package.json | grep -q '"version":' || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
+      if git diff HEAD^ HEAD -- packages/mobile-sdk-alpha/package.json | grep -q '"version":' || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
         echo "msdk_changed=true" >> $GITHUB_OUTPUT
       fi
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5bb9efa and db10e24.

📒 Files selected for processing (1)
  • .github/workflows/npm-publish.yml
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Applies to app/**/*.{test,spec}.{ts,tsx,js,jsx} : Ensure `yarn test` passes (unit tests) before creating a PR
📚 Learning: 2025-07-14T09:03:08.292Z
Learnt from: aaronmgdr
Repo: selfxyz/self PR: 763
File: app/.github/workflows/test-coverage.yml:0-0
Timestamp: 2025-07-14T09:03:08.292Z
Learning: Node.js 22 is supported by actions/setup-nodev4 and has been in Active LTS since October 2024. It works on Linux, macOS, and Windows runners (Windows issues were resolved after version 22.8.0).

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure Node.js 22.x is installed as specified in `.nvmrc`, then run `nvm use`, `corepack enable && corepack prepare yarnstable --activate`, and verify with `node -v && yarn -v`.

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn build` to ensure the build succeeds

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run type-checking across the repo with `yarn types`.

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn nice` to fix linting and formatting issues automatically

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Run `yarn install` once before running any other commands to install root dependencies and set up husky hooks.

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn test` to ensure all tests pass

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, build all workspaces except `contracts` using `yarn build`, and compile Solidity contracts with `yarn workspace selfxyz/contracts build`.

Applied to files:

  • .github/workflows/npm-publish.yml
⏰ 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). (12)
  • GitHub Check: build-android
  • GitHub Check: test
  • GitHub Check: build-ios
  • GitHub Check: type-check
  • GitHub Check: run_circuit_tests
  • GitHub Check: Cursor Bugbot
  • GitHub Check: android-build-test
  • GitHub Check: e2e-ios
  • GitHub Check: iOS E2E Tests Demo App
  • GitHub Check: Android E2E Tests Demo App
  • GitHub Check: analyze-ios
  • GitHub Check: analyze-android
🔇 Additional comments (1)
.github/workflows/npm-publish.yml (1)

31-31: LGTM: Checkout action upgraded to v6.

The upgrade to actions/checkout@v6 is correct and consistent across all jobs. The previously flagged duplicate checkout steps have been removed.

Also applies to: 75-75, 103-103, 131-131, 157-157, 181-181, 209-209

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/circuits.yml (1)

44-47: Consider removing or documenting the commented-out runner configuration.

The commented self-hosted runner labels appear to be experimental remnants. If this is intentional for future use, consider adding a brief comment explaining the purpose. Otherwise, remove to reduce noise.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd60376 and f76cc80.

📒 Files selected for processing (1)
  • .github/workflows/circuits.yml
🧰 Additional context used
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before creating a PR, ensure `yarn nice` passes in affected workspaces.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Include context for AI reviewers in PR descriptions; add inline comments for complex changes explaining intent.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure Node.js 22.x is installed as specified in `.nvmrc`, then run `nvm use`, `corepack enable && corepack prepare yarnstable --activate`, and verify with `node -v && yarn -v`.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Use Yarn via Corepack (`corepack enable && corepack prepare yarnstable --activate`) for package management

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-07-14T09:03:08.292Z
Learnt from: aaronmgdr
Repo: selfxyz/self PR: 763
File: app/.github/workflows/test-coverage.yml:0-0
Timestamp: 2025-07-14T09:03:08.292Z
Learning: Node.js 22 is supported by actions/setup-nodev4 and has been in Active LTS since October 2024. It works on Linux, macOS, and Windows runners (Windows issues were resolved after version 22.8.0).

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Run `yarn install` once before running any other commands to install root dependencies and set up husky hooks.

Applied to files:

  • .github/workflows/circuits.yml
⏰ 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). (12)
  • GitHub Check: build-android
  • GitHub Check: test
  • GitHub Check: build-ios
  • GitHub Check: type-check
  • GitHub Check: run_circuit_tests
  • GitHub Check: Cursor Bugbot
  • GitHub Check: android-build-test
  • GitHub Check: e2e-ios
  • GitHub Check: iOS E2E Tests Demo App
  • GitHub Check: Android E2E Tests Demo App
  • GitHub Check: analyze-ios
  • GitHub Check: analyze-android
🔇 Additional comments (2)
.github/workflows/circuits.yml (2)

9-16: LGTM on the check_changes job setup.

The fetch-depth: 0 correctly ensures the base branch is available for the git diff comparison. Output declaration is properly configured for downstream job gating.


18-38: Solid gating logic with proper error handling.

The branching strategy is sound:

  • Main/staging PRs always run checks (aligns with PR objectives).
  • Dev PRs are gated by actual file changes in circuits/.
  • The set -e and explicit error handling on git diff prevents silent failures.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (3)
packages/mobile-sdk-alpha/scripts/setup-native-source.cjs (1)

157-176: Fragile regex pattern in the fallback path.

The regex on line 163 assumes a specific ordering (path before url) in .gitmodules. Git doesn't guarantee this order, and some tools may generate different layouts. If the primary git submodule set-url succeeds (Git 2.25+), this fallback is never used—but for older Git versions, it may silently fail to update.

Consider using git config to update the URL reliably:

🔎 Proposed fix using git config
       } catch (error) {
         log(`git submodule set-url failed: ${error.message}`, 'warning');
-        // Fallback: Update .gitmodules file directly
+        // Fallback: Use git config to update .gitmodules
         try {
-          let gitmodulesContent = fs.readFileSync(gitmodulesPath, 'utf8');
-          log(`Current .gitmodules content:\n${gitmodulesContent}`, 'info');
-          // Replace the URL for mobile-sdk-native submodule
-          const oldContent = gitmodulesContent;
-          gitmodulesContent = gitmodulesContent.replace(
-            /(\[submodule\s+"packages\/mobile-sdk-alpha\/mobile-sdk-native"\]\s+path\s*=\s*packages\/mobile-sdk-alpha\/mobile-sdk-native\s+url\s*=\s*)[^\s]+/,
-            `$1${submoduleUrl}`,
-          );
-          if (oldContent !== gitmodulesContent) {
-            fs.writeFileSync(gitmodulesPath, gitmodulesContent, 'utf8');
-            log('Updated .gitmodules with new submodule URL', 'success');
-            log(`New .gitmodules content:\n${gitmodulesContent}`, 'info');
-          } else {
-            log('No changes made to .gitmodules - regex may not match', 'warning');
-          }
+          runCommand(
+            `git config -f .gitmodules submodule."packages/mobile-sdk-alpha/mobile-sdk-native".url "${submoduleUrl}"`,
+            { stdio: 'pipe' },
+            REPO_ROOT,
+          );
+          runCommand(`git submodule sync packages/mobile-sdk-alpha/mobile-sdk-native`, { stdio: 'pipe' }, REPO_ROOT);
+          log('Updated .gitmodules with new submodule URL via git config', 'success');
         } catch (fallbackError) {
           log(`Could not update .gitmodules: ${fallbackError.message}`, 'error');
         }
.github/workflows/mobile-e2e.yml (1)

287-301: Verify environment variable conditional syntax.

The conditional Java installation uses if: env.INSTALL_JAVA == 'true' at line 297. In GitHub Actions, environment variable checks in if conditions should typically be wrapped in expressions: if: ${{ env.INSTALL_JAVA == 'true' }} or use string comparison correctly.

Test that the Java installation is properly skipped when Java is already present on the self-hosted runner, and that it installs correctly when missing.

🔎 Recommended syntax adjustment
-      - name: Setup Java environment
-        if: env.INSTALL_JAVA == 'true'
-        uses: actions/setup-java@v4
+      - name: Setup Java environment
+        if: ${{ env.INSTALL_JAVA == 'true' }}
+        uses: actions/setup-java@v4

Alternatively, consider using the conditional directly without the intermediate env var:

-      - name: Check Java installation
-        run: |
-          echo "INSTALL_JAVA=false" >> "$GITHUB_ENV"
-          if command -v java &> /dev/null && java -version &> /dev/null; then
-            echo "Java already installed: $(java -version 2>&1 | head -n 1)"
-          else
-            echo "Java not found or not working, will install..."
-            echo "INSTALL_JAVA=true" >> "$GITHUB_ENV"
-          fi
       - name: Setup Java environment
-        if: env.INSTALL_JAVA == 'true'
+        if: ${{ !hashFiles('**/java') }}
         uses: actions/setup-java@v4

Though the first option preserves your explicit check logic.

.github/workflows/mobile-sdk-demo-e2e.yml (1)

261-275: Consider applying the same Java installation optimization to Android job.

The iOS job uses a conditional check to avoid redundant Java installations, which is more efficient than the Android job's unconditional installation (lines 130-134). Applying this same pattern to the Android job would improve consistency and potentially reduce setup time.

🔎 Apply to Android job

Add before line 130 in the Android job:

- name: Check Java installation
  run: |
    echo "INSTALL_JAVA=false" >> "$GITHUB_ENV"
    if command -v java &> /dev/null && java -version &> /dev/null; then
      echo "Java already installed: $(java -version 2>&1 | head -n 1)"
    else
      echo "Java not found or not working, will install..."
      echo "INSTALL_JAVA=true" >> "$GITHUB_ENV"
    fi
- name: Setup Java environment
  if: env.INSTALL_JAVA == 'true'
  uses: actions/setup-java@v4
  with:
    distribution: "temurin"
    java-version: ${{ env.JAVA_VERSION }}

And remove the unconditional Java setup at lines 130-134.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f76cc80 and 362d355.

📒 Files selected for processing (30)
  • .github/actionlint.yaml
  • .github/workflows/circuits-build.yml
  • .github/workflows/circuits.yml
  • .github/workflows/common-ci.yml
  • .github/workflows/contracts.yml
  • .github/workflows/core-sdk-ci.yml
  • .github/workflows/gitleaks.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-deploy.yml
  • .github/workflows/mobile-e2e.yml
  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/mobile-sdk-demo-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/qrcode-sdk-ci.yml
  • .github/workflows/release-calendar.yml
  • .github/workflows/web.yml
  • .github/workflows/workspace-ci.yml
  • README.md
  • app/.github/workflows/test-coverage.yml
  • app/fastlane/DEV.md
  • app/package.json
  • app/src/screens/dev/DevSettingsScreen.tsx
  • app/src/services/logging/index.ts
  • app/src/stores/settingStore.ts
  • app/tests/src/services/logging.test.ts
  • app/version.json
  • packages/mobile-sdk-alpha/scripts/build-android.sh
  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
✅ Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (9)
  • .github/workflows/mobile-sdk-demo-ci.yml
  • .github/workflows/release-calendar.yml
  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/common-ci.yml
  • .github/workflows/core-sdk-ci.yml
  • .github/workflows/circuits-build.yml
  • app/.github/workflows/test-coverage.yml
  • .github/workflows/qrcode-sdk-ci.yml
  • .github/workflows/web.yml
🧰 Additional context used
📓 Path-based instructions (17)
app/**/*.{ts,tsx,js,jsx,json,yml,yaml}

📄 CodeRabbit inference engine (app/AGENTS.md)

Ensure yarn nice passes (fixes linting and formatting) before creating a PR

Files:

  • app/version.json
  • app/tests/src/services/logging.test.ts
  • app/src/stores/settingStore.ts
  • app/package.json
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,jsx,ts,tsx}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g., ***-***-1234 for passport numbers, J*** D*** for names).

Files:

  • app/tests/src/services/logging.test.ts
  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Use React Navigation with createStaticNavigation for type-safe navigation in React Native applications.
Implement platform-specific handling with Platform.OS === 'ios' ? 'iOS' : 'Android' checks before platform-specific code in React Native.
Initialize native modules with initializeNativeModules() before any native operations in React Native.
Implement lazy loading for screens using React.lazy() in React Native applications.
Implement custom modal system with useModal hook and callback registry in React Native.
Integrate haptic feedback using useHapticNavigation hook in React Native navigation.
Use platform-specific initial routes: web uses 'Home', mobile uses 'Splash' in React Navigation.
Use Zustand for global state management in React Native applications.
Use custom hooks for complex state (useModal, useHapticNavigation) instead of inline logic.
Use AsyncStorage for simple data, SQLite for complex data, and Keychain for sensitive data in React Native.
Use @/ alias for src imports and @tests/ alias for test imports in TypeScript/JavaScript files.
Use conditional rendering with Platform.OS for platform-specific code in React Native.
Use Tamagui for UI components in React Native applications.
Do not log sensitive data in production, including identity verification and passport information.
Use Keychain for secure storage of sensitive data in React Native.
Implement proper cleanup of sensitive data after use.
Implement certificate validation for passport data verification.
Always use try-catch for async operations in React Native and TypeScript code.
Implement graceful degradation when native modules fail in React Native.
Provide user-friendly error messages in UI and error handlers.
Lazy load screens and components to optimize bundle size in React Native.
Prevent memory leaks in native modules in React Native.

Files:

  • app/tests/src/services/logging.test.ts
  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.test.{ts,tsx,js,jsx}: Use renderHook for testing custom React hooks instead of rendering components.
Mock console.error in tests to avoid test output clutter while testing error scenarios.
Test error boundaries and recovery mechanisms in React components.
Mock SQLite operations with executeSql method in database tests using utilities from tests/__setup__/databaseMocks.ts.

Files:

  • app/tests/src/services/logging.test.ts
**/*.{tsx,jsx,ts,js}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper cleanup in useEffect and component unmount hooks in React.

Files:

  • app/tests/src/services/logging.test.ts
  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
**/{mobile,client,app,time,verification}/**/*.{ts,tsx,js,swift,kt}

📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)

Use server-signed time tokens or chain block timestamps for trusted time in mobile clients, do not trust device wall-clock alone

Files:

  • app/tests/src/services/logging.test.ts
  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
**/{mobile,client,app,proof,zk}/**/*.{ts,tsx,js,swift,kt}

📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)

**/{mobile,client,app,proof,zk}/**/*.{ts,tsx,js,swift,kt}: Include trusted time anchor in proof generation and verify time anchor authenticity before proof generation in mobile implementations
Achieve proof generation in <60 seconds on mid-tier mobile devices

Files:

  • app/tests/src/services/logging.test.ts
  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
app/**/*.{test.js,test.ts,test.tsx,spec.js,spec.ts,spec.tsx}

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Use Jest for testing in the app directory with React Native preset configured in jest.config.cjs

Files:

  • app/tests/src/services/logging.test.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

**/*.{ts,tsx,js}: Never log PII, credentials, or private keys in production code; use DEBUG_SECRETS_TOKEN flag for debug-level secrets
Use consistent redaction patterns for sensitive fields in logs and test data

Files:

  • app/tests/src/services/logging.test.ts
  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Ensure yarn types passes (TypeScript validation) before creating a PR

Files:

  • app/tests/src/services/logging.test.ts
  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
app/**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (app/AGENTS.md)

Ensure yarn test passes (unit tests) before creating a PR

Files:

  • app/tests/src/services/logging.test.ts
app/**/*.{ts,tsx,js,jsx,swift,kt,java}

📄 CodeRabbit inference engine (app/AGENTS.md)

app/**/*.{ts,tsx,js,jsx,swift,kt,java}: Flag security-sensitive operations and note performance implications in code comments
Ensure no sensitive data (PII, credentials, tokens) is present in logs

Files:

  • app/tests/src/services/logging.test.ts
  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
**/*.{test,spec}.{ts,js,tsx,jsx}

⚙️ CodeRabbit configuration file

**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:

  • Test coverage completeness
  • Test case quality and edge cases
  • Mock usage appropriateness
  • Test readability and maintainability

Files:

  • app/tests/src/services/logging.test.ts
app/src/**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Use module mapping @/src/ and @tests/tests/src/ in app Jest configuration

Files:

  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
app/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Update app to consume mobile-sdk-alpha modules after migration and validate all existing app tests pass

Files:

  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
app/src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:

  • Component architecture and reusability
  • State management patterns
  • Performance optimizations
  • TypeScript type safety
  • React hooks usage and dependencies
  • Navigation patterns

Files:

  • app/src/stores/settingStore.ts
  • app/src/services/logging/index.ts
  • app/src/screens/dev/DevSettingsScreen.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursorrules)

Implement comprehensive error boundaries in React components.

Files:

  • app/src/screens/dev/DevSettingsScreen.tsx
🧠 Learnings (49)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before creating a PR, ensure `yarn nice` passes in affected workspaces.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Applies to app/{ios,android}/** : Document complex native module changes and explain platform-specific code paths

Applied to files:

  • app/version.json
  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • packages/mobile-sdk-alpha/scripts/build-android.sh
  • .github/workflows/mobile-bundle-analysis.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export all new migrated modules via packages/mobile-sdk-alpha/src/index.ts and document them in packages/mobile-sdk-alpha/README.md

Applied to files:

  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • .github/workflows/npm-publish.yml
  • packages/mobile-sdk-alpha/scripts/build-android.sh
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/artifacts/**/*.{ts,tsx} : Migrate artifact management from app/src/utils/ to packages/mobile-sdk-alpha/src/artifacts/ with tests for manifest validation, CDN downloads, signature verification, and storage

Applied to files:

  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • .github/workflows/npm-publish.yml
  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • packages/mobile-sdk-alpha/scripts/build-android.sh
  • .github/workflows/mobile-e2e.yml
  • .github/workflows/mobile-deploy.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.{test.ts,test.tsx,spec.ts,spec.tsx} : Mock native dependencies appropriately in tests when testing platform-specific code

Applied to files:

  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • app/tests/src/services/logging.test.ts
  • .github/workflows/mobile-ci.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Ensure exports are properly configured before publishing the package

Applied to files:

  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • .github/workflows/npm-publish.yml
  • app/package.json
  • packages/mobile-sdk-alpha/scripts/build-android.sh
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/protocol/**/*.{ts,tsx} : Migrate protocol synchronization from app/src/utils/ to packages/mobile-sdk-alpha/src/protocol/ with tests for tree fetching, TTL caching, rate limiting, and memory bounds

Applied to files:

  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • .github/workflows/npm-publish.yml
  • packages/mobile-sdk-alpha/scripts/build-android.sh
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to app/src/**/*.{ts,tsx} : Update app to consume mobile-sdk-alpha modules after migration and validate all existing app tests pass

Applied to files:

  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • .github/workflows/npm-publish.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • packages/mobile-sdk-alpha/scripts/build-android.sh
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.{test.ts,test.tsx,spec.ts,spec.tsx} : Suppress console noise in mobile-sdk-alpha tests using setup in tests/setup.ts

Applied to files:

  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • app/tests/src/services/logging.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.{test.ts,test.tsx,spec.ts,spec.tsx} : Create comprehensive test fixtures and mock data for each migrated module without exposing sensitive information

Applied to files:

  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • app/tests/src/services/logging.test.ts
📚 Learning: 2025-11-25T14:06:55.970Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T14:06:55.970Z
Learning: Applies to jest.setup.js : Implement comprehensive mocks in `jest.setup.js` for all native modules including Firebase, Keychain, NFC, Analytics, and third-party modules.

Applied to files:

  • packages/mobile-sdk-alpha/scripts/setup-native-source.cjs
  • app/tests/src/services/logging.test.ts
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Verify package conditions are valid before publishing

Applied to files:

  • .github/workflows/npm-publish.yml
  • app/package.json
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/**/*.{ts,tsx} : Ensure all exports in migrated modules support tree shaking for optimal bundle size

Applied to files:

  • .github/workflows/npm-publish.yml
  • packages/mobile-sdk-alpha/scripts/build-android.sh
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/attestation/**/*.{ts,tsx} : Migrate attestation verification from app/src/utils/ to packages/mobile-sdk-alpha/src/attestation/ with tests for PCR0 validation and certificate chain validation

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/processing/**/*.{ts,tsx} : Migrate MRZ processing helpers from app/src/utils/ to packages/mobile-sdk-alpha/src/processing/ with comprehensive tests for MRZ parsing and cross-platform compatibility

Applied to files:

  • .github/workflows/npm-publish.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{js,ts,tsx,json,md,yml,yaml} : Use Prettier for code formatting with root Prettier and EditorConfig settings

Applied to files:

  • .github/workflows/npm-publish.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-07-14T09:03:08.292Z
Learnt from: aaronmgdr
Repo: selfxyz/self PR: 763
File: app/.github/workflows/test-coverage.yml:0-0
Timestamp: 2025-07-14T09:03:08.292Z
Learning: Node.js 22 is supported by actions/setup-nodev4 and has been in Active LTS since October 2024. It works on Linux, macOS, and Windows runners (Windows issues were resolved after version 22.8.0).

Applied to files:

  • .github/workflows/npm-publish.yml
  • .github/workflows/circuits.yml
  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure Node.js 22.x is installed as specified in `.nvmrc`, then run `nvm use`, `corepack enable && corepack prepare yarnstable --activate`, and verify with `node -v && yarn -v`.

Applied to files:

  • .github/workflows/npm-publish.yml
  • .github/workflows/circuits.yml
  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.

Applied to files:

  • .github/workflows/npm-publish.yml
  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn build` to ensure the build succeeds

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run type-checking across the repo with `yarn types`.

Applied to files:

  • .github/workflows/npm-publish.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn nice` to fix linting and formatting issues automatically

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Run `yarn install` once before running any other commands to install root dependencies and set up husky hooks.

Applied to files:

  • .github/workflows/npm-publish.yml
  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn test` to ensure all tests pass

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, build all workspaces except `contracts` using `yarn build`, and compile Solidity contracts with `yarn workspace selfxyz/contracts build`.

Applied to files:

  • .github/workflows/npm-publish.yml
  • .github/workflows/contracts.yml
  • .github/workflows/mobile-ci.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.

Applied to files:

  • .github/workflows/workspace-ci.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.

Applied to files:

  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation

Applied to files:

  • .github/workflows/circuits.yml
  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Use Yarn via Corepack (`corepack enable && corepack prepare yarnstable --activate`) for package management

Applied to files:

  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:06:55.970Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T14:06:55.970Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Mock console.error in tests to avoid test output clutter while testing error scenarios.

Applied to files:

  • app/tests/src/services/logging.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.{ts,tsx,test.ts,test.tsx} : Create tests BEFORE migrating logic to verify functionality works correctly in the mobile-sdk-alpha package

Applied to files:

  • app/tests/src/services/logging.test.ts
  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • packages/mobile-sdk-alpha/scripts/build-android.sh
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:06:55.970Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T14:06:55.970Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use AsyncStorage for simple data, SQLite for complex data, and Keychain for sensitive data in React Native.

Applied to files:

  • app/src/stores/settingStore.ts
📚 Learning: 2025-11-25T14:06:55.970Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T14:06:55.970Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use Keychain for secure storage of sensitive data in React Native.

Applied to files:

  • app/src/stores/settingStore.ts
📚 Learning: 2025-11-25T14:06:55.970Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T14:06:55.970Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use Zustand for global state management in React Native applications.

Applied to files:

  • app/src/stores/settingStore.ts
📚 Learning: 2025-11-22T23:16:26.719Z
Learnt from: transphorm
Repo: selfxyz/self PR: 1446
File: .github/workflows/mobile-bundle-analysis.yml:117-117
Timestamp: 2025-11-22T23:16:26.719Z
Learning: In the selfxyz/self repository, for mobile workflows (bundle analysis, deployment, CI/CD):
- Both iOS and Android builds now cache Ruby gems at the unified path `app/vendor/bundle`
- The previous separate paths (app/ios/vendor/bundle for iOS) have been deprecated in favor of this unified approach

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • app/fastlane/DEV.md
  • .github/workflows/mobile-e2e.yml
  • .github/workflows/mobile-deploy.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Applies to app/ios/** : iOS build must succeed via `yarn ios` command in target environments

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • app/fastlane/DEV.md
  • .github/workflows/mobile-deploy.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Run `yarn test:build` command to validate tests, build dependencies, types, and bundle analysis in both app and mobile-sdk-alpha directories

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • packages/mobile-sdk-alpha/scripts/build-android.sh
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/**/*.{ts,tsx} : Test platform-specific code paths for React Native (iOS and Android) and web implementations

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.integration.{test.ts,test.tsx,spec.ts,spec.tsx} : Test end-to-end flows covering complete user journeys through the identity verification process

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Applies to app/**/*.{test,spec}.{ts,tsx,js,jsx} : Ensure `yarn test` passes (unit tests) before creating a PR

Applied to files:

  • .github/workflows/mobile-ci.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.{test.ts,test.tsx,spec.ts,spec.tsx} : Use Vitest for testing in the mobile-sdk-alpha package with Node environment configured in vitest.config.ts

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Applies to app/android/** : Android build must succeed via `yarn android` command in target environments

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Applies to app/web/** : Web build must succeed via `yarn web` command in target environments

Applied to files:

  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-bundle-analysis.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/demo/**/*.{ts,tsx,js,jsx} : Create an in-SDK lightweight demo in packages/mobile-sdk-alpha/demo/ using embedded React Native with MRZ flow and theming hooks integration

Applied to files:

  • .github/workflows/mobile-sdk-demo-e2e.yml
  • packages/mobile-sdk-alpha/scripts/build-android.sh
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/samples/**/*.{ts,tsx,js,jsx} : Create sample React Native and web applications in packages/mobile-sdk-alpha/samples/ demonstrating MRZ parsing, proof flow, and iOS URL scheme integration

Applied to files:

  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/mobile-e2e.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/**/*.{ts,tsx} : Use async/await patterns for non-blocking operations throughout SDK modules

Applied to files:

  • packages/mobile-sdk-alpha/scripts/build-android.sh
📚 Learning: 2025-11-25T14:06:55.970Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T14:06:55.970Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use custom hooks for complex state (`useModal`, `useHapticNavigation`) instead of inline logic.

Applied to files:

  • app/src/screens/dev/DevSettingsScreen.tsx
📚 Learning: 2025-11-25T14:06:55.970Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T14:06:55.970Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Integrate haptic feedback using `useHapticNavigation` hook in React Native navigation.

Applied to files:

  • app/src/screens/dev/DevSettingsScreen.tsx
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before creating a PR, ensure `yarn types` passes across the repo.

Applied to files:

  • .github/workflows/mobile-e2e.yml
🧬 Code graph analysis (3)
packages/mobile-sdk-alpha/scripts/setup-native-source.cjs (2)
app/scripts/setup-private-modules.cjs (6)
  • path (7-7)
  • defaultOptions (82-87)
  • isDryRun (35-35)
  • appToken (34-34)
  • repoToken (33-33)
  • BRANCH (15-15)
app/scripts/mobile-ci-build-android.sh (1)
  • log (20-26)
app/tests/src/services/logging.test.ts (1)
app/src/stores/settingStore.ts (1)
  • useSettingStore (54-156)
app/src/services/logging/index.ts (1)
app/src/stores/settingStore.ts (1)
  • useSettingStore (54-156)
🪛 actionlint (1.7.9)
.github/workflows/circuits.yml

20-20: shellcheck reported issue in this script: SC2086:info:12:31: Double quote to prevent globbing and word splitting

(shellcheck)


20-20: shellcheck reported issue in this script: SC2086:info:15:32: Double quote to prevent globbing and word splitting

(shellcheck)


20-20: shellcheck reported issue in this script: SC2086:info:3:29: Double quote to prevent globbing and word splitting

(shellcheck)


45-45: label "selfxyz-org" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


46-46: label "ubuntu-24-04" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

.github/workflows/contracts.yml

25-25: shellcheck reported issue in this script: SC2086:info:12:31: Double quote to prevent globbing and word splitting

(shellcheck)


25-25: shellcheck reported issue in this script: SC2086:info:15:32: Double quote to prevent globbing and word splitting

(shellcheck)


25-25: shellcheck reported issue in this script: SC2086:info:3:29: Double quote to prevent globbing and word splitting

(shellcheck)

.github/workflows/mobile-ci.yml

209-209: label "namespace-profile-apple-silicon-6cpu" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

.github/workflows/mobile-sdk-demo-e2e.yml

216-216: label "namespace-profile-apple-silicon-6cpu" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

.github/workflows/mobile-bundle-analysis.yml

102-102: label "namespace-profile-apple-silicon-6cpu" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

.github/workflows/mobile-e2e.yml

243-243: label "namespace-profile-apple-silicon-6cpu" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

.github/workflows/mobile-deploy.yml

269-269: label "namespace-profile-apple-silicon-6cpu" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

⏰ 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). (8)
  • GitHub Check: test
  • GitHub Check: type-check
  • GitHub Check: run_circuit_tests
  • GitHub Check: Cursor Bugbot
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test
  • GitHub Check: Android E2E Tests Demo App
  • GitHub Check: analyze-android

Comment on lines +215 to +219
# runs-on: macos-latest-large
runs-on: namespace-profile-apple-silicon-6cpu
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

iOS E2E tests are disabled for pull requests.

The conditional if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' prevents iOS E2E tests from running on PRs. This means PRs to staging and main won't receive iOS validation before merge, potentially allowing iOS-specific issues to reach protected branches.

If this is intentional for resource optimization, consider:

  • Running iOS tests on PRs to main and staging only (exclude dev)
  • Using the check_changes gating pattern to skip when mobile-sdk paths aren't modified
  • Documenting this decision in the workflow comments
🔎 Alternative: Run iOS E2E on PRs to staging/main
-    if: |
-      github.event_name == 'workflow_dispatch' ||
-      github.event_name == 'push'
+    if: |
+      github.event_name == 'workflow_dispatch' ||
+      github.event_name == 'push' ||
+      (github.event_name == 'pull_request' && contains(fromJSON('["staging", "main"]'), github.base_ref))
📝 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.

Suggested change
# runs-on: macos-latest-large
runs-on: namespace-profile-apple-silicon-6cpu
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push'
# runs-on: macos-latest-large
runs-on: namespace-profile-apple-silicon-6cpu
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
(github.event_name == 'pull_request' && contains(fromJSON('["staging", "main"]'), github.base_ref))
🧰 Tools
🪛 actionlint (1.7.9)

216-216: label "namespace-profile-apple-silicon-6cpu" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🤖 Prompt for AI Agents
.github/workflows/mobile-sdk-demo-e2e.yml around lines 215-219: the current if
condition only allows workflow_dispatch and push events, so iOS E2E tests are
skipped for pull requests; update the conditional to also run for pull_request
events targeting main and staging (e.g. include github.event_name ==
'pull_request' && contains(['main','staging'],
github.event.pull_request.base.ref')) or implement a check_changes gating
pattern that runs on pull_request but skips when mobile-sdk paths are unchanged;
alternatively add a comment documenting the deliberate exclusion if you intend
to keep PRs disabled.

Comment on lines +9 to +10
type LoggingSeverity = 'debug' | 'info' | 'warn' | 'error';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Export LoggingSeverity type for external consumers.

The test file imports LoggingSeverity from this module (line 9 of logging.test.ts), but the type isn't exported here. This will cause a TypeScript error.

🔎 Proposed fix
-type LoggingSeverity = 'debug' | 'info' | 'warn' | 'error';
+export type LoggingSeverity = 'debug' | 'info' | 'warn' | '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.

Suggested change
type LoggingSeverity = 'debug' | 'info' | 'warn' | 'error';
export type LoggingSeverity = 'debug' | 'info' | 'warn' | 'error';
🤖 Prompt for AI Agents
In app/src/stores/settingStore.ts around lines 9 to 10, the type alias
LoggingSeverity is declared but not exported, causing TypeScript import errors
in tests; export the type by adding an export modifier so external modules can
import it (e.g., change the declaration to export the LoggingSeverity type).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/mobile-sdk-demo-ci.yml (1)

3-9: Inconsistency with PR objectives: path filters not removed.

The PR objectives state that "trigger paths filters" are being removed "in favor of runtime change detection" and that base branches staging/main should always run checks. However, this workflow still uses paths filters on pull_request triggers, which means PRs to staging or main that don't touch these specific paths will skip this workflow entirely—contradicting the stated goal.

Either add the check_changes gating pattern (as done in circuits.yml and contracts.yml) or clarify why this workflow is excluded from that migration.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 362d355 and 4252757.

📒 Files selected for processing (19)
  • .github/workflows/circuits-build.yml
  • .github/workflows/circuits.yml
  • .github/workflows/common-ci.yml
  • .github/workflows/contracts.yml
  • .github/workflows/core-sdk-ci.yml
  • .github/workflows/gitleaks.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • .github/workflows/mobile-ci.yml
  • .github/workflows/mobile-deploy.yml
  • .github/workflows/mobile-e2e.yml
  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/mobile-sdk-demo-ci.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/qrcode-sdk-ci.yml
  • .github/workflows/release-calendar.yml
  • .github/workflows/web.yml
  • .github/workflows/workspace-ci.yml
  • app/.github/workflows/test-coverage.yml
🚧 Files skipped from review as they are similar to previous changes (10)
  • .github/workflows/mobile-sdk-ci.yml
  • .github/workflows/mobile-bundle-analysis.yml
  • app/.github/workflows/test-coverage.yml
  • .github/workflows/release-calendar.yml
  • .github/workflows/mobile-sdk-demo-e2e.yml
  • .github/workflows/circuits-build.yml
  • .github/workflows/common-ci.yml
  • .github/workflows/workspace-ci.yml
  • .github/workflows/mobile-deploy.yml
  • .github/workflows/mobile-e2e.yml
🧰 Additional context used
🧠 Learnings (26)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before creating a PR, ensure `yarn nice` passes in affected workspaces.
📚 Learning: 2025-07-14T09:03:08.292Z
Learnt from: aaronmgdr
Repo: selfxyz/self PR: 763
File: app/.github/workflows/test-coverage.yml:0-0
Timestamp: 2025-07-14T09:03:08.292Z
Learning: Node.js 22 is supported by actions/setup-nodev4 and has been in Active LTS since October 2024. It works on Linux, macOS, and Windows runners (Windows issues were resolved after version 22.8.0).

Applied to files:

  • .github/workflows/mobile-sdk-demo-ci.yml
  • .github/workflows/mobile-ci.yml
  • .github/workflows/qrcode-sdk-ci.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure Node.js 22.x is installed as specified in `.nvmrc`, then run `nvm use`, `corepack enable && corepack prepare yarnstable --activate`, and verify with `node -v && yarn -v`.

Applied to files:

  • .github/workflows/mobile-sdk-demo-ci.yml
  • .github/workflows/mobile-ci.yml
  • .github/workflows/qrcode-sdk-ci.yml
  • .github/workflows/web.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Use Node.js 22.x for development (verify with `nvm use`)

Applied to files:

  • .github/workflows/mobile-sdk-demo-ci.yml
  • .github/workflows/qrcode-sdk-ci.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Run `yarn install` once before running any other commands to install root dependencies and set up husky hooks.

Applied to files:

  • .github/workflows/web.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.

Applied to files:

  • .github/workflows/web.yml
  • .github/workflows/contracts.yml
  • .github/workflows/npm-publish.yml
  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn build` to ensure the build succeeds

Applied to files:

  • .github/workflows/web.yml
  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Use Yarn v4 for package management; execute commands using `yarn install`, `yarn add`, and `yarn remove`. Do not use npm or pnpm.

Applied to files:

  • .github/workflows/web.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run type-checking across the repo with `yarn types`.

Applied to files:

  • .github/workflows/web.yml
  • .github/workflows/contracts.yml
  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.

Applied to files:

  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.

Applied to files:

  • .github/workflows/contracts.yml
📚 Learning: 2025-11-25T14:08:11.887Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, build all workspaces except `contracts` using `yarn build`, and compile Solidity contracts with `yarn workspace selfxyz/contracts build`.

Applied to files:

  • .github/workflows/contracts.yml
  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation

Applied to files:

  • .github/workflows/contracts.yml
  • .github/workflows/circuits.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/artifacts/**/*.{ts,tsx} : Migrate artifact management from app/src/utils/ to packages/mobile-sdk-alpha/src/artifacts/ with tests for manifest validation, CDN downloads, signature verification, and storage

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Verify package conditions are valid before publishing

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Ensure exports are properly configured before publishing the package

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to app/src/**/*.{ts,tsx} : Update app to consume mobile-sdk-alpha modules after migration and validate all existing app tests pass

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/attestation/**/*.{ts,tsx} : Migrate attestation verification from app/src/utils/ to packages/mobile-sdk-alpha/src/attestation/ with tests for PCR0 validation and certificate chain validation

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/protocol/**/*.{ts,tsx} : Migrate protocol synchronization from app/src/utils/ to packages/mobile-sdk-alpha/src/protocol/ with tests for tree fetching, TTL caching, rate limiting, and memory bounds

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/processing/**/*.{ts,tsx} : Migrate MRZ processing helpers from app/src/utils/ to packages/mobile-sdk-alpha/src/processing/ with comprehensive tests for MRZ parsing and cross-platform compatibility

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/validation/**/*.{ts,tsx} : Migrate document validation logic from app/src/utils/ to packages/mobile-sdk-alpha/src/validation/ with unit tests for each validation rule and edge cases

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{js,ts,tsx,json,md,yml,yaml} : Use Prettier for code formatting with root Prettier and EditorConfig settings

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/**/*.{ts,tsx} : Ensure all exports in migrated modules support tree shaking for optimal bundle size

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn nice` to fix linting and formatting issues automatically

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Before committing changes, run `yarn test` to ensure all tests pass

Applied to files:

  • .github/workflows/npm-publish.yml
📚 Learning: 2025-11-25T14:08:23.106Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Use Yarn via Corepack (`corepack enable && corepack prepare yarnstable --activate`) for package management

Applied to files:

  • .github/workflows/circuits.yml
🪛 actionlint (1.7.9)
.github/workflows/circuits.yml

45-45: label "selfxyz-org" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


46-46: label "ubuntu-24-04" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

⏰ 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). (12)
  • GitHub Check: build-android
  • GitHub Check: build-ios
  • GitHub Check: test
  • GitHub Check: type-check
  • GitHub Check: run_circuit_tests
  • GitHub Check: Cursor Bugbot
  • GitHub Check: Android E2E Tests Demo App
  • GitHub Check: iOS E2E Tests Demo App
  • GitHub Check: analyze-android
  • GitHub Check: analyze-ios
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test
🔇 Additional comments (13)
.github/workflows/qrcode-sdk-ci.yml (1)

17-21: Clarify whether this workflow should adopt the check_changes pattern.

The PR objectives state that paths filters are being removed in favor of runtime change detection, and that check_changes gating has been applied to circuits and contracts workflows. However, this workflow still uses paths filters without a corresponding check_changes job.

Is this workflow intentionally excluded from the refactoring scope, or should it follow the same pattern as circuits/contracts for consistency?

.github/workflows/core-sdk-ci.yml (1)

17-17: LGTM: Checkout action upgrade is clean.

The upgrade from actions/checkout@v4 to v6 across all jobs is appropriate and consistent with the broader workflow modernization in this PR.

Also applies to: 41-41, 70-70, 99-99

.github/workflows/mobile-ci.yml (1)

41-41: LGTM: Checkout action upgrades are consistent.

The upgrade to actions/checkout@v6 across all mobile CI jobs (build-deps, test, build-ios, build-android) is appropriate.

Also applies to: 99-99, 214-214, 410-410

.github/workflows/npm-publish.yml (2)

31-31: LGTM: Checkout action upgrades are consistent.

The upgrade to actions/checkout@v6 across all publish jobs is appropriate and aligns with the repository-wide action modernization.

Also applies to: 75-75, 103-103, 131-131, 157-157, 181-181, 209-209


66-66: LGTM: Path correction aligns with monorepo structure.

The updated path packages/mobile-sdk-alpha/package.json correctly reflects the package location in the monorepo.

.github/workflows/gitleaks.yml (1)

10-10: LGTM: Checkout action upgrade is appropriate.

The upgrade to actions/checkout@v6 is correct, and the critical fetch-depth: 0 configuration for full history scanning is properly retained.

.github/workflows/web.yml (1)

19-19: LGTM: Checkout action upgrade is consistent.

The upgrade to actions/checkout@v6 maintains consistency with other workflows in this PR.

.github/workflows/contracts.yml (2)

14-43: LGTM: Change detection logic is well-implemented.

The check_changes job correctly:

  • Uses fetch-depth: 0 for proper git history access
  • Includes set -e and explicit error handling for the git diff operation
  • Bypasses path filtering for staging/main branches
  • Checks contracts and common paths for dev branch

The conditional execution pattern is solid.


45-51: LGTM: Conditional execution is properly configured.

The test_contracts job correctly depends on check_changes and only runs when should_run is true and the PR is not a draft. The upgrade to actions/checkout@v6 is appropriate.

.github/workflows/circuits.yml (4)

9-38: LGTM: Change detection logic mirrors contracts workflow.

The check_changes job correctly implements the same pattern as contracts.yml:

  • Uses fetch-depth: 0 for git history access
  • Includes set -e and explicit error handling
  • Bypasses path filtering for staging/main branches
  • Checks circuits paths for dev branch

40-54: LGTM: Job dependency and checkout upgrade are correct.

The run_circuit_tests job properly depends on check_changes and only runs when appropriate. The upgrade to actions/checkout@v6 is consistent with the PR's goals.


142-148: LGTM: Node.js and Corepack setup follow best practices.

The addition of Node.js setup using .nvmrc and Corepack enablement aligns with the repository's standardized tooling approach.


43-46: Custom runner labels are not being validated—actionlint is not enabled in the CI pipeline.

The review comment assumes actionlint is flagging the selfxyz-org and ubuntu-24-04 labels as unknown. However, actionlint is not being used or referenced anywhere in the repository's workflows. While .github/actionlint.yaml does not exist, its absence is not causing CI failures since actionlint is not running. If custom runner label validation is desired, actionlint should be explicitly enabled in the workflow and configured with the appropriate runner labels.

Likely an incorrect or invalid review comment.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
circuits/tests/register/register_aadhaar.test.ts (1)

129-144: Document the reason for skipping nullifier/commitment validation tests.

The tests skipped in PR #1527 validate critical circuit outputs (nullifier and commitment) for different input data. Line 129's test specifically verifies the circuit correctly handles variable QR data inputs, which is essential for ensuring the register_aadhaar circuit robustness.

Add a TODO comment to the skipped tests explaining:

  • Why these tests were disabled (PR reference insufficient)
  • Whether this is temporary or permanent
  • If permanent, confirm equivalent coverage exists elsewhere

Currently, line 115 only validates that commitment changes when the secret is tampered—it does not validate that nullifier and commitment outputs match their expected values for different QR data, which leaves a gap in edge case coverage.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4252757 and ec69e20.

📒 Files selected for processing (1)
  • circuits/tests/register/register_aadhaar.test.ts
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{js,jsx,ts,tsx}: NEVER log sensitive data including PII (names, DOB, passport numbers, addresses), credentials, tokens, API keys, private keys, or session identifiers.
ALWAYS redact/mask sensitive fields in logs using consistent patterns (e.g., ***-***-1234 for passport numbers, J*** D*** for names).

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Use React Navigation with createStaticNavigation for type-safe navigation in React Native applications.
Implement platform-specific handling with Platform.OS === 'ios' ? 'iOS' : 'Android' checks before platform-specific code in React Native.
Initialize native modules with initializeNativeModules() before any native operations in React Native.
Implement lazy loading for screens using React.lazy() in React Native applications.
Implement custom modal system with useModal hook and callback registry in React Native.
Integrate haptic feedback using useHapticNavigation hook in React Native navigation.
Use platform-specific initial routes: web uses 'Home', mobile uses 'Splash' in React Navigation.
Use Zustand for global state management in React Native applications.
Use custom hooks for complex state (useModal, useHapticNavigation) instead of inline logic.
Use AsyncStorage for simple data, SQLite for complex data, and Keychain for sensitive data in React Native.
Use @/ alias for src imports and @tests/ alias for test imports in TypeScript/JavaScript files.
Use conditional rendering with Platform.OS for platform-specific code in React Native.
Use Tamagui for UI components in React Native applications.
Do not log sensitive data in production, including identity verification and passport information.
Use Keychain for secure storage of sensitive data in React Native.
Implement proper cleanup of sensitive data after use.
Implement certificate validation for passport data verification.
Always use try-catch for async operations in React Native and TypeScript code.
Implement graceful degradation when native modules fail in React Native.
Provide user-friendly error messages in UI and error handlers.
Lazy load screens and components to optimize bundle size in React Native.
Prevent memory leaks in native modules in React Native.

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.test.{ts,tsx,js,jsx}: Use renderHook for testing custom React hooks instead of rendering components.
Mock console.error in tests to avoid test output clutter while testing error scenarios.
Test error boundaries and recovery mechanisms in React components.
Mock SQLite operations with executeSql method in database tests using utilities from tests/__setup__/databaseMocks.ts.

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.{tsx,jsx,ts,js}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper cleanup in useEffect and component unmount hooks in React.

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/{circuits,age,verification,zk,proof}/**/*.{circom,ts,tsx,js,py}

📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)

Implement zero-knowledge proof of age without disclosing actual date of birth

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/{circuits,country,verification,zk,proof}/**/*.{circom,ts,tsx,js,py}

📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)

Implement zero-knowledge proof of country non-inclusion without revealing actual country code

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/{circuits,proof,zk,compliance}/**/*.{circom,ts,tsx,js,py}

📄 CodeRabbit inference engine (.cursor/rules/compliance-verification.mdc)

Bind timestamp into proof signature to prevent replay attacks

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

**/*.{ts,tsx,js}: Never log PII, credentials, or private keys in production code; use DEBUG_SECRETS_TOKEN flag for debug-level secrets
Use consistent redaction patterns for sensitive fields in logs and test data

Files:

  • circuits/tests/register/register_aadhaar.test.ts
**/*.{test,spec}.{ts,js,tsx,jsx}

⚙️ CodeRabbit configuration file

**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:

  • Test coverage completeness
  • Test case quality and edge cases
  • Mock usage appropriateness
  • Test readability and maintainability

Files:

  • circuits/tests/register/register_aadhaar.test.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure CI pipeline passes all stages and no new linting/formatting issues are introduced after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Ensure type checking passes in all affected workspaces and build artifacts are generated successfully after PR creation.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:23.106Z
Learning: Ensure CI pipeline passes all stages after PR creation
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Flag security-sensitive changes for special review in PR descriptions.
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:11.887Z
Learning: Before committing, run linting and formatting fixes with `yarn workspaces foreach -A -p -v --topological-dev --since=HEAD run nice --if-present`.
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/proving/**/*.{ts,tsx} : Migrate proof input generation from app/src/utils/proving/ to packages/mobile-sdk-alpha/src/proving/ with tests for register, disclose, and TEE input generation

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/attestation/**/*.{ts,tsx} : Migrate attestation verification from app/src/utils/ to packages/mobile-sdk-alpha/src/attestation/ with tests for PCR0 validation and certificate chain validation

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.integration.{test.ts,test.tsx,spec.ts,spec.tsx} : Test end-to-end flows covering complete user journeys through the identity verification process

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/processing/**/*.{ts,tsx} : Migrate MRZ processing helpers from app/src/utils/ to packages/mobile-sdk-alpha/src/processing/ with comprehensive tests for MRZ parsing and cross-platform compatibility

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.{test.ts,test.tsx,spec.ts,spec.tsx} : Create comprehensive test fixtures and mock data for each migrated module without exposing sensitive information

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.test.{ts,tsx} : Test `isPassportDataValid()` with realistic, synthetic passport data and never use real user PII

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:08:51.177Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-11-25T14:08:51.177Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.test.{ts,tsx} : Verify `extractMRZInfo()` using published sample MRZ strings (e.g., ICAO examples) rather than fake data

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/tests/**/*.{ts,tsx,test.ts,test.tsx} : Create tests BEFORE migrating logic to verify functionality works correctly in the mobile-sdk-alpha package

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/crypto/**/*.{ts,tsx} : Migrate crypto adapters from app/src/utils/ to packages/mobile-sdk-alpha/src/crypto/ with tests for WebCrypto vs noble/* fallback and timing-safe comparisons

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:55.507Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-11-25T14:07:55.507Z
Learning: Applies to packages/mobile-sdk-alpha/src/validation/**/*.{ts,tsx} : Migrate document validation logic from app/src/utils/ to packages/mobile-sdk-alpha/src/validation/ with unit tests for each validation rule and edge cases

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
⏰ 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). (11)
  • GitHub Check: build-android
  • GitHub Check: build-ios
  • GitHub Check: test
  • GitHub Check: type-check
  • GitHub Check: run_circuit_tests
  • GitHub Check: analyze-android
  • GitHub Check: analyze-ios
  • GitHub Check: iOS E2E Tests Demo App
  • GitHub Check: e2e-ios
  • GitHub Check: Android E2E Tests Demo App
  • GitHub Check: android-build-test
🔇 Additional comments (1)
circuits/tests/register/register_aadhaar.test.ts (1)

54-67: [rewritten review comment]
[classification tag]

@jcortejoso jcortejoso merged commit 088a9d8 into staging Dec 24, 2025
41 checks passed
@jcortejoso jcortejoso deleted the jcortejoso/no-path-filter branch December 24, 2025 15:31
jcortejoso added a commit that referenced this pull request Dec 24, 2025
SELF-1684: Ensure checks are run with pull requests to staging/main
jcortejoso added a commit that referenced this pull request Dec 25, 2025
SELF-1684: Ensure checks are run with pull requests to staging/main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants