Skip to content

docs(playbook): document how the sdks release actually publishes - #376

Open
codyborn wants to merge 1 commit into
mainfrom
playbook-sdk-release-step
Open

docs(playbook): document how the sdks release actually publishes#376
codyborn wants to merge 1 commit into
mainfrom
playbook-sdk-release-step

Conversation

@codyborn

@codyborn codyborn commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Documents how the sdks release actually publishes, so Phase 2 can't silently stall.

Why

Phase 2 said "Publish a standard @uniswap/uniswapx-sdk release" as a single bullet, which reads as one merge. It isn't necessarily.

The monorepo releases via changesets (.github/workflows/semantic-release.yaml). On every push to main the workflow picks its mode by asking one question — are there any .changeset/*.md files left?

changesets pending what happens
yes creates/updates the chore(sdks): Version Packages PR. Nothing is published.
no runs changeset publish — pushes every package whose package.json version isn't already on npm

So publishing needs both conditions in the same push to main: no pending changesets, and a package.json version npm doesn't have yet.

Two legitimate routes

  • Bot route (default) — your PR carries only a changeset. Merging it publishes nothing; merging the follow-up Version Packages PR is what publishes. Two merges, and the second is easy to forget because your PR is already green.
  • Self-contained route — your PR runs changeset version itself, so it carries the bumps, CHANGELOGs, and the changeset deletions. One merge, publishes directly.

And the ways to do half of either

  • Bumping package.json while leaving your changeset in place publishes nothing — the workflow stays in mode 1.
  • Taking the self-contained route while a Version Packages PR is open strands it: same bumps and CHANGELOG lines, so it goes conflicted, and merging it later can regress a package whose version has since moved on.
  • The self-contained route consumes every pending changeset, not just yours — so it publishes other people's packages too. Title it as the release it is; a release disguised as a one-line fix is a real review hazard.

Also in this PR

  • Phase 2's exit criterion is now npm view @uniswap/uniswapx-sdk version returning the new version, rather than "the PR merged".
  • The state diagram names the publishing step instead of a generic "publish a release".
  • New Correction G — why this blocks Phase 3 rather than merely delaying it. getPermit2, getReactor, and UniswapXOrderQuoter's constructor all throw MissingConfiguration for an unmapped chain, so wiring a chain into a service before the SDK publishes turns "chain unsupported" into "chain accepted, then 500s". Hence the rule it records: never split the chain-enum addition and the SDK bump across two PRs, because adding a chain to a request validator makes those requests reachable the moment it deploys.

Not included

§3.4 is separately stale for parameterization-api and will get its own PR: lib/config/chains.ts no longer exists (so "Correction C" is obsolete — lib/util/chains.ts is now the documented single source of truth), V3_BLOCK_BUFFER and getBlockTimeSecs no longer exist (block time moved to sdk-core's secondsToBlocks), and per-chain RPC_<chainId> env vars were replaced by a single RPC_PREFIX_URL.

🤖 Generated with Claude Code

@codyborn
codyborn force-pushed the playbook-sdk-release-step branch from 8eace14 to 9ddd0ef Compare August 13, 2026 17:17
Phase 2 said "Publish a standard @uniswap/uniswapx-sdk release" as a
single bullet, which reads as one merge. The sdks monorepo releases via
changesets (.github/workflows/semantic-release.yaml), and the workflow
picks its mode on every push to main by asking whether any .changeset/*.md
files remain:

  - changesets pending  -> only creates/updates the "Version Packages" PR
  - none pending        -> runs `changeset publish`, pushing every package
                           whose package.json version is not on npm yet

Publishing therefore needs both conditions in the same push: no pending
changesets AND a package.json version npm doesn't have. That admits two
routes, and §3.3 now documents both:

  - Bot route: PR carries only a changeset; merging the follow-up "Version
    Packages" PR is what publishes. Two merges.
  - Self-contained route: PR runs `changeset version` itself, so it carries
    the bumps, CHANGELOGs, and changeset deletions. One merge, publishes
    directly.

Plus the ways to do half of either and get nothing (or a mess): bumping
package.json while leaving the changeset pending publishes nothing; taking
the self-contained route while a Version Packages PR is open strands it as
conflicted and can regress a package whose version has since moved; and
the self-contained route consumes every pending changeset, so it publishes
other people's packages too and should be titled as the release it is.

Phase 2's exit criterion is now "npm view @uniswap/uniswapx-sdk version
returns the new version", not "the PR merged". The state diagram names the
publishing step. New Correction G covers why this blocks Phase 3 rather
than merely delaying it: getPermit2/getReactor and UniswapXOrderQuoter's
constructor throw MissingConfiguration for an unmapped chain, so wiring a
chain into a service before the SDK publishes turns "unsupported" into
"accepted, then 500s" -- hence never split the chain-enum addition and the
SDK bump across two PRs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codyborn
codyborn force-pushed the playbook-sdk-release-step branch from 9ddd0ef to cfa5df8 Compare August 13, 2026 17:51
@codyborn codyborn changed the title docs(playbook): make the SDK publish step explicit in Phase 2 docs(playbook): document how the sdks release actually publishes Aug 13, 2026
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.

1 participant