fix: abort hung Hermit content-rights proxy fetches - #3579
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@SebTardif is attempting to deploy a commit to the OpenClaw Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
Codex review: needs real behavior proof before merge. Reviewed September 11, 2026, 10:08 AM ET / 14:08 UTC (Revision 28). ClawSweeper reviewWhat this changesAdds a 10-second timeout to staff content-rights case reads and correspondence uploads, with a mocked stalled-request regression test. Merge readiness⛔ Blocked before merge - 8 items remain The fix remains necessary: current main and v0.23.3 still leave Hermit requests unbounded. The three prior findings remain unresolved, and the supplied terminal evidence only partially exercises the changed production path. Priority: P2 Review scores
Verification
How this fits togetherClawHub’s admin HTTP API authenticates staff requests and forwards case reads and correspondence attachments to Hermit. It then converts Hermit’s response into the response returned to the admin client. flowchart LR
A[Admin CLI] --> B[Authenticate and authorize staff]
B --> C[Content-rights proxy]
C --> D[Hermit case service]
D --> E[Read response body]
C --> F[Deadline expires]
E --> G[Admin response]
F --> G
Decision needed
Why: Source proves that the new 10-second cutoff can reject previously successful uploads, but neither representative upload evidence nor an approved service latency contract establishes the right replacement budget. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Bound complete Hermit responses inside the 502 error boundary, preserve an explicitly approved attachment-upload budget, and document how staff verify an uncertain correspondence result before retrying. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main has no outbound deadline, and the patch’s body-read rejection escapes its catch block. No runtime reproduction was executed during this read-only review. Is this the best way to solve the issue? Not yet: the proxy is the right repair location, but complete body consumption must be awaited and the upload budget resolved. A CLI-only timeout would leave the Convex action running; the unrelated OG helper is not a substitute for fixing this owner. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cbfee7343ddc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (27 earlier review cycles; latest 8 shown)
|
The admin content-rights proxy called fetch with no AbortSignal. A stalled forms.openclaw.ai host could hold the Convex action until the platform limit. Pass AbortSignal.timeout on both Hermit fetches. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
6a6c065 to
ad060dd
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What Problem This Solves
Fixes an issue where staff using the admin content-rights proxy would hang the Convex action when
forms.openclaw.ai(orHERMIT_CONTENT_RIGHTS_BASE_URL) accepted the TCP connection and never finished the GET case or POST correspondence response. The proxy calledfetchwith no abort signal. A stalled Hermit host held the action until the platform limit.The same hang class was already closed for public OG metadata fetches in PR #3471 and for registry discovery in PR #3378. The admin Hermit proxy did not get that deadline.
Why This Change Was Made
Both Hermit
fetchcalls now passAbortSignal.timeout(10_000). Ten seconds is long enough for an admin form POST with attachments, and short enough that a silent Hermit host cannot pin a Convex action. The existing catch path still returns HTTP 502Hermit content rights service unavailable. MissingCLAWHUB_BAN_APPEALS_TOKENis still 503 and never contacts Hermit.User Impact
Staff content-rights GET and correspondence POST fail closed after 10 seconds when Hermit stalls, instead of sitting on the action until Convex kills it. Successful Hermit replies are unchanged.
Evidence
Live
bunon Darwin arm64, Node v26.7.0, worktree/tmp/clawhub-F005at6a6c06597ae17451c8aa47254e6a967119df2ab4. Script/tmp/clawhub-f005-proof.mjsstarts a localnode:httpserver that never writes a response, then:fetch(hangUrl)with no signal against an 800ms harnessfetch(hangUrl, { signal: AbortSignal.timeout(400) })proxyHermitContentRightsRequestwith a never-settlingfetchthat rejects only wheninit.signalabortsWithout a signal, the mute origin is still waiting when the 800ms harness fires.
AbortSignal.timeout(400)aborts in 405ms. The product proxy, using the 10s constant, returns 502 at 10004ms instead of hanging.The untimeouted fetches landed in 3c9d4f12109bfd9b3ef8a42033228770f1bbe1d1 (
origin/mainblame onconvex/httpApiV1/contentRightsV1.tsGET around line 48 and POST around line 58), shipped today in #3493.Real behavior proof
forms.openclaw.aifetch after 10 seconds and returns 502 instead of holding the Convex action./tmp/clawhub-F005on6a6c06597ae17451c8aa47254e6a967119df2ab4. Proof used a local mutenode:httpserver plus productionproxyHermitContentRightsRequest./tmp/clawhub-F005, ranbun /tmp/clawhub-f005-proof.mjs. That process listened on an ephemeral port, issued an unboundedfetchagainst the mute server, issuedfetchwithAbortSignal.timeout(400), then called the production proxy with afetchthat only rejects when the abort signal fires.fetchhitHARNESS_TIMEOUTat 808ms.AbortSignal.timeout(400)printedTimeoutError The operation timed out.at 405ms. The product proxy printedproxy_status 502andHermit content rights service unavailableat 10004ms.AbortSignal.timeoutfires, and staff get HTTP 502 from the existing unavailable path.Notes
Same hang class as OG metadata in PR #3471 (1.5s). This admin proxy uses 10s because correspondence POST can carry attachments.
Allow edits from maintainers is enabled.
Tracker
Ref #3671
That issue stays open if this PR is closed without landing on main.