Repository navigation
Conversation
…chain ACP decrypts FhenixProtocol#409 made decryptForView and decryptForTx refuse an ACP signed for a different chain than the builder's. Two React tests decrypt on a second chain id over the same Anvil using an ACP signed for the first, so on master they now wait out their 90 s timeout with a ChainIdMismatch error on screen, and Matrix (Hardhat Mock) has failed since FhenixProtocol#409. Assert that error instead: the decrypt is still built for the pinned chain and resolves the pinned slot's ACP, the second chain still gets its own cache entry, and it never shows the first chain's plaintext.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Matrix (Hardhat Mock) has failed on every master push since #409 (first red run at 800cdb3, still red at 5b3e61c). The same two React tests time out after 90 s:
react-read-contracts.web.test.tsx› decryption follows the read's chain: decrypted with the pinned chain's ACPreact-decrypt-chain-key.web.test.tsx› the same ctHash decrypted on two chains is two cache entries, each keyed by its chainBoth play "another chain" as a second chain id (31338) over the same Anvil, and register the ACP signed on 31337 under the 31338 slot. Since #409 the decrypt builders refuse that ACP before anything is sent:
so the value the tests wait for never arrives. What they asserted (the pinned chain's decrypt succeeds with an ACP signed for another chain) is what #409 now rejects on purpose.
Change
Tests only. Each test now asserts the fail-fast and keeps what it was written to check:
No changeset:
@cofhe/integration-matrixis private.Verification
I reproduced the Matrix (Hardhat Mock) job (same setup steps and versions,
MATRIX_CHAIN=hardhat) on my fork's runners:prettier --checkpasses on the changed files. Matrix (Hardhat Mock) does not run for PRs from forks, so its result shows again on master after merge.Note
Low Risk
Test-only changes with no production code; they align CI with intentional decrypt builder validation from #409.
Overview
Updates two React integration tests that were timing out after #409 started fail-fast rejecting decrypts when the builder’s
chainIddoes not match the ACP’s signed chain.In
react-decrypt-chain-key.web.test.tsx, chain B no longer expects plaintext42; it asserts the mismatch error, an empty value, and still two per-chain decrypt cache entries. The helper renders a dedicated error output, and the file comment documents that a chain-A ACP in chain B’s slot is refused before network I/O.In
react-read-contracts.web.test.tsx, the pinned-chain decrypt test is retitled and now expects the same builder vs ACP chainId error and no decrypted value, with a comment that the old behavior silently decrypted on the connected chain.Reviewed by Cursor Bugbot for commit 1d08b55. Bugbot is set up for automated code reviews on this repo. Configure here.