Skip to content

Conversation

@transphorm
Copy link
Member

@transphorm transphorm commented Nov 11, 2025

Summary by CodeRabbit

  • Documentation

    • Enhanced testing guidelines with memory optimization best practices for test environments.
    • Added comprehensive E2E testing guidance for CI automation and local testing.
    • Expanded environment setup and deployment instructions.
    • Added troubleshooting section with workflow-specific tips.
    • Updated SDK integration testing documentation with real-world test examples.
  • Chores

    • Removed obsolete migration documentation and guides.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

This PR removes legacy migration documentation (mobile-sdk-migration.mdc, MIGRATION_PLAN.md, MIGRATION_COMPLETED.md, MIGRATION_PROMPTS.md) and introduces critical test memory optimization rules to prevent OOM errors from nested require() calls. It expands AGENTS.md across root, app, and mobile-sdk-alpha workspaces with E2E testing guidance, workspace-specific instructions, and troubleshooting. README updates in mobile-sdk-alpha refocus on real integration testing.

Changes

Cohort / File(s) Summary
Migration Documentation Cleanup
.cursor/rules/mobile-sdk-migration.mdc, packages/mobile-sdk-alpha/docs/MIGRATION_*
Removed comprehensive migration framework, completion status, migration plan, and procedural prompts—eliminates legacy migration guidance while preserving active development instructions.
Test Memory Optimization Rules
.cursor/rules/test-memory-optimization.mdc
New documentation defining critical rule against nested require() calls in tests; includes forbidden/correct patterns, Jest and Vitest setup strategies, and detection guidance for CI memory issues.
Root AGENTS.md Updates
AGENTS.md
Added E2E testing section with CI automation notes, Test Memory Optimization guidance referencing the new rule file, extended CI caching strategies (Yarn, Bundler, Gradle, Pods), workspace-specific instructions, and troubleshooting section (Yarn, build, test, type errors).
App Workspace AGENTS.md Updates
app/AGENTS.md
Expanded pre-PR checklist with nested require() guards, .env setup, E2E CI validation; added extensive E2E Testing, Environment Variables, and Deployment sections; integrated Test Memory Optimization guidance with concrete grep commands.
Mobile SDK Alpha AGENTS.md Updates
packages/mobile-sdk-alpha/AGENTS.md
Replaced generic checklist items with explicit exports/package validation; added Integration Testing section with app integration and cross-platform checks; introduced Testing Guidelines emphasizing real (non-mock) SDK tests and PII-safe data; added Test Memory Optimization section with ES6 import examples.
Mobile SDK Alpha README Updates
packages/mobile-sdk-alpha/README.md
Removed Migration plan and Architecture sections; refocused Testing section from generic guidance to mandatory real integration testing with code examples and mocking prohibitions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~18 minutes

  • Predominantly documentation additions and removals with clear narrative structure
  • Homogeneous pattern of AGENTS.md expansions across three locations (root, app, mobile-sdk-alpha) following consistent formatting
  • No code logic, runtime behavior, or API changes to verify
  • Test memory optimization rules are straightforward prescriptive guidance

Areas for attention:

  • Verify that Test Memory Optimization rules align with actual Jest/Vitest setup in the codebase
  • Confirm that workspace-specific AGENTS.md entries (app, mobile-sdk-alpha, noir) accurately override root instructions as documented
  • Cross-check that removal of migration docs (MIGRATION_PLAN, MIGRATION_COMPLETED, MIGRATION_PROMPTS) doesn't orphan related tooling or scripts that reference them

Possibly related PRs

Suggested labels

codex, documentation, developer-experience

Suggested reviewers

  • RamsesAupart

Poem

📚 Migration docs retire to rest,
Test memory rules pass the jest,
AGENTS expand with guidance clear—
Real integration testing here! 🚀

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 PR title directly aligns with the primary changes—adding test memory optimization rules and guidance across AGENTS.md files to prevent out-of-memory errors from nested require() calls in tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch justin/oom-agent-test-rule

📜 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 d86ee9e and 744232b.

📒 Files selected for processing (9)
  • .cursor/rules/mobile-sdk-migration.mdc (0 hunks)
  • .cursor/rules/test-memory-optimization.mdc (1 hunks)
  • AGENTS.md (2 hunks)
  • app/AGENTS.md (3 hunks)
  • packages/mobile-sdk-alpha/AGENTS.md (4 hunks)
  • packages/mobile-sdk-alpha/README.md (1 hunks)
  • packages/mobile-sdk-alpha/docs/MIGRATION_COMPLETED.md (0 hunks)
  • packages/mobile-sdk-alpha/docs/MIGRATION_PLAN.md (0 hunks)
  • packages/mobile-sdk-alpha/docs/MIGRATION_PROMPTS.md (0 hunks)
