Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 11:22 AM ET / 15:22 UTC. Summary PR surface: Tests +48, Other -18. Total +30 across 2 files. Reproducibility: yes. for the proposed branch: the supplied loopback scenario drives the real clawhub-preflight entrypoint through delayed headers and an unfinished body, then observes the shared deadline. Current-main reproduction was not independently run in this read-only review. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review detailsBest possible solution: Keep one total timeout budget in the E2E package-preflight helper, preserve the existing timeout environment variables, and land it after a current-base review confirms the helper remains separate from the runtime ClawHub timeout work. Do we have a high-confidence way to reproduce the issue? Yes for the proposed branch: the supplied loopback scenario drives the real clawhub-preflight entrypoint through delayed headers and an unfinished body, then observes the shared deadline. Current-main reproduction was not independently run in this read-only review. Is this the best way to solve the issue? Yes, with current-base confirmation: one outer deadline is the narrowest way to prevent phase-stacked timeouts in this E2E helper without adding configuration surface; the related runtime implementation remains a separate owner boundary. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against faf3dbdda833. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +48, Other -18. Total +30 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
Review history (3 earlier review cycles) |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Updated the PR body with changed-path real behavior proof for production |
|
Closing per ClawSweeper review verdict |
What Problem This Solves
ClawHub package preflight in the plugins E2E helper stacked separate deadlines for
HTTP fetch, bounded body read, and JSON parse. A slow header phase plus a stalled
body could therefore consume more than one configured
OPENCLAW_PLUGINS_E2E_CLAWHUB_PREFLIGHT_TIMEOUT_MSbudget before failing.Why This Change Was Made
Put fetch,
readBoundedResponseText, andJSON.parseunder one outerwithTimeoutwhosetimeoutPromiseis also passed into the bounded reader.timeoutMsis a total wall-clock budget for the preflight, not a per-phaseallowance.
User Impact
No end-user product change. Plugin E2E ClawHub preflight fails closed within one
configured deadline when package metadata headers or bodies stall, instead of
overrunning stacked phase budgets.
Evidence
scripts/e2e/lib/plugins/assertions.mjs,test/scripts/plugins-assertions.test.tsclawhub-preflight→assertClawHubPreflight→ onewithTimeout(…, limits.timeoutMs, …)coveringfetch+readBoundedResponseText(…, timeoutPromise)+JSON.parse(
OPENCLAW_PLUGINS_E2E_CLAWHUB_PREFLIGHT_TIMEOUT_MS,OPENCLAW_PLUGINS_E2E_CLAWHUB_PREFLIGHT_BODY_MAX_BYTES); only the deadlinemodel changes from phase-stacked to shared total
Real behavior proof
Behavior or issue addressed
Against a live loopback ClawHub package-metadata endpoint that delays headers
then never finishes the JSON body, production
clawhub-preflightfails withinone shared
timeoutMsbudget. A completing metadata response still parses andprints the package family on the same path.
Canonical reachability path
node scripts/e2e/lib/plugins/assertions.mjs clawhub-preflight→assertClawHubPreflight(scripts/e2e/lib/plugins/assertions.mjs) →withTimeout("ClawHub package preflight for …", limits.timeoutMs, …)→fetch(preflightUrl, { signal })→readBoundedResponseText(…, timeoutPromise)→JSON.parse(rawDetail)Shared helper / provider constraint check
Reuses existing
withTimeout+readBoundedResponseText; no new timeout envsurface. The outer
timeoutPromiseis forwarded into the body reader so theshared deadline covers headers and body together.
Real environment tested
Real HTTP transport: local
node:httpClawHub stand-in on127.0.0.1serving/api/v1/packages/%40openclaw%2Fkitchen-sink.drive production
assertions.mjs clawhub-preflightwithOPENCLAW_PLUGINS_E2E_CLAWHUB_PREFLIGHT_TIMEOUT_MS=1500.code-pluginpackage JSON on the same pathwith
timeoutMs=5000.Node v22.23.1, PR head
f664f7f640c9a83d65af4ca7c1ff5720e12af7d8.Exact steps or command run after this patch
Production entrypoint driven against a live loopback ClawHub metadata server:
Supplemental focused regression on the same assertion helper:
node scripts/run-vitest.mjs test/scripts/plugins-assertions.test.ts -t "keeps ClawHub preflight wall time" --reporter=dotEvidence after fix
Observed result after fix
With headers delayed 1000ms and a stalled body, production
clawhub-preflightfails closed at ~1638ms under a 1500ms shared budget — below the 2000ms shared
ceiling and well under the old stacked allowance (≥2500ms =
headerDelay + timeoutMs). The error is the outer preflight timeout
(
ETIMEDOUTfromassertClawHubPreflight), not a second per-phase bodydeadline. A completing metadata body still succeeds and prints the package
family.
What was not tested
Live stall against production
https://clawhub.aipackage metadata outside theloopback harness.
Fix classification
bugfix — timeout/hang (E2E automation)
AI Assistance
AI-assisted. Author reviewed the shared-deadline wiring and the loopback
changed-path proof output for
clawhub-preflight.