Skip to content

feat: implement stellar-quickstart-up runtime installer#9282

Open
ulissesferreira wants to merge 2 commits into
add-stellar-quickstart-up-package-scaffoldfrom
add-stellar-quickstart-up-package-impl
Open

feat: implement stellar-quickstart-up runtime installer#9282
ulissesferreira wants to merge 2 commits into
add-stellar-quickstart-up-package-scaffoldfrom
add-stellar-quickstart-up-package-impl

Conversation

@ulissesferreira

@ulissesferreira ulissesferreira commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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:

It 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, and stellar-quickstart wrapper installation (pinned to stellar/quickstart:latest / sha256:8ddf3ed87a5c07eab5202b0fd95f06fb5db3f48cacd7e69fdc0e22925f181168)
  • src/bin/stellar-quickstart-up.ts — CLI entry point (registered as bin in package.json)
  • src/index.ts — updated exports
  • src/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 — adds bin field, @metamask/local-node-utils dependency, version bump to 0.1.0
  • CHANGELOG.md — changelog entry for the initial implementation
  • README.md — full usage documentation
  • jest.config.js — updated for the new test structure (relaxed coverage thresholds, CLI entry excluded)
  • tsconfig.build.json — project reference to local-node-utils
  • yarn.lock — updated for the new dependency

What's NOT included

No knip.config.ts changes, no CODEOWNERS/teams.json churn (those are in the scaffold PR), no unrelated monorepo changes.

Jira

  • Epic: WPN-1509 — [Extension] Expand Stellar's E2E test coverage
  • Task: WPN-1510 — Create Stellar Quickstart installer package "stellar-quickstart-up"

Verification

yarn workspace @metamask/stellar-quickstart-up run build
yarn workspace @metamask/stellar-quickstart-up run test
yarn eslint packages/stellar-quickstart-up
yarn constraints
yarn workspace @metamask/stellar-quickstart-up run changelog:validate

All passed ✓

Test plan

  • yarn workspace @metamask/stellar-quickstart-up run build
  • yarn workspace @metamask/stellar-quickstart-up run test
  • yarn eslint packages/stellar-quickstart-up
  • yarn constraints
  • yarn workspace @metamask/stellar-quickstart-up run changelog:validate
  • Manual: yarn stellar-quickstart-up install with Docker available, then node_modules/.bin/stellar-quickstart --local

Note

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-pinned stellar/quickstart image, stores metadata under the MetaMask cache, and writes a stellar-quickstart shim in node_modules/.bin that runs docker with default port 8000:8000.

install.ts wires @metamask/local-node-utils for cache paths (local vs Yarn global), package.json / CLI overrides, docker pull + image inspect, digest mismatch errors, cache hits, namespace-scoped cache clean, and wrapper generation. stellar-quickstart-up CLI exposes install (default), cache clean, and --help.

Package ships at 0.1.0 with a bin entry, local-node-utils dependency, broad install.test.ts coverage (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.

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.
@ulissesferreira ulissesferreira requested review from a team as code owners June 26, 2026 11:50

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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',
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1793243. Configure here.

{ encoding: 'utf8' },
);

return stdout.trim();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1793243. Configure here.

}

await writeFile(referencePath, image.reference);
await writeFile(digestPath, digest);
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.

2 participants