Repository navigation
Add pnpm rpcspec and check built specfiles in pnpm check - #3210
Open
stellar-doxie[bot] wants to merge 1 commit into
Open
stellar-doxie[bot] wants to merge 1 commit into
stellar-doxie[bot] wants to merge 1 commit into
Conversation
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.
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
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 Blocked: security. What I checked
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated message from Doxie.
Closes #3208
Working this because @ElliotFriend added bot:take. This adds
pnpm rpcspecfor spec edits and makespnpm checkcatch a stale specfile.Changes
package.json: newrpcspecscript,pnpm rpcspec:validate && pnpm rpcspec:docs.rpcspec:validatealready builds, so there is no separate build step.openrpc/scripts/build.mjs: new--checkmode. It builds in memory, compares with the committed*.openrpc.jsonfiles, prints the stale ones, and exits 1. It writes no file.rpcspec:checknow runsbuild.mjs --check && docs.mjs --check, andpnpm checkrunsrpcspec:checkin place ofrpcspec:docs --check. CI andpnpm checknow run the same check.docs.mjs: the stale-page hint now sayspnpm rpcspec.pnpm rpcspec:openrpc/README.md,CONTRIBUTING.md,MIGRATING.md,docs/platforms/anchor-platform/CONTRIBUTING.md. Thepnpm checkcomments in both CONTRIBUTING files andREADME.mdnow name the OpenRPC check.Why a
--checkmode and notgit diffinpnpm check:git diffcompares the working tree with the index. Right after a correctpnpm rpcspec, the rebuilt specfiles are unstaged, sopnpm checkwould fail until yougit add. The oldrpcspec:checkalso wrote files, andpnpm checkshould not.Why this matters
A spec edit took three commands in order. Skipping one left specfiles or pages stale, and
pnpm checkpassed on a stale specfile, so only CI caught it.Sweep
Searched the repo for
rpcspec(excludingmeetings/and the lockfile).docs.mjs..claude/skills/update-sdk-examples/SKILL.md:170-171, 215-216namesrpcspec:buildandrpcspec:validatebut notrpcspec:docs. The bot cannot read or edit.claude/. Follow-up: update-sdk-examples skill: regenerate the RPC method pages after an OpenRPC example edit #3209.docs.mjs:10anddocs.mjs:341say "Runpnpm rpcspec:buildfirst". That is still true for that script.Verified
On a scratch edit to
openrpc/src/stellar-rpc/methods/getHealth.json(reverted before commit):pnpm rpcspec:checkpasses and writes nothing.pnpm rpcspec:checkfails without of date: ./stellar-rpc.openrpc.json. The oldpnpm rpcspec:docs --checkpassed in the same state.pnpm rpcspecbuilt, validated, and updatedgetHealth.mdxandstellar-rpc.openrpc.json.pnpm rpcspec:checkpassed with those files unstaged.pnpm install --frozen-lockfile,pnpm format:mdx, andpnpm check(includingcheck:links) pass on the branch.checksjob passes at a4d7763, including the newpnpm rpcspec:checkstep.Not verified
Overlaps
check:link-styleline next to thecheckline inpackage.json. The two edits are on adjacent lines, so the second to merge likely needs a rebase. Flag relative and .mdx internal links on changed lines #3137 also editsCONTRIBUTING.mdlines 62 and 73. This PR edits lines 58 and 125.CONTRIBUTING.mdline 73. No overlap with this PR's lines.