Skip to content

test: add cross-platform critical-path regression suite - #238

Merged
dDevAhmed merged 1 commit into
DigiNodes:mainfrom
yunus-dev-codecrafter:test/sw-119-cross-platform-critical-path
Oct 18, 2026
Merged

dDevAhmed merged 1 commit into
DigiNodes:mainfrom
yunus-dev-codecrafter:test/sw-119-cross-platform-critical-path

Conversation

@yunus-dev-codecrafter

Copy link
Copy Markdown
Contributor

closes #214
Represent the Windows npm wrapper, test orchestration, Testnet deploy security, and hardened E2E path in a single deterministic ViTest suite that runs on the supported Linux/macOS/Windows matrix. The suite is fully offline, contains no secrets or live-Testnet dependency, and asserts the platform support contract documented in docs/reference/platform-support.md.

Summary

Adds a deterministic, cross-platform critical-path regression suite
(tests/critical-path.test.ts) that exercises the stabilized StellarForge CLI
critical path. Because the suite is a Vitest suite, it runs on every target in
the existing ci.yml platform matrix (Linux / Node 22, Linux / Node 24,
macOS / Node 22, Windows / Node 22) without any workflow changes.

The suite represents the Windows npm wrapper, test orchestration, Testnet
deploy security, and the hardened E2E smoke path in one place, with no secrets
and no live-Testnet/network dependency.

Related Issue

Closes #214

Backlog ID: SW-119. Declared dependencies: SW-064, SW-075, SW-093, SW-118. The
suite is self-contained and represents each of those areas so it does not rely
on their files landing first.

Scope

Work completed — added tests/critical-path.test.ts (18 tests):

  • Windows npm wrapper / process invocation contract
    • createNpmInvocation selects the documented wrapper for the running
      platform: cmd.exe /d /s /c npm ... on Windows, npm ... on POSIX.
    • Arguments are passed as discrete array elements (no shell interpolation),
      including metacharacter-bearing inputs.
    • resolveTestProcessPlan reuses the npm wrapper for generated Node
      projects and selects cargo.exe / cargo for Cargo workspaces.
  • Test orchestration
    • Real end-to-end run of stellarforge test against a generated basic-app.
    • A non-zero child result is preserved as SubprocessCliError (with SIGTERM
      cleanup), and unsupported projects fail with actionable guidance.
  • Deploy security
    • Exact Testnet-only deployment plan (command + argument order + cwd).
    • Rejection of mainnet / pubnet / futurenet / local, and rejection
      outside a Cargo smart-contract workspace.
    • Mocked stellar execution surfaces the contract ID and does not reflect
      secret/seed-phrase material; failed deploys propagate; network/identity are
      required.
  • E2E path
    • Offline generation of the basic-app and smart-contract templates.
    • Asserts scripts/e2e-smoke.mjs stays offline, mocked, platform-aware, and
      secret-free, and that e2e-smoke.yml / ci.yml wire the E2E path and the
      supported platform matrix.
  • Linux/macOS/Windows support contract
    • Asserts the Node/npm engine range, the dist/cli.js bin, the documented
      platform matrix and Windows/POSIX executable differences, and that the
      supported matrix does not use continue-on-error.

Intentionally left out:

  • No production (src/**) changes — no protected trust-boundary surface is
    touched.
  • No CI workflow changes — the existing ci.yml matrix already runs the suite
    on all four supported targets.
  • No Changeset — tests-only change (see Release Impact).

Testing

  • Tests added/updated where applicable
  • Existing relevant tests pass
  • Lint/type/build checks pass where available

Checks run locally (Windows, Node v24.21.0, npm 10.9+):

  • npm ci --ignore-scripts --no-audit --no-fund — pass
  • npm run typecheck — pass
  • npm run build — pass
  • ESLint + Prettier on the new file — pass
  • npx vitest run tests/critical-path.test.ts — 18/18 pass
  • npm test — 177 pass / 2 fail

The 2 failures (configuration.test.ts → symlinked config,
template-generation.test.ts → symlinked template) are pre-existing on this
local Windows checkout: symlinkSync returns EPERM without Developer Mode /
admin. They are unrelated to this change and pass on the Linux/macOS/Windows
CI runners (Windows runners have the privilege enabled). No regression is
introduced by this PR.

Security Impact

  • No security-sensitive behavior is changed
  • Security-sensitive behavior is changed and explained below

Security notes:

Test-only change; no src/** or .github/workflows/** changes. The suite
asserts existing security contracts — Testnet-only deployment, no secret or
seed-phrase reflection in output, and fully offline mocked subprocesses — but
does not alter them. No secrets, credentials, live Testnet, or network access
are introduced.

Release Impact

  • No published/user-visible behavior change

  • Patch

  • Minor

  • Breaking/pre-1.0 contract change

  • Changeset included where required

  • Changeset not required; reason explained below

Release notes:

Tests-only change. No shipped CLI command, option, template, or user-visible
behavior changes. Per CONTRIBUTING.md, a Changeset is not required for tests
with no shipped behavior change.

Documentation

  • Documentation updated where applicable
  • No documentation change required

The suite asserts the existing contract in docs/reference/platform-support.md
and follows docs/contributing/testing.md; no documentation update is needed.

Checklist

  • I read docs/contributing/wave-architecture.md for Stellar Wave work
  • I stayed within the agreed issue scope
  • I checked for overlapping open contributor PRs
  • I did not include secrets or sensitive data
  • I reviewed new/updated dependencies if any (none added)
  • I considered failure/error paths, not only the happy path
  • I am not disclosing an unresolved vulnerability publicly

Represent the Windows npm wrapper, test orchestration, Testnet deploy security, and hardened E2E path in a single deterministic ViTest suite that runs on the supported Linux/macOS/Windows matrix. The suite is fully offline, contains no secrets or live-Testnet dependency, and asserts the platform support contract documented in docs/reference/platform-support.md.
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e5274ce3-7230-4772-a909-ae5030ff3d9a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@dDevAhmed
dDevAhmed merged commit ce7812e into DigiNodes:main Oct 18, 2026
1 check passed
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.

SW-119 — Add cross-platform critical-path regression suite

2 participants