Skip to content

[CI verify] chore(paywall): regenerate bundle + add recurrence guard#2

Open
ryanRfox wants to merge 1 commit intomainfrom
chore/paywall-regen-and-recurrence-guard
Open

[CI verify] chore(paywall): regenerate bundle + add recurrence guard#2
ryanRfox wants to merge 1 commit intomainfrom
chore/paywall-regen-and-recurrence-guard

Conversation

@ryanRfox
Copy link
Copy Markdown
Owner

This is a fork-internal PR for CI verification only. Do not merge.

Opened against ryanRfox/x402:main (not upstream) to verify the new
check_paywall_template.yml workflow executes successfully in GitHub
Actions before the real PR is opened against x402-foundation/x402.

Once the workflow run here shows green, this PR can be closed and the
upstream PR opened against x402-foundation/x402:main with the full
PR description body.

Expected workflow runs on this PR:

  • Check Paywall Template (new, from this PR)
  • existing upstream-mirrored checks (check_format, check_lint, check_go,
    check_python, check_package_lock)

@ryanRfox
Copy link
Copy Markdown
Owner Author

Closing to force recompute after fork-main sync. Will reopen.

@ryanRfox ryanRfox closed this Apr 16, 2026
@ryanRfox ryanRfox reopened this Apr 16, 2026
@ryanRfox ryanRfox force-pushed the chore/paywall-regen-and-recurrence-guard branch 3 times, most recently from 160e1aa to 5068350 Compare April 16, 2026 22:33
The committed @x402/paywall bundle on main was last generated against an
older viem than the lockfile currently pins. pnpm install --frozen-lockfile
resolves viem 2.47.12 (via x402-foundation#2013), but the bundled src/evm/gen/template.ts
(and its Python + Go siblings) were built against an earlier resolution
that pre-dated chain definitions for Mezo, MegaETH, Stable, Radius (each
with a testnet variant), and 33 others. EvmPaywall.tsx throws
"Unsupported chain ID" at init for any eip155:<id> whose chain isn't in
the bundled viem/chains.

This PR:
  1. Regenerates all nine auto-generated template files (TypeScript,
     Python, and Go for EVM/SVM/AVM) against the current lockfile. No
     source changes on any runtime path.
  2. Teaches build:paywall to emit output matching the repo's formatters
     (prettier / ruff), so generated files stay clean under pnpm run
     format + uvx ruff format.
  3. Adds a PR-time drift check
     (.github/workflows/check_paywall_template.yml) so a future lockfile
     or @x402/evm change that invalidates the bundle fails loudly
     instead of shipping silently.

Scope is limited to @x402/paywall because it is the only package in this
repo that bakes viem chain definitions into a built artifact.

Verified on a fork-internal test PR running on ubuntu-latest
(Node 24, pnpm 10.7.0): check_format, check_lint, check_go, check_python,
check_package_lock, and the new check_paywall_template drift check all
pass. Additional local evidence:

  - Chain-presence in regenerated bundle: Mezo 31612/31611, MegaETH
    4326/6343, Stable 988/2201, Radius 723487/72344, Base/Arbitrum/
    Polygon all present (mainnet/testnet ordering).
  - Cross-platform determinism: a clean-slate rebuild on macOS produces
    byte-identical output to ubuntu-latest CI.
  - Tarball install into a throwaway consumer: all expected chain IDs
    present in the published dist/esm/evm/index.js.
  - Browser smoke test (Chrome, served from a local HTTP server):
    EvmPaywall mounts without Unsupported-chain throw for
    eip155:31611 (Mezo Testnet) and eip155:723487 (Radius); DOM
    renders the expected token/chain labels.

Fixes x402-foundation#1971.
@ryanRfox ryanRfox force-pushed the chore/paywall-regen-and-recurrence-guard branch from 5068350 to 2c1fbb6 Compare April 16, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant