Skip to content

Conversation

@transphorm
Copy link
Member

@transphorm transphorm commented Aug 15, 2025

Summary

  • upgrade mocha to ^10.7.3 across circuits, qrcode SDK, and contracts
  • align chai to ^4.4.1 in circuits and common
  • bump @types/react and @types/jest for mobile app and contracts respectively

Testing

  • yarn lint
  • yarn build
  • yarn workspace @selfxyz/contracts build (fails: Invalid account for network: mainnet)
  • yarn types
  • yarn workspace @selfxyz/circuits test *(fails: 37 failing)
  • yarn workspace @selfxyz/common test
  • yarn workspace @selfxyz/qrcode test
  • yarn workspace @selfxyz/contracts test (fails: Invalid account for network: mainnet)
  • yarn workspace @selfxyz/mobile-app test

https://chatgpt.com/codex/tasks/task_b_689e8bd032d8832dad7620b95d8bed9c

Summary by CodeRabbit

  • Chores
    • Updated development and testing dependencies (Mocha, Chai and test typings) across packages to improve test tooling and compatibility; no runtime/API changes.
    • Refreshed TypeScript type definitions for React to enhance developer experience.
    • Cleaned and fixed code-review automation configuration for more reliable review behavior.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 15, 2025

Walkthrough

Cleaned CI/review config in .coderabbit.yaml and bumped several dev/test dependency versions across multiple package.json files; no source code or public API changes.

Changes

Cohort / File(s) Summary
Code Review Config
./.coderabbit.yaml
Removed duplicate review_status; replaced standalone auto_review with nested block: enabled: true, drafts: false, base_branches: ["main","dev"].
App Type Definitions
app/package.json
Bumped devDependency @types/react from ^18.2.6^18.3.4.
Test Tooling (circuits, sdk/qrcode)
circuits/package.json, sdk/qrcode/package.json
mocha bumped ^10.3.0^10.7.3; circuits also changed chai from 4.3.8 (exact) → ^4.4.1.
Common Test Dependency
common/package.json
Added/updated chai to ^4.4.1 (was ^4.3.8).
Contracts Dependencies
contracts/package.json
Moved mocha from dependencies (^10.4.0) → devDependencies (^10.7.3); bumped @types/jest ^29.5.12^29.5.14.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

Configs tweaked, the versions climb,
Tests kept sharp, in tidy time.
No code harmed, just upkeep done,
Small changes, steady run.
Cheers to builds that hum and chime 🎉


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between dc88775 and 398e807.

📒 Files selected for processing (2)
  • common/package.json (1 hunks)
  • contracts/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • contracts/package.json
  • common/package.json
⏰ 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: analyze-android
  • GitHub Check: e2e-ios
  • GitHub Check: run_circuit_tests
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/upgrade-test-tooling-and-type-definitions

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6fdf441 and dc88775.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • .coderabbit.yaml (0 hunks)
  • app/package.json (1 hunks)
  • circuits/package.json (1 hunks)
  • common/package.json (1 hunks)
  • contracts/package.json (2 hunks)
  • sdk/qrcode/package.json (1 hunks)
💤 Files with no reviewable changes (1)
  • .coderabbit.yaml
🔇 Additional comments (4)
sdk/qrcode/package.json (1)

103-103: Mocha bump looks fine; no functional impact on this workspace

Mocha is dev-only here and "test" is a no-op, so this bump is low risk and aligns with the PR goal of standardizing versions.

app/package.json (1)

162-162: Run workspace type-check — Corepack/Yarn mismatch blocked automated verification

I couldn't run the requested type-check in the sandbox: the repo's packageManager is [email protected] but the environment has Yarn 1.22.22. Please run the workspace type-check locally/CI and report results.

Commands you can run:

# recommended (enable Corepack)
corepack enable
corepack prepare [email protected] --activate
yarn workspace @selfxyz/mobile-app types

# one-liner
corepack enable && yarn workspace @selfxyz/mobile-app types

# alternative one-off without enabling Corepack
npx -y [email protected] workspace @selfxyz/mobile-app types

Quick context & what to check:

  • File: app/package.json (around line 162)
    "@types/react": "^18.3.4",
    
  • This is a types-only bump (no runtime impact). Verify CI/type-check for the mobile workspace with strict mode enabled — React 18.3's types tightened some JSX-related definitions and may introduce type errors in components. If errors appear, treat them as medium-priority fixes (adjust component prop typings or JSX intrinsic declarations).
circuits/package.json (1)

101-103: Action required — verify mocha/chai bump locally (Corepack/Yarn‑4 required) before merging

Quick summary: I inspected the repo — circuits/package.json has chai "^4.4.1", mocha "^10.7.3" and ts-mocha "^10.0.0" (test-base uses ts-mocha -n import=tsx). yarn.lock shows mocha resolved to 10.8.2 and ts-mocha 10.1.0. I could not run the workspace tests in the sandbox because the repo declares packageManager "[email protected]" but the environment had Yarn v1 (Corepack must be enabled).

Please verify the upgrade by running the tests locally and checking the areas below:

  • Files/locations to check

    • circuits/package.json — devDependencies: "chai": "^4.4.1", "mocha": "^10.7.3", "ts-mocha": "^10.0.0"; scripts.test-base uses ts-mocha (tsx import loader).
    • circuits/scripts/test-base & circuits/tests/**/*.test.ts — test runner invocation and test code (describe/it + chai assertions).
    • yarn.lock — mocha resolved to 10.8.2 and ts-mocha to 10.1.0 (confirm lockfile after installs).
  • Reproduction steps (run locally)

    1. Enable Corepack and confirm Yarn 4:
      • corepack enable
      • yarn -v (should be 4.x)
    2. Run the circuits tests (force reporter and a longer timeout):
      • yarn workspace @selfxyz/circuits test-base 'tests/**/*.test.ts' --exit -- --reporter spec --timeout 10000
    3. If failures persist, isolate mocha as the cause by temporarily pinning an earlier mocha:
      • yarn workspace @selfxyz/circuits add -D [email protected]
      • yarn workspace @selfxyz/circuits test
      • Then restore: yarn workspace @selfxyz/circuits add -D mocha@^10.7.3
  • What to look for

    • Timeouts or different test ordering/parallel behaviour (increase timeout or add --timeout in test-base if flaky).
    • Changed assertion formatting from chai/mocha that hides root cause.
    • Any ts-mocha + Node 22 ESM loader warnings/errors (try running with NODE_OPTIONS='--loader ts-node/esm' if you see ESM loader issues).

If you can run the above and paste failing test output (or confirm pinning mocha makes failures disappear), I’ll update the review with a concrete fix. I couldn’t complete the verification here because Corepack/Yarn mismatch prevented running tests in the sandbox.

contracts/package.json (1)

108-108: @types/jest bump is safe and scoped to typing only

No behavioral risk for contracts; proceed.

@transphorm transphorm merged commit d33e329 into dev Aug 15, 2025
26 of 27 checks passed
@transphorm transphorm deleted the codex/upgrade-test-tooling-and-type-definitions branch August 15, 2025 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants