Skip to content

fix(examples): regenerate stale index.js to unblock the Examples drift check on main - #578

Merged
tonyboylehub merged 1 commit into
mainfrom
tonyboyle/fix-examples-drift-main
Oct 1, 2026
Merged

tonyboylehub merged 1 commit into
mainfrom
tonyboyle/fix-examples-drift-main

Conversation

@tonyboylehub

Copy link
Copy Markdown
Contributor

Why

The Examples drift workflow is failing on main, and every open PR that runs it inherits the failure. It regenerates src/examples/**/index.js with build-examples and fails if the result differs from what is committed.

The two files that differ are src/examples/core/create-asset/index.js and src/examples/token-metadata/fungibles/create/index.js. Their CLI source files already contain changes that the committed index.js does not reflect.

What

Ran node scripts/build-examples.js on current main and committed the result. Only those two generated files change (2 lines, 1 per file), and both changes are generated output of source already on main:

  • core/create-asset: --json becomes --offchain in the files example, and a vanity asset address example is added.
  • token-metadata/fungibles/create: adds a vanity mint address example.

No source files and no docs pages are edited.

Why a reviewer is needed

You wrote #542 and the CLI example changes, so you are best placed to confirm two things:

  1. That --offchain is the intended flag for mplx core asset create --files, and that the vanity examples (--mint-keypair) should ship. The regenerated output publishes them as they are in the sources.
  2. That regenerating, rather than reverting the source changes, is the right fix.

Merging this is also what unblocks the checks on #562, #563 and #572, so a quick review helps those PRs too.

Verification

  • After regenerating, git diff shows only the two files above.
  • Re-running the build-examples step on this branch produces no further diff, which is what the Examples drift check asserts.
  • I did not run pnpm run build; this changes generated example data only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NNz9JwDB9mhCzMU4Xbs45F


Generated by Claude Code

…ngibles/create

The Examples drift check has failed on main since #542. The CLI source
files for these two examples were updated without regenerating their
generated index.js, so CI's build-examples run produces a diff. Ran
node scripts/build-examples.js; only these two files change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NNz9JwDB9mhCzMU4Xbs45F
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
developer-hub Ready Ready Preview Oct 1, 2026 8:35pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
CLAUDE.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 9a62e8fd-8afa-4dd1-bc90-be78693aa949

📥 Commits

Reviewing files that changed from the base of the PR and between 9be38a7 and 6c6ec3c.

📒 Files selected for processing (2)
  • src/examples/core/create-asset/index.js
  • src/examples/token-metadata/fungibles/create/index.js

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


Summary by CodeRabbit

  • New Features
    • Added CLI examples for creating an asset with a vanity address using a supplied mint keypair.
    • Added a fungible-token creation example that uses a supplied keypair to create a vanity mint address.
  • Documentation
    • Updated the file-based asset creation example to specify off-chain metadata with --offchain instead of --json.

Walkthrough

The CLI examples add commands that specify mint keypair files for asset and fungible-token creation. The asset example changes its metadata option from --json to --offchain.

Changes

CLI creation examples

Layer / File(s) Summary
Creation command examples
src/examples/core/create-asset/index.js, src/examples/token-metadata/fungibles/create/index.js
The examples add commands that specify mint keypair files. The asset example also changes its metadata option to --offchain.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 6c6ec

The examples match the documented CLI options, with no concrete merge-blocking risk identified. The PR is ready for normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to 6c6ec

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (ui) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in src/examples/core/create-asset/index.js: The CLI example changes the metadata-file option from --json to --offchain and adds a command that creates an asset using a specified mint keypair.
  • observed — Modified behavior in src/examples/token-metadata/fungibles/create/index.js: The CLI example adds a vanity-mint command using --mint-keypair with a keypair file path.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the generated example files as stale and states that regeneration fixes the Examples drift check.
Description check ✅ Passed The description directly explains the drift failure, the two regenerated files, the generated changes, and the verification performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@tonyboylehub
tonyboylehub merged commit 74d56c5 into main Oct 1, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 6c6ec3c0 Deployed Oct 1, 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.

3 participants