💤 Files with no reviewable changes (4)
  • packages/mobile-sdk-alpha/docs/MIGRATION_PROMPTS.md
  • packages/mobile-sdk-alpha/docs/MIGRATION_PLAN.md
  • .cursor/rules/mobile-sdk-migration.mdc
  • packages/mobile-sdk-alpha/docs/MIGRATION_COMPLETED.md
🧰 Additional context used
📓 Path-based instructions (1)
packages/mobile-sdk-alpha/README.md

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

Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md

Files:

  • packages/mobile-sdk-alpha/README.md
🧠 Learnings (50)
📓 Common learnings
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: Applies to app/ios/**/*.{m,mm,swift} : Document complex native iOS module changes in the PR
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: Applies to app/android/**/*.{kt,java} : Document complex native Android module changes in the PR
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/artifacts/** : Place artifact and manifest management in packages/mobile-sdk-alpha/src/artifacts/
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/validation/** : Place document validation logic in packages/mobile-sdk-alpha/src/validation/
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/package.json : Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Write integration tests that exercise the real validation logic (not mocks)
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/demo/** : Provide an in-SDK lightweight React Native demo under packages/mobile-sdk-alpha/demo/
📚 Learning: 2025-09-22T11:10:57.879Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: Applies to app/ios/**/*.{m,mm,swift} : Document complex native iOS module changes in the PR

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Document API changes with examples, flag breaking changes, note performance and security implications for AI review

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • .cursor/rules/test-memory-optimization.mdc
  • AGENTS.md
📚 Learning: 2025-09-22T11:10:57.879Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: Applies to app/**/*.{ios,android,web}.{ts,tsx,js,jsx} : Explain platform-specific code paths in the PR description (files with .ios, .android, or .web extensions)

Applied to files:

  • app/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-09-22T11:10:57.879Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: Applies to app/android/**/*.{kt,java} : Document complex native Android module changes in the PR

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Test, build, and deploy scripts (`yarn test`, `yarn ios`, `yarn test:e2e:ios`, Fastlane, etc.) must be used for automation.

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-09-22T11:10:57.879Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: Applies to app/**/*.{ts,tsx} : Type checking must pass before PRs (yarn types)

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-09-22T11:10:57.879Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: Ensure app builds succeed for iOS, Android, and Web before PRs

Applied to files:

  • app/AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Confirm CI passes, build artifacts generate, and bundle size impact is acceptable after PR creation

Applied to files:

  • app/AGENTS.md
📚 Learning: 2025-09-22T11:10:57.879Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: Run unit tests and ensure they pass (yarn test) before PRs

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-09-22T11:10:57.879Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: Run linting/formatting and ensure no new issues (yarn nice, yarn lint) before PRs

Applied to files:

  • app/AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Run yarn nice, yarn types, and yarn test before commits and PRs

Applied to files:

  • app/AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Write integration tests that exercise the real validation logic (not mocks)

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • .cursor/rules/test-memory-optimization.mdc
  • AGENTS.md
📚 Learning: 2025-09-22T11:10:57.879Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: app/AGENTS.md:0-0
Timestamp: 2025-09-22T11:10:57.879Z
Learning: App must launch without crashes and core functionality must work on target platforms

Applied to files:

  • app/AGENTS.md
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Always check `Platform.OS` before running any platform-specific code; use different implementations and tests as required.

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Lazy load screens/components, optimize bundle size, prevent memory leaks in native modules, and ensure resource cleanup.

Applied to files:

  • app/AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Address CodeRabbitAI feedback and resolve security warnings during review

Applied to files:

  • app/AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Verify package conditions are valid (e.g., exports conditions)

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-23T02:02:02.556Z
Learnt from: transphorm
Repo: selfxyz/self PR: 942
File: app/vite.config.ts:170-0
Timestamp: 2025-08-23T02:02:02.556Z
Learning: In the selfxyz/self React Native app, devTools from '@/navigation/devTools' are intentionally shipped to production builds for testing purposes, not excluded as is typical in most applications.

Applied to files:

  • app/AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to app/jest.config.cjs : Use Jest in the app with a React Native preset configured in app/jest.config.cjs

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • .cursor/rules/test-memory-optimization.mdc
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Always use `@/` for src imports and `tests/` for test imports; prefer platform-specific imports with conditional rendering.

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • .cursor/rules/test-memory-optimization.mdc
  • AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Test isPassportDataValid() with realistic synthetic passport data (never real user data)

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/demo/** : Provide an in-SDK lightweight React Native demo under packages/mobile-sdk-alpha/demo/

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-07-29T01:08:28.530Z
Learnt from: transphorm
Repo: selfxyz/self PR: 795
File: app/android/app/build.gradle:157-158
Timestamp: 2025-07-29T01:08:28.530Z
Learning: For this React Native project, the team prefers build flexibility over fail-fast behavior for release builds in app/android/app/build.gradle. They intentionally allow fallback to debug signing for local development runs, relying on Google Play Console validation to catch any improperly signed releases during upload.

Applied to files:

  • app/AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Do NOT mock selfxyz/mobile-sdk-alpha in tests (avoid jest.mock('selfxyz/mobile-sdk-alpha') and replacing real functions with mocks)

Applied to files:

  • app/AGENTS.md
  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • .cursor/rules/test-memory-optimization.mdc
  • AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md

Applied to files:

  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests

Applied to files:

  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • .cursor/rules/test-memory-optimization.mdc
  • AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Update the app to consume the mobile-sdk-alpha package and replace local modules with SDK imports

Applied to files:

  • packages/mobile-sdk-alpha/README.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Never use real user PII in tests; use only synthetic, anonymized, or approved test vectors

Applied to files:

  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
  • .cursor/rules/test-memory-optimization.mdc
  • AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/*.{ts,tsx} : Avoid introducing circular dependencies

Applied to files:

  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts

Applied to files:

  • packages/mobile-sdk-alpha/README.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/package.json : Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)

Applied to files:

  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Ensure package exports are properly configured

Applied to files:

  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/crypto/** : Place crypto adapters and utilities in packages/mobile-sdk-alpha/src/crypto/

Applied to files:

  • packages/mobile-sdk-alpha/README.md
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Verify extractMRZInfo() using published sample MRZ strings (e.g., ICAO examples)

Applied to files:

  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/validation/** : Place document validation logic in packages/mobile-sdk-alpha/src/validation/

Applied to files:

  • packages/mobile-sdk-alpha/README.md
  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-25T14:25:57.586Z
Learnt from: aaronmgdr
Repo: selfxyz/self PR: 951
File: app/src/providers/authProvider.web.tsx:17-18
Timestamp: 2025-08-25T14:25:57.586Z
Learning: The selfxyz/mobile-sdk-alpha/constants/analytics import path is properly configured with SDK exports, Metro aliases, and TypeScript resolution. Import changes from @/consts/analytics to this path are part of valid analytics migration, not TypeScript resolution issues.

Applied to files:

  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/vitest.config.ts : Use Vitest in the SDK with a Node environment configured in packages/mobile-sdk-alpha/vitest.config.ts

Applied to files:

  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/tests/setup.ts : Provide Vitest setup file at packages/mobile-sdk-alpha/tests/setup.ts to suppress console noise

Applied to files:

  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/package.json : Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint

Applied to files:

  • packages/mobile-sdk-alpha/AGENTS.md
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Applies to tests/**/*.test.{js,ts,tsx,jsx} : Test error boundaries and recovery mechanisms.

Applied to files:

  • packages/mobile-sdk-alpha/AGENTS.md
  • .cursor/rules/test-memory-optimization.mdc
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Applies to jest.setup.js : Comprehensive mocks for all native modules must be set up in `jest.setup.js`.

Applied to files:

  • packages/mobile-sdk-alpha/AGENTS.md
  • .cursor/rules/test-memory-optimization.mdc
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to app/jest.setup.js : Provide comprehensive Jest setup in app/jest.setup.js with required mocks

Applied to files:

  • .cursor/rules/test-memory-optimization.mdc
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Applies to src/native/**/*.{js,ts,tsx,jsx} : Native module initialization must use `initializeNativeModules()` before operations.

Applied to files:

  • .cursor/rules/test-memory-optimization.mdc
📚 Learning: 2025-10-04T05:29:43.587Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-04T05:29:43.587Z
Learning: Applies to noir/crates/*/** : For Noir circuits, run nargo test -p <crate> in each noir/crates/* directory

Applied to files:

  • AGENTS.md
📚 Learning: 2025-10-08T20:23:58.783Z
Learnt from: transphorm
Repo: selfxyz/self PR: 1244
File: .github/workflows/mobile-deploy.yml:774-776
Timestamp: 2025-10-08T20:23:58.783Z
Learning: In the selfxyz/self repository, for the mobile deployment workflow (.github/workflows/mobile-deploy.yml):
- iOS builds cache Ruby gems at `app/ios/vendor/bundle`
- Android builds cache Ruby gems at `app/vendor/bundle`
- These paths should be used consistently within their respective build jobs

Applied to files:

  • AGENTS.md
📚 Learning: 2025-10-04T05:29:43.587Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-04T05:29:43.587Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : In GitHub workflows, use the shared composite actions in .github/actions for dependency caching instead of calling actions/cache directly

Applied to files:

  • AGENTS.md
📚 Learning: 2025-09-22T11:10:22.019Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursorrules:0-0
Timestamp: 2025-09-22T11:10:22.019Z
Learning: Use Yarn workspaces for monorepo management.

Applied to files:

  • AGENTS.md
📚 Learning: 2025-10-04T05:29:43.587Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-04T05:29:43.587Z
Learning: Applies to contracts/** : Compile Solidity contracts using `yarn workspace selfxyz/contracts build`

Applied to files:

  • AGENTS.md
📚 Learning: 2025-08-29T15:30:32.847Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: noir/AGENTS.md:0-0
Timestamp: 2025-08-29T15:30:32.847Z
Learning: Run commands from the repository root within the `noir/` workspace unless noted

Applied to files:

  • AGENTS.md
⏰ 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: type-check
  • GitHub Check: build-deps
  • GitHub Check: ios-e2e
  • GitHub Check: android-e2e
  • GitHub Check: analyze-android
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test
  • GitHub Check: analyze-ios
🔇 Additional comments (9)
packages/mobile-sdk-alpha/README.md (1)

256-291: Excellent clarity on testing approach and PII protection.

The updated Testing section now clearly distinguishes between proper integration testing (using real package methods with synthetic data) and anti-patterns (mocking the package). This aligns well with the retrieved learnings and makes it immediately clear to developers what's expected. The concrete examples with specific function names and the strong emphasis on never using real PII are particularly effective.

.cursor/rules/test-memory-optimization.mdc (1)

89-103: Jest and Vitest setup patterns are well-explained.

Lines 89-103 clearly show that the custom require override and vi.mock patterns are setup-phase operations that run once, making the distinction obvious: tests should use import statements, not require(). This is the key insight that makes the rule actionable.

AGENTS.md (2)

168-176: Workspace-specific section clarifies documentation structure effectively.

This new section establishes clear guidance that developers should check workspace-specific AGENTS.md files for overrides, which is crucial in a monorepo. The list is complete (app, mobile-sdk-alpha, noir) and the statement that these "override or extend" makes the relationship clear.


138-146: Test Memory Optimization guidance is appropriately brief at root level.

The root-level guidance captures the critical rule ("NEVER create nested require() calls"), provides actionable principles, and references the detailed rule file in .cursor/rules/. This follows good documentation layering—critical warnings at root, comprehensive details in specialized files.

packages/mobile-sdk-alpha/AGENTS.md (2)

152-173: Integration Testing section provides clear path for SDK verification.

This new section specifically addresses how SDK developers should verify their changes work with the consuming app. The commands are concrete (cd ../../app, yarn build:deps, yarn test), and the cross-platform guidance is appropriate for a React Native + Web SDK. This closes an important gap in the documentation.


215-253: Vitest-specific Test Memory guidance with code examples is excellent.

The Vitest-specific examples (using vi.mock() instead of Jest's jest.mock()) make this guidance immediately applicable to developers in this workspace. The CORRECT vs FORBIDDEN code examples (lines 229-252) clearly show the anti-pattern and the fix, making the rule concrete and actionable.

app/AGENTS.md (3)

112-148: E2E testing section effectively manages expectations for developers.

This section is well-structured: it clearly states E2E tests run automatically in CI (lines 114-120), emphasizes they're not required locally, then provides optional local testing setup (lines 122-148) with Maestro prerequisites and actual commands. This removes confusion about requirements while enabling debugging when needed.


21-21: Test memory checks are practical and easily verifiable.

The specific grep command (grep -r "require('react-native')" app/tests/) makes this check developer-friendly. It appears in Pre-PR (line 21), Post-PR (line 53), and Test Memory section (line 218), which is appropriate repetition for a critical safety check. Developers can immediately run this command to verify compliance.

Also applies to: 53-53, 210-221


172-208: Deployment section fills significant documentation gap.

The new Deployment section provides clear guidance for a complex operational task: Fastlane integration, deployment prerequisites, platform-specific secrets, versioning requirements, and a pre-deployment checklist. This is comprehensive without being overwhelming, and the reference to detailed deployment guide (line 195) appropriately delegates further details.


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 merged commit 6c28bbd into dev Nov 11, 2025
29 of 33 checks passed
@transphorm transphorm deleted the justin/oom-agent-test-rule branch November 11, 2025 23:53
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