fix: missing active preset json artifact for template#1558
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCI now uploads hidden files and explicitly includes circuits/bin/.active-preset.json in SDK artifacts; the template integration step verifies the file. SDK code now computes the active preset path by locating the package root. Localhost deployment templates and enclave config have updated addresses and deploy_block values. ChangesCI artifact and template updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/enclave-sdk/src/circuits/assert-micro-circuits.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 @.github/workflows/ci.yml:
- Line 1160: Update the CI job so missing circuits/bin/.active-preset.json
causes a hard failure: in the artifact upload step change if-no-files-found from
"warn" to "error", and replace the verification command `ls -la
circuits/bin/.active-preset.json || echo "circuit preset stamp not found"` with
a failing check such as `test -f circuits/bin/.active-preset.json || (echo
"ERROR: circuit preset stamp not found" && exit 1)` so the job fails when the
stamp is absent; ensure both the upload configuration and the verification
command are updated consistently.
- Line 1039: The CI currently permits missing circuits/bin/.active-preset.json;
update .github/workflows/ci.yml so the artifact upload step that lists
circuits/bin/.active-preset.json does not use if-no-files-found: warn (make it
fail on missing files), and make the later download/verification step fail the
job when .active-preset.json is not present (remove any
continue-on-error/optional flags or set an explicit failure on missing
artifact). This ensures the output produced by scripts/build-circuits.ts is
required and that scripts/generate-verifiers.ts (when run in CI) will not
proceed without the .active-preset.json artifact.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4785cf62-ec20-4f8d-b258-4a756ddba06b
📒 Files selected for processing (1)
.github/workflows/ci.yml
There was a problem hiding this comment.
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 `@templates/default/enclave.config.yaml`:
- Around line 23-25: The YAML contains a duplicated contract key "e3_program"
under the "contracts" mapping which causes ambiguous semantics and lint
failures; remove the duplicate entry so "contracts" contains a single
"e3_program" mapping (keep the correct address/deploy_block from the intended
entry) and ensure there is only one "e3_program" key in
templates/default/enclave.config.yaml so the "contracts" mapping is unique and
valid.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a628fa44-f9fe-4d2c-8c51-dbaddfb04a8e
📒 Files selected for processing (3)
.github/workflows/ci.ymltemplates/default/deployed_contracts.jsontemplates/default/enclave.config.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ci.yml
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/enclave-sdk/src/circuits/assert-micro-circuits.ts (1)
29-29: 💤 Low valueConsider using a distinct error code for package root lookup failure.
Both line 29 (can't find package root) and line 51 (can't read preset file) throw
SDK_CIRCUIT_STAMP_MISSING. While the error messages clearly distinguish the scenarios, using different codes (e.g.,SDK_PACKAGE_ROOT_NOT_FOUNDfor line 29) would make programmatic error handling and log filtering easier.🤖 Prompt for 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. In `@packages/enclave-sdk/src/circuits/assert-micro-circuits.ts` at line 29, The throw in assert-micro-circuits.ts that constructs SDKError('Could not locate SDK package root', 'SDK_CIRCUIT_STAMP_MISSING') should use a distinct error code (e.g., 'SDK_PACKAGE_ROOT_NOT_FOUND') so it is distinguishable from the preset-file read error which keeps 'SDK_CIRCUIT_STAMP_MISSING'; update the SDKError instantiation at that location to use the new code while leaving the message intact and do not change the throw at the preset-file read site.
🤖 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 `@packages/enclave-sdk/src/circuits/assert-micro-circuits.ts`:
- Around line 16-30: findActivePath currently always resolves
../../circuits/bin/.active-preset.json relative to the package root which
escapes node_modules for external consumers; update findActivePath to first look
for a bundled preset inside the package (e.g., resolve(dir,
'./.active-preset.json' or in dist) and return that if exists, and only if not
running from node_modules (detect via dir.includes('node_modules') or similar)
fall back to the monorepo path resolve(dir,
'../../circuits/bin/.active-preset.json'); if neither path exists, throw the
existing SDKError('Could not locate SDK package
root','SDK_CIRCUIT_STAMP_MISSING'). Ensure changes are made inside the
findActivePath function and reference the '.active-preset.json' filename and
SDKError symbol.
---
Nitpick comments:
In `@packages/enclave-sdk/src/circuits/assert-micro-circuits.ts`:
- Line 29: The throw in assert-micro-circuits.ts that constructs SDKError('Could
not locate SDK package root', 'SDK_CIRCUIT_STAMP_MISSING') should use a distinct
error code (e.g., 'SDK_PACKAGE_ROOT_NOT_FOUND') so it is distinguishable from
the preset-file read error which keeps 'SDK_CIRCUIT_STAMP_MISSING'; update the
SDKError instantiation at that location to use the new code while leaving the
message intact and do not change the throw at the preset-file read site.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fe6777e4-ecbe-45ab-b86e-cefddbc61131
📒 Files selected for processing (2)
packages/enclave-sdk/src/circuits/assert-micro-circuits.tstemplates/default/enclave.config.yaml
💤 Files with no reviewable changes (1)
- templates/default/enclave.config.yaml
|
Actionable comments posted: 0 |
Summary by CodeRabbit
Chores
Bug Fixes