Skip to content

core: no timeouts on subprocess and network calls (runCommand, npm view, npx) #145

Description

@Dione-b

Summary

No subprocess or network call in @caatinga/core has a timeout:

  • runCommand passes no timeout to execa (packages/core/src/shell/run-command.ts:31-37)
  • checkStellarSdkVersion shells out to npm view @stellar/stellar-sdk version (packages/core/src/stellar-sdk/check-stellar-sdk-version.ts:29-34) — a network call
  • generateBindings runs npx --yes ... which downloads a package from the registry on every generate (packages/core/src/contracts/generate-bindings.ts:70-89)

Why it matters

A stalled registry, wedged network, or hung stellar process hangs the CLI forever with no error, no hint, and no user recourse.

Suggested fix

  • Add a configurable timeout (e.g. 60s) to RunCommandOptions and wire it into the npm view / npx calls
  • On timeout, throw a CaatingaError with a hint (e.g. "the command exceeded 60s; check network/registry availability")
  • Test: a sleeping command times out and surfaces the dedicated error

Priority: High | Release impact: Patch | Breaking: No

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programarea: stellar-cliStellar CLI version checking, compat, parsingenhancementNew feature or requestpriority: highHigh priority fix - data corruption, security, or recovery failure risk

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions