test: apply PR #620 simulator-migration review feedback - #631
Merged
Conversation
Apply CodeRabbit + Andrew feedback on the async simulator migration. * Replace redundant `await expect(x).resolves.not.toThrow()` with a plain `await x`. The matcher is vacuous on a resolving promise (the `.resolves` modifier already fails the test on rejection), so awaiting the circuit directly carries the same "does not throw" intent with less ceremony. Andrew suggested dropping the wrapper. * Assert resolved values where the call returns data: MultiToken `balanceOf` is `0n` post-init, and ZOwnablePK `_computeOwnerId` returns 32 bytes. * Pass `newIdHash` (the new owner id) to `transferOwnership` instead of the commitment, so the id-to-commitment path and the counter-bump case are actually exercised. Refs: #620
* Pin proof-server to 8.0.3 and indexer-standalone to 4.0.1, the validated combo for midnight-node 0.22.2. `latest` drifts onto the Cardano-bridge indexer line, whose config wants an unset `infra.spo_node.blockfrost_id` and crash-loops on boot. * `make env-up` now runs `docker compose up -d --wait` so it blocks until the proof-server, indexer, and node healthchecks pass instead of returning mid-startup. `yarn test:live` straight after env-up was racing the stack and failing intermittently. Refs: #620
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
WalkthroughThis PR changes multiple contract tests to use direct awaited success calls instead of ChangesAssertion updates across contract tests
Local environment updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
pepebndc
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of changes
Follow-up to #620. Applies the CodeRabbit + Andrew review feedback that
landed after #620 was merged.
Applied
resolves.not.toThrow()matcher across the accessand token unit specs (54 sites). On a resolving promise the matcher is
vacuous (
.resolvesalready fails the test on rejection), so the callsare now a plain
await, which is what Andrew suggested.balanceOfis0nafter init, and ZOwnablePK_computeOwnerIdreturns32 bytes.
transferOwnershipnow receivesnewIdHash(the new owner id) ratherthan the commitment, so the id-to-commitment path and the counter-bump
case are actually exercised.
proof-server:8.0.3andindexer-standalone:4.0.1, the validated combo formidnight-node:0.22.2.latestdrifts onto the Cardano-bridge indexer line, which crash-loops onboot against this stack.
make env-upwaits for health (docker compose up -d --wait), soyarn test:livestraight after env-up no longer races the stack duringstartup.
Not applied (with reason)
await this.setPrivateState(...)in the threeinjectSecretKeyhelpers.setPrivateStateis synchronous (: void) in@openzeppelin/compact-simulator@0.2.0, so there is no promise to awaitand no race. Awaiting it would await
undefinedand falsely implyasynchrony.
commandinto['midnight-proof-server', '-v'].The image
ENTRYPOINTisbash -c, so['midnight-proof-server -v']isparsed correctly. Splitting would push
-vinto$0and silently drop theverbose flag.
src/archive/. Deferred to feat(token): add native shielded token standardMIP-0011#621, which replaces it with thefinal feature (agreed in review).
PR Checklist
Further comments
Local validation was limited to
tsc --noEmit(green) in this environment;the dry unit suite (
yarn test) runs in CI.Summary by CodeRabbit
Bug Fixes
Tests