Visitar URL original
fix(test): preserve HTTP failures before readiness timeouts by roboclaw-bot · Pull Request #152407 · openclaw/openclaw · GitHub
Skip to content

fix(test): preserve HTTP failures before readiness timeouts - #152407

Merged
roboclaw-bot merged 1 commit into
mainfrom
openclaw/expose-transport-failures-in-readiness-errors
Sep 19, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
openclaw/expose-transport-failures-in-readiness-errors

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: isolated Gateway test failures hide earlier HTTP failures when the final readiness probe exhausts the startup budget.

User Impact

No product-runtime behavior changes. Developers get the last completed failed-response receipt alongside the final probe, including an HTTP 502/invalid-JSON failure that precedes a timeout.

Why This Change Was Made

Retain one compact, sanitized response snapshot in the existing readiness owner and reuse its formatter in startup errors and the quota fixture failure hook. The receipt stays below 1,024 bytes and contains no arbitrary response headers, bodies, exception messages, or credentials. Semantic readiness, startup/probe budgets, cancellation, child cleanup, expired-probe snapshots, and proxy policy remain unchanged.

Evidence

  • Hosted CI passed at 3b7b20f42c1e99be80f62f09c569151ef1f9ed9d: CI run 35426445302.
  • Five regression cases failed against the original helper because the prior response was absent.
  • 25 focused tests passed across the instance helper, actual quota failure-hook registration, and desktop readiness evidence. Coverage includes HTTP 200/not-ready, failing HTTP status with ready=true, malformed JSON, body failure, timeout/exit/cancellation, late completion, and the byte bound.
  • Changed-file typecheck, lint, architectural/dependency guards, export scans, formatting, and git diff --check passed.
  • Independent review and required autoreview found no actionable issues through P2.
  • Local full Gateway/UI-suite success is not claimed: an initial broad filter selected four existing loopback lifecycle tests that encountered the known managed-proxy HTTP refusal. No proxy bypass, raw-socket fallback, or readiness algorithm repair is included.

Worked on by

Work sessions


View the OpenClaw team session

Worked on by:
- @steipete

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
OpenClaw-Publication: cf6d74d5-388f-4b92-8b09-5421c8da9bcf
@clawsweeper

clawsweeper Bot commented Sep 19, 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.

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Sep 19, 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 19, 2026
@clawsweeper

clawsweeper Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 19, 2026, 2:29 AM ET / 06:29 UTC (Revision 2).

ClawSweeper review

What this changes

Preserves the last completed failed HTTP readiness response in isolated Gateway test diagnostics and prints compact receipts before quota-test logs.

Merge readiness

✅ Ready for maintainer review

The patch remains useful and has no actionable correctness findings. Current main lacks this diagnostic retention, and the prior draft blocker is resolved. Related work overlaps but has not merged.

Priority: P3
Reviewed head: 3b7b20f42c1e99be80f62f09c569151ef1f9ed9d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused diagnostic repair with meaningful regression coverage and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary contributor proof gate does not apply to this maintainer/bot PR. Its evidence targets the shared readiness helper and actual quota failure-hook registration with focused mocked regressions; no live Gateway success is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary contributor proof gate does not apply to this maintainer/bot PR. Its evidence targets the shared readiness helper and actual quota failure-hook registration with focused mocked regressions; no live Gateway success is claimed.
Evidence reviewed 8 items Introduced diagnostic retention: The pinned introduction delta retains scalar HTTP failure facts separately from the final probe, excludes interrupted probes, and reuses one formatter. Readiness acceptance, deadlines, cancellation, and process cleanup are unchanged.
Current-main necessity: Current main still formats only lastProbe in startup errors; it does not retain lastFailedResponse. Its quota fixture failure hook still prints Gateway logs without the compact readiness receipts.
Latest-release comparison: The v2026.9.5 helper also retains lastProbe without the new failed-response snapshot; this improvement is not present in the supplied latest release.
Findings None None.
Security None None.

