feat: implement stellar-quickstart-up runtime installer#9282
feat: implement stellar-quickstart-up runtime installer#9282ulissesferreira wants to merge 2 commits into
Conversation
Add the Docker-backed Stellar Quickstart installer that pulls a pinned stellar/quickstart image and exposes a node_modules/.bin wrapper for E2E harnesses to start local Stellar nodes.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1793243. Configure here.
| executableArgs: [...runArgs, imageResult.imageReference], | ||
| executablePath: dockerBinary, | ||
| pathResolution: 'absolute', | ||
| }); |
There was a problem hiding this comment.
Wrapper resolves docker incorrectly
High Severity
The default dockerBinary is the bare name docker, but installExecutableWrapper with pathResolution: 'absolute' turns that into a filesystem path under the install working directory. Install-time docker version still works via PATH, yet the generated stellar-quickstart wrapper invokes the wrong path and fails unless a custom absolute --docker-binary is set.
Reviewed by Cursor Bugbot for commit 1793243. Configure here.
| { encoding: 'utf8' }, | ||
| ); | ||
|
|
||
| return stdout.trim(); |
There was a problem hiding this comment.
Digest check uses image Id
Medium Severity
Post-pull verification compares the pinned digest to docker image inspect’s {{.Id}}. That field is the image config ID, not the manifest digest reported by docker pull and documented in the README, so a correct pull can still fail with “digest mismatch” on typical Docker setups.
Reviewed by Cursor Bugbot for commit 1793243. Configure here.
| } | ||
|
|
||
| await writeFile(referencePath, image.reference); | ||
| await writeFile(digestPath, digest); |


Summary
This PR is the second of two PRs to add the Stellar Quickstart runtime installer package for Extension E2E tests, stacked on top of:
@metamask/stellar-quickstart-uppackage #9281 — scaffold:feat: scaffold @metamask/stellar-quickstart-up packageIt contains only the real implementation of the Stellar Quickstart runtime installer, with no unrelated monorepo changes.
What's included (delta vs scaffold PR)
src/install.ts— Docker image pull, digest verification, cache metadata, andstellar-quickstartwrapper installation (pinned tostellar/quickstart:latest/sha256:8ddf3ed87a5c07eab5202b0fd95f06fb5db3f48cacd7e69fdc0e22925f181168)src/bin/stellar-quickstart-up.ts— CLI entry point (registered asbininpackage.json)src/index.ts— updated exportssrc/install.test.ts— Jest tests for the installer (cache reuse, digest mismatch, wrapper forwarding, cache clean)src/index.test.ts— removed (replaced by install tests)package.json— addsbinfield,@metamask/local-node-utilsdependency, version bump to0.1.0CHANGELOG.md— changelog entry for the initial implementationREADME.md— full usage documentationjest.config.js— updated for the new test structure (relaxed coverage thresholds, CLI entry excluded)tsconfig.build.json— project reference tolocal-node-utilsyarn.lock— updated for the new dependencyWhat's NOT included
No
knip.config.tschanges, no CODEOWNERS/teams.json churn (those are in the scaffold PR), no unrelated monorepo changes.Jira
Verification
All passed ✓
Test plan
yarn workspace @metamask/stellar-quickstart-up run buildyarn workspace @metamask/stellar-quickstart-up run testyarn eslint packages/stellar-quickstart-upyarn constraintsyarn workspace @metamask/stellar-quickstart-up run changelog:validateyarn stellar-quickstart-up installwith Docker available, thennode_modules/.bin/stellar-quickstart --localNote
Low Risk
New dev/CI tooling only; no production wallet or auth paths. Risk is limited to local Docker pulls and cache/bin writes during E2E setup.
Overview
Replaces the scaffold placeholder with a runtime installer modeled on
@metamask/foundryup: it pulls a digest-pinnedstellar/quickstartimage, stores metadata under the MetaMask cache, and writes astellar-quickstartshim innode_modules/.binthat runsdockerwith default port8000:8000.install.tswires@metamask/local-node-utilsfor cache paths (local vs Yarn global),package.json/ CLI overrides,docker pull+image inspect, digest mismatch errors, cache hits, namespace-scopedcache clean, and wrapper generation.stellar-quickstart-upCLI exposesinstall(default),cache clean, and--help.Package ships at 0.1.0 with a
binentry,local-node-utilsdependency, broadinstall.test.tscoverage (stubbed Docker), relaxed Jest thresholds with the CLI excluded from coverage, and expanded README / CHANGELOG.Reviewed by Cursor Bugbot for commit 1793243. Bugbot is set up for automated code reviews on this repo. Configure here.