Skip to content

chore(cli): show rejected-update subprocess diagnostics - #146154

Merged
steipete merged 1 commit into
mainfrom
codex/cli-update-timeout
Sep 12, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/cli-update-timeout

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #146078

What Problem This Solves

Resolves a problem where a rejected-update CLI subprocess failure reports only the spawn error, hiding the captured child output needed to locate the failure. CI run 34701057560, attempt 1 hit the existing 60-second guard but did not show either output stream.

Why This Change Was Made

The existing tabled update/repair assertion now uses the shared bounded output-tail formatter. Missing streams from process-launch errors are normalized to empty strings so diagnostic formatting cannot mask the spawn error.

User Impact

No product behavior changes. Future failures in this process-state regression include the child's stdout and stderr. The timeout, subprocess invocation, retry policy, exit-code check, error-message check, and state-immutability assertion are unchanged.

This improves diagnostics; it does not claim to fix the original, unreproduced hang.

Evidence

The unchanged Linux/Node 24.19.0 CI retry passed all 275 tests in the original shard. The rejected-update case completed in 1,242 ms and its repair sibling in 1,352 ms. The relevant launcher, CLI, update, and test sources match the failed CI merge snapshot.

The full process-state file passed 18/18 locally on Node 24.20.0. A bounded probe then passed 40/40 actual rejected-update invocations with fresh legacy-state fixtures, taking 633–2,108 ms each and preserving every fixture byte. The original timeout's exact stage remains unknown because the failure report omitted the captured streams.

Both affected table cases pass after this diagnostic change. Complete selected changed checks and fresh managed review through P2 pass. A direct Node launch-error probe verified that output streams can be absent, which the formatter call now handles.

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 12, 2026 15:52
@steipete steipete self-assigned this Sep 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS maintainer Maintainer-authored PR labels Sep 12, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 12:00 PM ET / 16:00 UTC.

ClawSweeper review

What this changes

Adds bounded child stdout and stderr to assertion failures in the update and repair argument-rejection tests.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a focused diagnostic improvement absent from current main, with no actionable correctness findings. The protected maintainer label also excludes automatic closure.

Priority: P3
Reviewed head: fe86d83180b79b42d8852925a81476648be18261

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable diagnostic improvement with preserved assertions and relevant reported validation.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a maintainer-authored test-only change, so the external-contributor proof gate does not apply; reported CLI probes support existing behavior but do not reproduce the original hang.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a maintainer-authored test-only change, so the external-contributor proof gate does not apply; reported CLI probes support existing behavior but do not reproduce the original hang.
Evidence reviewed 6 items Verified introduced change: The pinned introduction delta changes only the assertion message; subprocess invocation, timeout, exit validation, expected error, and fixture comparison remain unchanged.
Existing formatter contract: The shared formatter retains the last 8,000 characters of each stream. Existing tests cover failure identity, both streams, and truncation; the new call normalizes absent streams before formatting.
Still useful on main: Fetched main retains the bare result.error assertion in the rejected-argument table.
Findings None None.
Security None None.

How this fits together

OpenClaw's CLI process tests run update commands against temporary legacy-state fixtures and verify rejected arguments leave those fixtures unchanged. The shared diagnostic formatter makes subprocess failures easier to investigate.

flowchart LR
  A[Temporary legacy state] --> B[Update or repair subprocess]
  C[Invalid timeout argument] --> B
  B --> D[Captured result and output]
  D --> E[Assertions and bounded diagnostics]
  A --> F[State snapshot comparison]
  B --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +7. Total +7 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 8 1 +7
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 8 1 +7

Review metrics

None.

Technical review

Best possible solution:

Keep subprocess diagnostics in the shared bounded formatter while preserving the existing failure and state-safety assertions.

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

Not applicable to this diagnostic-only patch; the original intermittent subprocess hang remains unreproduced, as the PR explicitly states.

Is this the best way to solve the issue?

Yes: reusing the existing formatter is a narrow repair, and empty-string normalization prevents missing launch-error streams from masking the assertion failure.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9ebef910b792.

Labels

Label changes:

  • add P3: This improves test-failure diagnostics without changing product behavior or weakening validation.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies a maintainer-authored test-only change, so the external-contributor proof gate does not apply; reported CLI probes support existing behavior but do not reproduce the original hang.

Label justifications:

  • P3: This improves test-failure diagnostics without changing product behavior or weakening validation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies a maintainer-authored test-only change, so the external-contributor proof gate does not apply; reported CLI probes support existing behavior but do not reproduce the original hang.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • 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.

@steipete
steipete merged commit ab32596 into main Sep 12, 2026
169 checks passed
@steipete
steipete deleted the codex/cli-update-timeout branch September 12, 2026 16:10
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

cli CLI command changes maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant