Skip to content

Conversation

@transphorm
Copy link
Member

@transphorm transphorm commented Nov 29, 2025

Summary by CodeRabbit

  • Chores
    • Updated package dependencies to pinned versions for circuits and common packages.
    • Repointed internal module references to a new package location.
    • Updated test asset paths used by unit/integration tests to the new package.
    • CI workflow adjusted to include and cache the shared sdk-common workspace.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 29, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • app/Gemfile.lock is excluded by !**/*.lock

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

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

This PR migrates circuit includes and test asset paths from anon-aadhaar-circuits to @selfxyz/aa-circuits, adds @selfxyz/aa-circuits as a dependency, and pins @anon-aadhaar/core to an exact version in package.json files.

Changes

Cohort / File(s) Summary
Package configuration
circuits/package.json, common/package.json
Added dependency @selfxyz/aa-circuits@^0.0.1; changed @anon-aadhaar/core spec from caret (^0.0.1) to exact (0.0.1); removed git-based anon-aadhaar-circuits entry from circuits/package.json.
Circom include update
circuits/circuits/utils/aadhaar/extractQrData.circom
Replaced include path anon-aadhaar-circuits/src/helpers/constants.circom@selfxyz/aa-circuits/src/helpers/constants.circom.
Circuit tests (asset paths & includes)
circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts, circuits/tests/other_circuits/qrdata_extractor.test.ts, circuits/tests/register/register_aadhaar.test.ts
Updated test asset and include paths to use @selfxyz/aa-circuits/assets/... and @selfxyz/aa-circuits/... instead of anon-aadhaar-circuits/....
Contracts tests (asset paths)
contracts/test/v2/discloseAadhaar.test.ts, contracts/test/v2/registerAadhaar.test.ts
Updated private key file reads to @selfxyz/aa-circuits/assets/testPrivateKey.pem from anon-aadhaar-circuits/assets/testPrivateKey.pem.
CI workflow
.github/workflows/qrcode-sdk-ci.yml
Added sdk/sdk-common workspace to path filters, cache keys, build and artifact paths so sdk-common is built/cached alongside existing packages.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10–15 minutes

  • Verify the new package @selfxyz/aa-circuits@^0.0.1 is published and installable in CI/environments.
  • Confirm all referenced asset files (PEM keys, helpers/constants.circom) exist in @selfxyz/aa-circuits and paths are correct.
  • Check that pinning @anon-aadhaar/[email protected] does not conflict with other workspace packages or cause duplicate/resolution issues.
  • Review the CI workflow change to ensure caching/restores include sdk-common without introducing stale artifacts.

Possibly related PRs

Suggested labels

codex

Suggested reviewers

  • remicolin
  • 0xturboblitz

Poem

🔧 Paths updated, old names rearranged,
AADHAAR circuits neatly exchanged,
One package now holds the key,
Tests and CI point where it should be,
Small change, tidy and well-arranged ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: updating the Aadhaar package source from anon-aadhaar-circuits to @selfxyz/aa-circuits and addressing related 402 errors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@transphorm transphorm marked this pull request as ready for review November 29, 2025 15:08
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@transphorm transphorm changed the title Justin/update anon aadhaar pkg source update anon aadhaar pkg source; fix 402 errors Nov 29, 2025
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)
circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts (1)

20-20: Remove outdated commented path reference.

The commented path reference on line 20 is now outdated. Consider removing it to avoid confusion.

-// const privateKeyPath = path.join(__dirname, '../../../node_modules/@selfxyz/aa-circuits/assets/testPrivateKey.pem');
 const privateKeyPem = fs.readFileSync(
📜 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 d5d0879 and 2091440.

⛔ Files ignored due to path filters (2)
  • app/Gemfile.lock is excluded by !**/*.lock
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (8)
  • circuits/circuits/utils/aadhaar/extractQrData.circom (1 hunks)
  • circuits/package.json (1 hunks)
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts (1 hunks)
  • circuits/tests/other_circuits/qrdata_extractor.test.ts (2 hunks)
  • circuits/tests/register/register_aadhaar.test.ts (1 hunks)
  • common/package.json (1 hunks)
  • contracts/test/v2/discloseAadhaar.test.ts (1 hunks)
  • contracts/test/v2/registerAadhaar.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (12)
**/*.{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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.test.ts
**/*.{tsx,jsx,ts,js}

📄 CodeRabbit inference engine (.cursorrules)

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

Files:

  • circuits/tests/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.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/other_circuits/qrdata_extractor.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/circuits/utils/aadhaar/extractQrData.circom
  • circuits/tests/disclose/vc_and_disclose_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/other_circuits/qrdata_extractor.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/circuits/utils/aadhaar/extractQrData.circom
  • circuits/tests/disclose/vc_and_disclose_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/other_circuits/qrdata_extractor.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/circuits/utils/aadhaar/extractQrData.circom
  • circuits/tests/disclose/vc_and_disclose_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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.test.ts
**/{contracts,blockchain,chain,web3,solidity}/**/*.{sol,ts,tsx,js}

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

Only publish nullifiers and commitments on-chain, never publish linkable identity data

Files:

  • contracts/test/v2/discloseAadhaar.test.ts
  • contracts/test/v2/registerAadhaar.test.ts
**/{circuits,disclose,proof}/**/*.circom

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

Integrate country validation proof into disclosure proof circuit

Files:

  • circuits/circuits/utils/aadhaar/extractQrData.circom
circuits/**/*.circom

⚙️ CodeRabbit configuration file

circuits/**/*.circom: Review ZK circuit code for:

  • Circuit correctness and completeness
  • Constraint efficiency
  • Input validation
  • Security considerations for zero-knowledge proofs

Files:

  • circuits/circuits/utils/aadhaar/extractQrData.circom
🧠 Learnings (22)
📓 Common learnings
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
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
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
📚 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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • common/package.json
  • circuits/package.json
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.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/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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/package.json
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • common/package.json
  • circuits/package.json
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • 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/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/package.json
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.test.ts
📚 Learning: 2025-11-25T14:07:28.188Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/compliance-verification.mdc:0-0
Timestamp: 2025-11-25T14:07:28.188Z
Learning: Applies to **/{circuits,country,verification,zk,proof}/**/*.{circom,ts,tsx,js,py} : Implement zero-knowledge proof of country non-inclusion without revealing actual country code

Applied to files:

  • circuits/tests/other_circuits/qrdata_extractor.test.ts
  • circuits/circuits/utils/aadhaar/extractQrData.circom
  • circuits/package.json
📚 Learning: 2025-11-25T14:07:28.188Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/compliance-verification.mdc:0-0
Timestamp: 2025-11-25T14:07:28.188Z
Learning: Applies to **/{circuits,age,verification,zk,proof}/**/*.{circom,ts,tsx,js,py} : Implement zero-knowledge proof of age without disclosing actual date of birth

Applied to files:

  • circuits/tests/other_circuits/qrdata_extractor.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/tee/**/*.{ts,tsx} : Migrate TEE session management from app/src/utils/ to packages/mobile-sdk-alpha/src/tee/ with tests for WebSocket handling, abort, timeout, and lifecycle events

Applied to files:

  • circuits/tests/other_circuits/qrdata_extractor.test.ts
  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.test.ts
📚 Learning: 2025-11-25T14:07:28.188Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/compliance-verification.mdc:0-0
Timestamp: 2025-11-25T14:07:28.188Z
Learning: Applies to **/{circuits,disclose,proof}/**/*.circom : Integrate country validation proof into disclosure proof circuit

Applied to files:

  • circuits/tests/other_circuits/qrdata_extractor.test.ts
  • circuits/circuits/utils/aadhaar/extractQrData.circom
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
📚 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:

  • circuits/tests/other_circuits/qrdata_extractor.test.ts
  • circuits/package.json
📚 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:

  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/package.json
  • contracts/test/v2/registerAadhaar.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/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:

  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
  • contracts/test/v2/registerAadhaar.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:

  • contracts/test/v2/discloseAadhaar.test.ts
  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/package.json
  • contracts/test/v2/registerAadhaar.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 **/*.{ts,tsx,js,jsx} : Implement certificate validation for passport data verification.

Applied to files:

  • circuits/tests/register/register_aadhaar.test.ts
  • circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts
📚 Learning: 2025-11-25T14:07:28.188Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/compliance-verification.mdc:0-0
Timestamp: 2025-11-25T14:07:28.188Z
Learning: Applies to **/circuits/circuits/disclose/disclose.circom : Implement age verification circuit at location `circuits/circuits/disclose/disclose.circom` with private DOB input, public minimum age input, and day-level date arithmetic validation

Applied to files:

  • circuits/circuits/utils/aadhaar/extractQrData.circom
📚 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} : Provide comprehensive TypeScript type definitions and maintain type safety across SDK exports