How this fits together

The shared test-instance helper starts isolated Gateways and polls their readiness endpoint. Its diagnostic records feed startup errors and test failure output so developers can distinguish earlier HTTP failures from the final timeout.

flowchart TD
  A[Isolated Gateway startup] --> B[Readiness HTTP probes]
  B --> C{Probe result}
  C -->|Completed failure| D[Retain sanitized response]
  C -->|Ready| E[Continue test]
  C -->|Timeout or exit| F[Startup diagnostic]
  D --> F
  F --> G[Quota failure output]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +285. Total +285 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 291 6 +285
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 291 6 +285

Review metrics

None.

Technical review

Best possible solution:

Keep one sanitized failed-response snapshot in the shared readiness owner and reuse its formatter across failure consumers, coordinating the overlapping branch to avoid duplicate retention.

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

Yes, from source: a completed HTTP failure followed by a stalled final probe leaves current-main startup errors showing only the timeout. The added regressions encode that sequence; this review did not execute them.

Is this the best way to solve the issue?

Yes. Retaining one bounded scalar snapshot in the existing readiness owner fixes the diagnostic loss without changing polling semantics or introducing another readiness implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5a2bc22ce933.

Labels

Label justifications:

  • P3: This improves developer-facing test diagnostics without changing product runtime behavior.
  • 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 ordinary contributor proof gate does not apply to this maintainer/bot PR. Its evidence targets the shared readiness helper and actual quota failure-hook registration with focused mocked regressions; no live Gateway success is claimed.

Evidence

What I checked:

  • Introduced diagnostic retention: The pinned introduction delta retains scalar HTTP failure facts separately from the final probe, excludes interrupted probes, and reuses one formatter. Readiness acceptance, deadlines, cancellation, and process cleanup are unchanged. (test/helpers/openclaw-test-instance.ts:496, 3b7b20f42c1e)
  • Current-main necessity: Current main still formats only lastProbe in startup errors; it does not retain lastFailedResponse. Its quota fixture failure hook still prints Gateway logs without the compact readiness receipts. (test/helpers/openclaw-test-instance.ts:355, 5a2bc22ce933)
  • Latest-release comparison: The v2026.9.5 helper also retains lastProbe without the new failed-response snapshot; this improvement is not present in the supplied latest release. (test/helpers/openclaw-test-instance.ts:312, ec9c1a13db89)
  • Regression coverage and validation limits: Inspected coverage includes five completed-response variants followed by timeout, late body completion after timeout/exit/abort, successful readiness after failure, sanitization, and the receipt byte bound. The PR body reports 25 focused passes and five pre-fix failures; tests were not executed during this read-only review. (test/helpers/openclaw-test-instance.test.ts:1984, 3b7b20f42c1e)
  • Failure-hook integration: The added regression invokes the actual quota fixture registration with mocked startup failure and verifies receipts precede logs. It exercises diagnostic formatting, not Codex runtime or protocol compatibility. (test/e2e/qa-lab/runtime/quota-reset-provider.test.ts:8, 3b7b20f42c1e)
  • Re-review continuity: The previous review covered the same head, listed no findings, and requested leaving draft status. Live REST metadata confirms this PR is open, non-draft, and still at that head. (3b7b20f42c1e)

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-19T03:12:47.845Z sha 3b7b20f :: needs changes before merge. :: none

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 19, 2026 06:22
@roboclaw-bot roboclaw-bot self-assigned this Sep 19, 2026
@roboclaw-bot
roboclaw-bot merged commit f362b0b into main Sep 19, 2026
205 of 207 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/expose-transport-failures-in-readiness-errors branch September 19, 2026 06:45
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 20, 2026
…#152407)

Worked on by:
- @steipete


OpenClaw-Publication: cf6d74d5-388f-4b92-8b09-5421c8da9bcf

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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: M 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