Repository navigation
fix(clawhub): bound streaming metadata and error responses - #109092
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 1:39 AM ET / 05:39 UTC (Revision 15). ClawSweeper reviewWhat this changesKeeps ClawHub metadata and error responses within the existing request deadline while preserving idle-based timeouts for successful archive downloads and cleaning up unread responses. Merge readiness✅ Ready for maintainer review This fix remains necessary on current main and v2026.9.3. The updated branch resolves the prior porting and archive-compatibility concerns, has relevant real transport proof, and introduces no identified blocking defect. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s ClawHub client supplies registry metadata and archives to plugin and skill discovery and installation. It turns HTTP responses into parsed results, downloaded artifacts, or actionable errors. flowchart TD
A[Plugin and skill operations] --> B[ClawHub HTTP request]
B --> C{Response type}
C --> D[Metadata or error body]
C --> E[Successful archive]
D --> F[Keep original request deadline]
E --> G[Keep chunk idle timeout]
F --> H[Return result or error and release resources]
G --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +42, Tests +276. Total +318 across 6 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use one response-lifetime owner to bound metadata and errors while preserving progressing archives, existing authentication, and non-replayed writes. Do we have a high-confidence way to reproduce the issue? Yes: current main clears its timer after headers, allowing periodically arriving metadata or error chunks to renew the idle timeout beyond the request budget; the supplied loopback observations corroborate this mechanism. Is this the best way to solve the issue? Yes: the repair belongs in the shared response lifecycle, and the explicit successful-archive exception preserves the existing long-transfer contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0153d84c02af. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
a97623c to
058b160
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
Move the wall-clock deadline release to after the success-status check in archive callers so non-2xx archive error bodies stay bounded by the request deadline instead of falling back to chunk-idle protection. Previously `releaseAfterHeaders` cleared the timer at the transport layer before callers could distinguish successful archives from error responses. Now each archive caller calls `release()` only after confirming `response.ok`, while non-archive paths let the `finally` block manage the deadline. Add a loopback regression test for a continuously dripping 400 archive error body to prove the wall-clock bounds it within the configured budget. Co-Authored-By: nebulacoder-v8.0 <[email protected]>
ecb99af to
d8aae19
Compare
Port the response lifetime fix to the split ClawHub owners. Keep metadata and error bodies under each request deadline, and release successful archives into their existing chunk-idle timeout. Dispose unread responses and discarded retry attempts through the shared lifecycle owner.
Security-sensitive guard clearedThis PR no longer has blocked security-sensitive file changes. A future security-sensitive change requires a fresh
|
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
Use the existing deferred helper under the repository ES2023 type declarations. Preserve the native Promise behavior and all deadline assertions.
|
Thanks @Pick-cat! Proof: Built plugin search and install commands passed 16 independent loopback scenarios. All 122 focused tests passed, including seven deadline/cleanup cases with demonstrated baseline or mutation failures.
CI: The final exact-head run passed. Fresh ClawSweeper review found no actionable findings or security concerns. |
…109092) Keep each ClawHub request deadline active through metadata and error-body consumption. Successful archive responses retain their existing chunk-idle timeout so progressing downloads can outlive the metadata deadline. Port the contributor's fix to the current split modules, share archive status handling, and dispose unread responses and discarded read retries. Preserve authentication, size limits, strict decoding, integrity checks, and the rule against retrying writes. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes an issue where plugin searches could wait past the request timeout when ClawHub kept sending small metadata or error-body chunks.
Why This Change Was Made
Keep each request deadline active until its response consumer finishes. Successful archive downloads release that deadline after the status check and retain the existing chunk-idle timeout. Port the contributor's repair to the current split ClawHub modules and share response cleanup across metadata, downloads, and telemetry.
User Impact
Metadata and error responses stop at the existing request deadline. Progressing archive downloads can still take longer than 30 seconds. Error status, authentication, size limits, integrity checks, and read-only retry rules remain intact.
Evidence
openclaw plugins searchagainst an isolated loopback registry: baseline success/error bodies remained pending until the test owner stopped them at 37 seconds; the candidate closed both near 30 seconds and preserved HTTP 400. Delayed headers consumed the same original deadline.openclaw plugins installwith an owned fixture: a 35-second archive installed once; stalled and non-success streams timed out; oversized and corrupt archives were rejected.