Applied to files:

  • common/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/tests/**/*.{test.ts,test.tsx,spec.ts,spec.tsx} : Mock native dependencies appropriately in tests when testing platform-specific code

Applied to files:

  • circuits/package.json
📚 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} : Do NOT mock the mobile-sdk-alpha package in tests; use actual imports from `selfxyz/mobile-sdk-alpha` and write integration tests that exercise real validation logic

Applied to files:

  • circuits/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: 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:

  • circuits/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/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:

  • contracts/test/v2/registerAadhaar.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). (8)
  • GitHub Check: test-common
  • GitHub Check: type-check
  • GitHub Check: build-deps
  • GitHub Check: build
  • GitHub Check: analyze-android
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test
  • GitHub Check: analyze-ios
🔇 Additional comments (8)
circuits/tests/other_circuits/qrdata_extractor.test.ts (1)

17-17: Test asset paths updated correctly.

The paths have been updated to reference the new @selfxyz/aa-circuits package. This is consistent with the broader package migration.

Also applies to: 32-32

contracts/test/v2/registerAadhaar.test.ts (1)

13-13: Test asset path updated correctly.

The private key path has been updated to reference @selfxyz/aa-circuits from the circuits workspace's node_modules. This is consistent with the package migration.

contracts/test/v2/discloseAadhaar.test.ts (1)

19-19: Test asset path updated correctly.

The private key path has been updated consistently with the package migration to @selfxyz/aa-circuits.

circuits/tests/disclose/vc_and_disclose_aadhaar.test.ts (1)

22-22: Test asset path updated correctly.

The private key path has been updated to reference the new @selfxyz/aa-circuits package location.

circuits/tests/register/register_aadhaar.test.ts (1)

22-22: Test asset paths updated correctly.

Both private and public key paths have been updated to reference the new @selfxyz/aa-circuits package. The migration is consistent across all test files.

Also applies to: 26-26

circuits/package.json (1)

41-47: Consistent versioning strategy recommended, though less critical since circuits is marked private.

The version pinning inconsistency is valid:

  • @anon-aadhaar/core uses exact version: npm:@selfxyz/[email protected]
  • @selfxyz/aa-circuits uses caret: ^0.0.1 (allows patch updates)

Both are external @selfxyz/ namespace packages at pre-release stage (0.0.x). For consistency and clarity, either:

  1. Pin both exactly (safer for pre-release packages where breaking changes may occur), or
  2. Document and apply a consistent semver strategy across internal packages.

The package assets (testPrivateKey.pem, testPublicKey.pem, constants.circom) are confirmed to be in use across the test suite, so availability is not a concern.

Note: Since circuits is marked "private": true, this is a code quality/consistency issue rather than a publishability blocker.

common/package.json (1)

663-663: Confirm if exact version pinning for @selfxyz/[email protected] is intentional for stability.

The dependency spec changed from ^0.0.1 (allowing patch updates) to exact 0.0.1 (no automatic updates). While this prevents receiving bug fixes and security patches automatically, the codebase shows a pattern of exact version pinning for other pre-release packages (e.g., @zk-email/jwt-tx-builder-circuits: "0.1.0"). Since @selfxyz/[email protected] is a pre-release package, verify whether this strict pinning is intentional for stability or should allow patch updates. If intentional, ensure you have a documented process for monitoring and manually updating this dependency when critical fixes are available.

circuits/circuits/utils/aadhaar/extractQrData.circom (1)

3-3: The new package path cannot be resolved and will cause circom compilation to fail.

The include path references @selfxyz/aa-circuits version ^0.0.1, but this package:

  • Does not exist on the public npm registry
  • Is not configured with a private registry
  • Has no local workspace mapping

Circom compilation will fail at line 3 with an unresolved include error. The dependency must either be published to npm/a configured registry, or the reference must point to an existing package location. Verify that @selfxyz/aa-circuits is published before merging, or confirm the correct package name/path.

⛔ Skipped due to learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/compliance-verification.mdc:0-0
Timestamp: 2025-11-25T14:07:28.188Z
Learning: Applies to **/{circuits,disclose,proof}/**/*.circom : Integrate country validation proof into disclosure proof circuit

@transphorm
Copy link
Member Author

@aaronmgdr has a fix for the aadhaar pipeline errors here - #1448

@transphorm transphorm closed this Dec 1, 2025
@transphorm transphorm deleted the justin/update-anon-aadhaar-pkg-source branch December 6, 2025 04:50
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