Skip to content

fix: small changes to aid crisp e2e test to run locally#926

Merged
ryardley merged 1 commit into
devfrom
ry/fix-yq-rwa-mode-bug
Oct 29, 2025
Merged

fix: small changes to aid crisp e2e test to run locally#926
ryardley merged 1 commit into
devfrom
ry/fix-yq-rwa-mode-bug

Conversation

@ryardley

@ryardley ryardley commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

A couple of small changes I needed to make to run the CRISP e2e test locally.

So I was trying to get CRISP e2e test running locally.

I had an older python version of yq installed which caused me grief because the -r flag was not present for some reason. I have updated but adding the -r flag solved the issue and is compatible with the new version as otherwise I was getting double quotes getting sent through to the hardhat scripts which broke stuff.

'"0x123456"'

So it seems to make sense to me to keep the -r flag as it is simply the default in the latest go version of yq so we can be compatible with both.

❯ yq --version
yq 3.4.3

Secondly concurrently was not available when running the scripts outside of pnpm so it helps to run it through pnpm so I added that too.

Summary by CodeRabbit

  • Chores

    • Updated development script invocation to use package manager.
  • Bug Fixes

    • Fixed output parsing for cipher node address configuration.
  • New Features

    • Expanded cipher node setup to support additional nodes.

@vercel

vercel Bot commented Oct 29, 2025

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
crisp Skipped Skipped Oct 29, 2025 1:53am
enclave-docs Skipped Skipped Oct 29, 2025 1:53am

@coderabbitai

coderabbitai Bot commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Two development scripts in the CRISP examples are updated. The dev.sh script now invokes concurrently through pnpm. The dev_cipher.sh script modifies address parsing to output raw values and expands cipher node setup for multiple nodes (CN2 and CN3 alongside CN1).

Changes

Cohort / File(s) Summary
Command invocation update
examples/CRISP/scripts/dev.sh
Replaces concurrently with pnpm concurrently to invoke the tool through pnpm package manager
Parsing and node setup expansion
examples/CRISP/scripts/dev_cipher.sh
Changes yq parsing from .nodes.*.address to -r .nodes.*.address for raw output formatting; expands cipher node setup logic to configure CN2 and CN3 nodes in addition to CN1

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Review the yq parameter change (-r flag) to confirm it correctly produces raw, unquoted output as intended
  • Verify the expanded node setup logic for CN2 and CN3 maintains consistency with CN1 configuration pattern
  • Confirm pnpm concurrently invocation behaves identically to direct concurrently command

Possibly related PRs

  • gnosisguild/enclave#829: Related modifications to CRISP scripts including renaming and updating references to dev_cipher.sh in package.json scripts

Suggested reviewers

  • 0xjei
  • ctrlc03
  • cedoor

Poem

🐰 A script that once ran one cipher node,
Now spins up a trio with pnpm's grace,
Raw addresses parsed, no quotes in the way,
CN1, CN2, CN3—a harmonious race!

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 pull request title "fix: small changes to aid crisp e2e test to run locally" is directly related to the main objectives of the changeset. The two modifications—adding the -r flag to the yq command to avoid double-quoted output and updating the script invocation to use pnpm for concurrently availability—are specifically intended to resolve issues preventing the CRISP end-to-end test from running locally. The title accurately summarizes the purpose of the changes while maintaining conciseness, and the prefix "fix:" appropriately indicates the nature of the modifications as bug fixes or adjustments.
✨ 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 ry/fix-yq-rwa-mode-bug

📜 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 6b88a86 and f5ca4b7.

📒 Files selected for processing (2)
  • examples/CRISP/scripts/dev.sh (1 hunks)
  • examples/CRISP/scripts/dev_cipher.sh (1 hunks)
🔇 Additional comments (3)
examples/CRISP/scripts/dev_cipher.sh (2)

18-20: Correct yq output formatting to use raw unquoted strings.

The -r flag ensures yq outputs raw unquoted values instead of JSON-formatted strings. This prevents double-quoted strings (e.g., "0x123456") from being passed to hardhat scripts. The fix is compatible with both older Python-based and newer Go-based yq versions.


23-25: Verify config always includes all three cipher nodes.

The script assumes .nodes.cn1, .nodes.cn2, and .nodes.cn3 keys exist in the YAML config. If any node is missing, the corresponding variable will be empty, causing the downstream pnpm ciphernode:add command to fail with a potentially unclear error message.

For a development script, consider whether explicit validation is warranted:

# Optional: add validation after lines 20
if [[ -z "$CN1" ]] || [[ -z "$CN2" ]] || [[ -z "$CN3" ]]; then
  echo "Error: Missing node addresses in enclave.config.yaml"
  exit 1
fi

Is it guaranteed that the generated enclave.config.yaml always includes all three cipher nodes (cn1, cn2, cn3)?

examples/CRISP/scripts/dev.sh (1)

32-37: Ensure concurrently tool is available through pnpm.

Invoking concurrently through pnpm ensures the tool is resolved correctly even when scripts are run outside a pnpm context. This is a simple, straightforward fix that maintains the same command structure and arguments.


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.

@ryardley ryardley changed the title fix: allow crisp scripts to run locally fix: small changes to aid crisp e2e test to run locally Oct 29, 2025
@ryardley ryardley marked this pull request as ready for review October 29, 2025 13:20
@ryardley ryardley requested review from cedoor and ctrlc03 October 29, 2025 13:20
@ryardley ryardley added bug Something isn't working chore Something we just need to do for organization labels Oct 29, 2025

@cedoor cedoor 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.

LGTM 👍🏽

@ryardley ryardley merged commit 92ff34e into dev Oct 29, 2025
27 checks passed
@github-actions github-actions Bot deleted the ry/fix-yq-rwa-mode-bug branch November 6, 2025 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working chore Something we just need to do for organization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants