Skip to content

[Bug]: QA bootstrap drops child diagnostics on timeout and stream failures #136102

Closed

Description

@steipete

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

QA bootstrap errors omit already-captured child stdout/stderr when a timeout, cancellation, or process/stream failure occurs; installed-package plugin setup also reports the same phase label for the help probe and actual repair.

Steps to reproduce

  1. In a source checkout, run a synthetic Node child through runQaGatewayCliCommand that writes meaningful diagnostics to stdout and stderr, then remains alive.
  2. Observe both pipes before allowing the existing 120000ms deadline to fire, or inject cancellation / a process or stream failure.
  3. Inspect the returned error after process-tree settlement and pipe draining.

A regression in the existing gateway-child-bootstrap.test.ts real-child fixture exercises timeout, cancellation, stdout, stderr, stdin, and process failure. Against unmodified production code, all six added diagnostic assertions fail because the emitted diagnostic is absent. The real child/descendant cleanup assertions still pass.

Expected behavior

Preserve the first failure reason together with available bounded, redacted child diagnostics, as the same owner already does for ordinary nonzero exits. Retain the existing deadlines and lifecycle owner. The packaged setup error should distinguish update repair --help from update repair without rendering raw arguments or environment values.

Actual behavior

The timeout returns only qa gateway CLI exceeded 120000ms, despite the synthetic fixture having emitted and the parent having observed diagnostics. Other earlier-latched failures similarly omit output. Both packaged help and repair failures use installed package plugin setup failed.

OpenClaw version

Source main at 1160e395e452dbbe1c6726c7f10bc3e5a1cbb2de; the affected files remain unchanged at b3c826673f9736bf81b86a5ca63ea0f95129c432.

Operating system

macOS, Darwin 25.6.0; Node 24.20.0.

Install method

Source checkout using the repository test runner and QA child lifecycle.

Model

Not applicable: synthetic child-process reproduction; no model inference.

Provider / routing chain

QA Lab child command owner → isolated Node fixture. No external provider or channel.

Additional provider/model setup details

All diagnostic/credential-shaped values are synthetic. No operator Gateway or live credentials are needed.

Logs

Expected: plugin registry still pending apiKey=<redacted>
Received: qa gateway CLI exceeded 120000ms

Bootstrap regression before production repair:
6 failed | 8 passed

Packaged phase-label regression before production repair:
2 failed | 2 passed

Screenshots, recordings, and evidence

Source root cause: gateway-child-command.ts only incorporates captured output when exitCode !== 0 && !failure. The earlier failure latch bypasses that formatting. gateway-child-setup.ts wraps both plugin setup commands under one label.

This is a diagnostic-only issue, not a visual change. A proposed repair is verified by real child I/O and process-tree cleanup, including a separate real-clock 120-second timeout probe.

Impact and severity

Affected: QA operators investigating failed bootstrap or post-start CLI commands. Severity: lost troubleshooting evidence; the failure itself is still reported. Frequency: deterministic in all six synthetic earlier-failure cases. Consequence: available diagnostics and the exact packaged setup phase are hidden, making the underlying failure harder to identify.

Additional information

Raw parent/diff inspection confirms commit 3633e9b61cf2f2e7cd461ac3622e106fe5a1193c added timeout/cancellation handling with this omission; stream-error output omission already existed. Commit ae47b343bd323fddff8574739a3b0e66975dfca5 later combined stderr and stdout for ordinary nonzero exits only.

An isolated QA UI bootstrap timeout motivated the investigation, but its actual timed-out invocation is unknown, and there is no claim that it emitted nonempty output. This issue does not claim the underlying bootstrap timeout or a pending-notice UI problem is fixed. Preserve the 120-second deadline, existing cleanup/cancellation behavior, 2048-character redacted error bound, stdout 1MiB cap, and stderr 64KiB tail.

Activity

  1. added
    bug
    on Sep 2, 2026
  2. added
    maintainer
    on Sep 2, 2026
  3. added
    P2
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    clawsweeper:source-repro
    impact:other
    issue-rating: 🦞 diamond lobster
    on Sep 2, 2026
  4. clawsweeper commented on Sep 2, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 2, 2026, 3:37 AM ET / 07:37 UTC.

    Summary
    Keep open: current main still drops captured diagnostics after an earlier failure latch, and the explicitly linked fix PR remains open. The protected maintainer label also requires explicit maintainer handling.

    Reproducibility: yes. current source exposes the failure path, and the colocated real-child fixture already drives the relevant timeout and stream/process failure modes; this read-only review did not execute it.

    Regression provenance
    Possible regression — suspected (reviewed change). No predecessor PR is attributed.

    Root-cause cluster
    Relationship: canonical
    Canonical: #136102
    Summary: This is the canonical bug report; its explicitly linked open PR is the candidate repair.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Next step
    The open PR already owns the repair, and the protected maintainer label excludes automatic repair dispatch.

    Review details

    Best possible solution:

    Land one focused owner-boundary repair that finalizes an earlier failure with the existing bounded redactor after settlement, while giving the help probe and repair distinct fixed labels.

    Do we have a high-confidence way to reproduce the issue?

    Yes: current source exposes the failure path, and the colocated real-child fixture already drives the relevant timeout and stream/process failure modes; this read-only review did not execute it.

    Is this the best way to solve the issue?

    Unclear: the source establishes the proper owner boundary, but the linked implementation remains open and needs its normal PR review before its exact patch can be called the best solution.

    AGENTS.md: found and applied where relevant.

    Codex review notes: model internal, reasoning high; reviewed against 331d8a2265ff.

    Label changes

    Label justifications:

    • P2: The deterministic defect hides useful QA troubleshooting context but still reports that the operation failed.
    • impact:other: The supported impact is lost QA diagnostic detail, outside the more specific impact categories.
    Evidence reviewed

    What I checked:

    Likely related people:

    • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
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

    P2bugclawsweeper:linked-pr-openclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:otherissue-rating: 🦞 diamond lobstermaintainer

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions