fix: time out well-known agent-skills upstream fetch - #3621
Conversation
GET/HEAD /{owner}/skills/{slug}/.well-known/agent-skills/index.json
fetched Convex with no AbortSignal, so a stalled upstream held the
Node request until the platform limit.
Pass AbortSignal.timeout(10s) on the upstream fetch.
Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
|
@SebTardif is attempting to deploy a commit to the OpenClaw Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
🦞👀 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. |
|
Codex review: needs real behavior proof before merge. Reviewed September 11, 2026, 10:09 AM ET / 14:09 UTC (Revision 2). ClawSweeper reviewWhat this changesAdds a ten-second upstream deadline to the skill discovery endpoint’s GET and HEAD requests, with tests for signal propagation and cancellation. Merge readiness⛔ Blocked before merge - 2 items remain The fix remains necessary: current main and v0.23.3 still lack this timeout. No blocking code findings; the previously requested real-transport proof remains outstanding. Priority: P2 Review scores
Verification
How this fits togetherClawHub’s skill discovery endpoint lets installers retrieve metadata through a skill-page URL. The website proxies requests to its Convex public API and returns selected headers and the discovery body. flowchart TD
A[Installer requests skill metadata] --> B[Website discovery endpoint]
B --> C[Convex API fetch]
C --> D{Completes within ten seconds?}
D -->|Yes| E[Forward status and selected headers]
E --> F[GET body or empty HEAD response]
D -->|No| G[Abort and fail request]
Before merge
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. Technical reviewBest possible solution: Keep the deadline local to the discovery fetch, preserving successful GET bodies, HEAD semantics, and selected response headers. Do we have a high-confidence way to reproduce the issue? Yes, from source: both discovery methods await an upstream fetch without an application deadline on current main. A silent HTTP origin exercises that path; this read-only review did not execute it. Is this the best way to solve the issue? Yes, this is the narrowest fix for the identified fetch. Reusing the OG helper would import a different timeout policy, while changing CLI discovery would leave this website request unbounded. 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 (1 earlier review cycle)
|
What Problem This Solves
Fixes an issue where users or installers requesting
/{owner}/skills/{slug}/.well-known/agent-skills/index.jsonwould hang when the Convex/api/v1/agent-skills/.../index.jsonupstream accepted the connection but never answered. The TanStack server handler fetched that URL with no abort signal, so the Node request stayed open until the platform limit.Why This Change Was Made
The GET and HEAD handlers now pass
AbortSignal.timeout(10_000)on the upstream fetch. That matches the 10s outbound deadline already used for changelog and embeddings fetches. The change is only the missing deadline; response header filtering is unchanged.User Impact
A stalled Convex discovery response now fails instead of holding the well-known skill page request until the host times out. Successful lookups are unchanged.
Evidence
Live
bunimport offetchAgentSkillsDiscoveryfrom this branch. Fetch hung until the abort signal fired. The call rejected withTimeoutErrorin 84ms (proof used an 80ms abort stand-in for the 10s product timeout). The handler still requested 10000ms.Unfixed main
fetchAgentSkillsDiscoveryhas nosignalon the Convex fetch. Sibling OG helpers already abort hung public API reads. CLI registry discovery already times out (#3378).Real behavior proof
fix/well-known-agent-skills-timeoutonorigin/maind3bde70e, livebunimportingfetchAgentSkillsDiscoverywith a hung fetch.bun well-known-timeout-proof.mjsfrom the patched worktree (proof helper not committed).TimeoutError. Elapsed time is 84ms, not the platform request limit. Product timeout remains 10000ms.Summary
This hang has been present since
7aff40d2in #3233 (2026-07-22). Related same-repo timeouts: #3471 (OG), #3378 (CLI registry discovery), #3579 (Hermit), #3615 (changelog OpenAI).Tracker
Ref #3676
That issue stays open if this PR is closed without landing on main.