Skip to content

[BUG]: Proxy startup may report success when retries are exhausted and process does not stabilize #3530

@iaadillatif

Description

@iaadillatif

Problem

The proxy startup logic in start-proxy-action.ts can report successful initialization even when the proxy process fails to stabilize after retry attempts.

The previous implementation:

  • Retries on spawn or early exit
  • Only throws on immediate spawn errors
  • Does not explicitly fail when all retry attempts are exhausted
  • May proceed with outputs set despite no stable process remaining alive

This can lead to false-positive startup.

Impact

When startup silently fails:

  • Downstream steps may fail with opaque dependency or networking errors
  • Failures manifest later in the workflow
  • Root cause becomes difficult to diagnose

Instead of failing fast during initialization, workflows continue in a degraded state.

Expected Behavior

If the proxy fails to stabilize after retry attempts, startup should fail explicitly with a clear diagnostic error.

Proposed Solution

  • Detect retry exhaustion explicitly
  • Throw a clear error including the last exit code
  • Verify process remains alive after stabilization delay
  • Retry using a new ephemeral port before terminal failure
  • Extract startup logic into a dedicated launcher module for testability

This preserves existing outputs, telemetry behavior, and wrapper semantics while preventing silent failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions