Skip to content

Add pnpm rpcspec and check built specfiles in pnpm check - #3210

Open
stellar-doxie[bot] wants to merge 1 commit into
mainfrom
docs-agent/3208-rpcspec-one-command
Open

stellar-doxie[bot] wants to merge 1 commit into
mainfrom
docs-agent/3208-rpcspec-one-command

Conversation

@stellar-doxie

@stellar-doxie stellar-doxie Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Automated message from Doxie.

Closes #3208

Working this because @ElliotFriend added bot:take. This adds pnpm rpcspec for spec edits and makes pnpm check catch a stale specfile.

Changes

  • package.json: new rpcspec script, pnpm rpcspec:validate && pnpm rpcspec:docs. rpcspec:validate already builds, so there is no separate build step.
  • openrpc/scripts/build.mjs: new --check mode. It builds in memory, compares with the committed *.openrpc.json files, prints the stale ones, and exits 1. It writes no file.
  • rpcspec:check now runs build.mjs --check && docs.mjs --check, and pnpm check runs rpcspec:check in place of rpcspec:docs --check. CI and pnpm check now run the same check.
  • docs.mjs: the stale-page hint now says pnpm rpcspec.
  • Docs that list the steps now use pnpm rpcspec: openrpc/README.md, CONTRIBUTING.md, MIGRATING.md, docs/platforms/anchor-platform/CONTRIBUTING.md. The pnpm check comments in both CONTRIBUTING files and README.md now name the OpenRPC check.

Why a --check mode and not git diff in pnpm check: git diff compares the working tree with the index. Right after a correct pnpm rpcspec, the rebuilt specfiles are unstaged, so pnpm check would fail until you git add. The old rpcspec:check also wrote files, and pnpm check should not.

Why this matters

A spec edit took three commands in order. Skipping one left specfiles or pages stale, and pnpm check passed on a stale specfile, so only CI caught it.

Sweep

Searched the repo for rpcspec (excluding meetings/ and the lockfile).

Verified

On a scratch edit to openrpc/src/stellar-rpc/methods/getHealth.json (reverted before commit):

  • Clean tree: pnpm rpcspec:check passes and writes nothing.
  • Source edited, not built: pnpm rpcspec:check fails with out of date: ./stellar-rpc.openrpc.json. The old pnpm rpcspec:docs --check passed in the same state.
  • pnpm rpcspec built, validated, and updated getHealth.mdx and stellar-rpc.openrpc.json.
  • Then pnpm rpcspec:check passed with those files unstaged.
  • pnpm install --frozen-lockfile, pnpm format:mdx, and pnpm check (including check:links) pass on the branch.
  • The CI checks job passes at a4d7763, including the new pnpm rpcspec:check step.

Not verified

  • Prettier on the root Markdown files. CI does not check them, and the bot's sandbox cannot run prettier on them directly. Line widths match the existing wrapping.

Overlaps

pnpm rpcspec builds, validates, and regenerates the method pages in one step. build.mjs gains a --check mode that builds in memory and fails on a stale committed specfile without writing, and rpcspec:check (run by pnpm check and CI) uses it, so a stale specfile shows up locally too.
@mintlify

mintlify Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
stellar-docs 🟢 Ready View Preview Nov 25, 2026, 6:22 PM

@stellar-doxie

stellar-doxie Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from Doxie.

Reviewing my own PR, opened for #3208 after @ElliotFriend added bot:take.

This PR changes the command the CI checks job runs (pnpm rpcspec:check), so a maintainer signs off. @kaankacar @ElliotFriend
It conflicts with #3137 on the package.json check line. If #3137 merges first, I merge main here.

Blocked: security.

What I checked
  • My diff-first review matched the PR body. No claim in the body went unconfirmed.
  • build.mjs --check compares the same three tracked specfiles that the old git diff --exit-code -- "*.openrpc.json" covered: stellar-rpc.openrpc.json and stellar-rpc-beta.openrpc.json (repo root), and the Anchor Platform copy. .gitignore:29 ignores openrpc/*openrpc.json.
  • The comparison is byte-exact with what the write path produces. CI checks at a4d7763 ran build.mjs --check && docs.mjs --check and passed (job 139417821089).
  • docs.mjs reads the committed specs (docs.mjs:22,27,32), so the check writes nothing. A missing specfile now counts as stale.
  • pnpm rpcspec runs build, validate, then docs, in that order. validate.mjs reads the files the build writes.
  • Sweep: rpcspec across the repo. The only stale copy is .claude/skills/update-sdk-examples/SKILL.md:170-171, 215-216, tracked in update-sdk-examples skill: regenerate the RPC method pages after an OpenRPC example edit #3209 (open). This lane cannot read or edit .claude/.
  • git merge-tree with the Flag relative and .mdx internal links on changed lines #3137 head: one conflict, in package.json.
  • Not run in this lane: the stale-spec negative test (node is refused here). The PR body reports that the issue lane ran it.
  • No stellar CLI or SDK is involved, so no tool versions apply. All checks are green at the head.

This branch was successfully deployed

1 active deployment
staging — a4d77632 Deployed Nov 25, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:blocked-security Security-surface change; a human must review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundle the rpcspec scripts into one command for spec edits

0 participants