Skip to content

feat: use mb-stack#116

Merged
Dodecahedr0x merged 2 commits into
mainfrom
dode/simplify-setup
Jul 9, 2026
Merged

feat: use mb-stack#116
Dodecahedr0x merged 2 commits into
mainfrom
dode/simplify-setup

Conversation

@Dodecahedr0x

@Dodecahedr0x Dodecahedr0x commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Improved test reliability for local and remote environments by handling wallet setup and funding more safely.
    • Made authenticated connections more tolerant of missing auth tokens.
  • Chores

    • Simplified local test startup by using a single stack process and added clearer readiness checks and failure logs.
    • Streamlined cleanup so local test runs shut down more consistently.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Dodecahedr0x, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 82db65bd-4e15-4d55-80be-e1cf8fa17a86

📥 Commits

Reviewing files that changed from the base of the PR and between 4cc7bcd and 687f8d4.

📒 Files selected for processing (1)
  • private-counter/pinocchio/tests/pinocchio-private-counter.test.ts

Walkthrough

This PR updates the Pinocchio private-counter test to conditionally generate and fund an ephemeral keypair for local runs, tolerate missing TEE auth tokens, and refactors test-locally.sh to start and manage a single supervised mb-stack process instead of separate validator/service processes.

Changes

Private-counter local test funding

Layer / File(s) Summary
Local vs remote keypair and TEE token handling
private-counter/pinocchio/tests/pinocchio-private-counter.test.ts
Adds isLocal detection derived from PROVIDER_ENDPOINT to generate a fresh keypair locally (funded via airdrop in beforeAll) or load from PRIVATE_KEY/default file otherwise; uses optional chaining for the unauthorized TEE auth token when building connection URLs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

mb-stack orchestration refactor

Layer / File(s) Summary
mb-stack startup, readiness polling, and cleanup
scripts/test-locally.sh
Replaces individual mb-test-validator, ephemeral-validator, and QFS startup with a single mb-stack process tracked via MB_STACK_PID, polling mb-stack.log for readiness with timeout/error handling, and updating cleanup() to terminate the stack via SIGTERM/SIGKILL.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: switching local setup to use mb-stack.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dode/simplify-setup

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@private-counter/pinocchio/tests/pinocchio-private-counter.test.ts`:
- Around line 55-62: The local keypair setup eagerly reads the fallback file
before the isLocal branch is applied, so local runs can still crash in the test
setup. Update the userKeypair initialization in
pinocchio-private-counter.test.ts so the fs.readFileSync call only happens in
the non-local path, and keep Keypair.generate() as the only path used when
isLocal is true; use the existing isLocal, KEYPAIR, and userKeypair symbols to
locate the fix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 45eb6396-547e-4406-95db-43f358afa5d3

📥 Commits

Reviewing files that changed from the base of the PR and between 13b561f and 4cc7bcd.

📒 Files selected for processing (2)
  • private-counter/pinocchio/tests/pinocchio-private-counter.test.ts
  • scripts/test-locally.sh

Comment thread private-counter/pinocchio/tests/pinocchio-private-counter.test.ts Outdated
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
binary-prediction-demo Ready Ready Preview, Comment Jul 9, 2026 8:40pm
counter-session-keys Ready Ready Preview, Comment Jul 9, 2026 8:40pm
er-rolldice Ready Ready Preview, Comment Jul 9, 2026 8:40pm
magicblock-counter-example Ready Ready Preview, Comment Jul 9, 2026 8:40pm
magicblock-engine-examples Ready Ready Preview, Comment Jul 9, 2026 8:40pm
magicblock-rewards-dashboard Ready Ready Preview, Comment Jul 9, 2026 8:40pm
rps-example Ready Ready Preview, Comment Jul 9, 2026 8:40pm
spl-tokens Ready Ready Preview, Comment Jul 9, 2026 8:40pm

Request Review

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.

1 participant