Skip to content

chore: fix main CI (watchBlocks polling tests, size limits) - #5287

Merged
jxom merged 1 commit into
mainfrom
jxom/optimistic-brahmagupta-d9b3ek
Oct 24, 2026
Merged

jxom merged 1 commit into
mainfrom
jxom/optimistic-brahmagupta-d9b3ek

Conversation

@jxom

@jxom jxom commented Oct 24, 2026

Copy link
Copy Markdown
Member

Main is red in two Verify jobs (run).

Build (pnpm size). The ox/Base64 import in getEnsAvatar (#5250) puts three bundles over their limits. This PR raises each limit by 1 kB:

Entry Size Limit
import * from 'viem' (esm) 87.27 kB 87 → 88 kB
import * from 'viem/ens' 53.22 kB 53 → 54 kB
import { getEnsAvatar } from 'viem/ens' 28.53 kB 28 → 29 kB

Test Local (shard 2/3). The watchBlocks poll tests start a 100 ms watcher and mine immediately. With a cold fork cache, anvil_mine on the Prague fork takes about 140 ms. The first poll then emits the block from before the mine, so each test counts one extra block (expected 3 to be 2). The tests now await the first emission before they mine, and await each expected emission, as watchBlockNumber.test.ts does since #5149.

Validation: before this change, watchBlocks.test.ts failed 6 tests on every cold-cache run (rm -rf ~/.foundry/cache/rpc). After it, the file passes 25/25 on 4 cold-cache runs and 1 warm run. pnpm build && pnpm size, pnpm check:types and Biome also pass.


Generated by Claude Code

The `watchBlocks` poll tests started a 100 ms watcher and mined at once.
With a cold fork cache, `anvil_mine` takes about 140 ms on the Prague
fork, so the first poll emitted the block before the mine and each test
counted one extra block. The tests now await the initial emission before
mining and await each expected emission, as `watchBlockNumber.test.ts`
does.

The `ox/Base64` import in `getEnsAvatar` raised the `viem` (esm),
`viem/ens`, and `getEnsAvatar` bundles past their size limits, so each
limit is 1 kB higher.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TLEH3v3NQjkUUYkUybAsMc
@changeset-bot

changeset-bot Bot commented Oct 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6567e93

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Oct 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
viem Building Building Preview Oct 24, 2026 4:16am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T04:18:58.785180Z 6567e93 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jxom
jxom merged commit c0a3f34 into main Oct 24, 2026
33 of 34 checks passed
@jxom
jxom deleted the jxom/optimistic-brahmagupta-d9b3ek branch October 24, 2026 04:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6567e93630

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +41 to +42
onTestFinished(unwatch)
await expect.poll(() => blocks.length).toBe(1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Separate setup from polling execution

Add a blank line after onTestFinished(unwatch) before awaiting the initial observation; the newly added setup and execution statements currently run together, contrary to the repository’s requirement that test phases remain visually distinct. The same separation should be applied to the other polling sequences introduced in this file.

AGENTS.md reference: AGENTS.md:L147-L149

Useful? React with 👍 / 👎.

jxom pushed a commit that referenced this pull request Oct 24, 2026
The changes since #5287, mainly replacement detection in
`waitForTransactionReceipt` and the `http` retry and batch fixes, raised
the `viem` (cjs) bundle to 113.32 kB and the `viem/actions` bundle to
69.05 kB. Each limit is 1 kB higher.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LkZRLt8FTdJWJ9jPvEoSEF

This branch was successfully deployed

1 active deployment
Preview — 6567e936 Deployed Oct 24, 2026 by vercel[bot]
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.

2 participants