Skip to content

fix(nextcloud-talk): reject excess concurrent webhook reads - #146356

Merged
eleqtrizit merged 4 commits into
openclaw:mainfrom
eleqtrizit:1048
Sep 13, 2026
Merged

eleqtrizit merged 4 commits into
openclaw:mainfrom
eleqtrizit:1048

Conversation

@eleqtrizit

@eleqtrizit eleqtrizit commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Nextcloud Talk webhook admitted an unbounded number of concurrent unauthenticated body reads: every incomplete request pinned a pre-auth reader for up to five seconds without ever consuming the authentication-failure budget, so any client that could reach the listener could hold arbitrary numbers of sockets, request objects, and timers and delay or block legitimate webhook deliveries. This PR acquires a listener-owned in-flight slot before the unauthenticated read, rejects overflow with an immediate close-aware HTTP 429, releases the slot after signature verification and before authenticated dispatch, and serializes each connection's requests through the shared HTTP request lifecycle so an overflow rejection can never destroy a socket ahead of an earlier queued acknowledgement — the same owner-level admission pattern already merged for the SMS and Feishu webhooks.

What was wrong

  1. extensions/nextcloud-talk/src/monitor.ts — the request handler awaited the full body read (64 KiB cap, 5 s timeout) with no aggregate admission bound. Only per-request limits existed, so concurrent incomplete requests multiplied without limit.
  2. extensions/nextcloud-talk/src/monitor.ts — the authentication-failure rate limiter records a failure only inside verifyWebhookSignature, which runs after the body read. Incomplete bodies therefore never consumed the abuse budget, and the per-client limiter could not bound the flood.
  3. extensions/nextcloud-talk/src/monitor.ts (introduced by the first two fixes in this PR, found in review) — a pipelined request on a keep-alive connection could reach the overflow rejection while an earlier signed delivery on the same connection was still waiting in durable admission. The rejection's close timer (1 s) then destroyed the socket while Node had the earlier 200 acknowledgement queued behind the 429, losing that acknowledgement.

Net effect: an unauthenticated remote client could exhaust pre-auth readers and sockets to degrade webhook availability (availability only — signature verification was never bypassed), and the naive bound would have traded that availability hole for lost acknowledgements on saturated keep-alive connections.

Why this design

  • Fail closed at the owning boundary: acquire the slot before the read so overflow is rejected immediately with Connection: close instead of pinning a reader for the full pre-auth timeout.
  • Release before authenticated dispatch so a slow handler cannot exhaust the pre-auth admission budget for other deliveries.
  • Serialize per connection through the shared lifecycle owner (runHttpConnectionRequest, now re-exported on openclaw/plugin-sdk/webhook-request-guards): a pipelined request's admission — including any rejection — starts only after every earlier response on that connection has finished, so the close timer can never outlive a queued acknowledgement.
  • No new config surface: a fixed 64-slot listener-owned limiter, matching the merged sibling-channel precedent; the SDK surface budget is bumped by exactly this one export.
  • Preserve existing contracts: 401/413/408/400/500 responses, the auth-failure limiter behavior, and the durable-acknowledgement header are unchanged; admission-stage payload validation still maps to 400.

Why this does not conflict with #136504 and #137230

PR Governed layer Relation to this PR
#136504 SMS webhook pre-auth admission Established the accepted owner-level pattern this PR follows; different channel handler
#137230 Feishu transport pre-auth admission Same shared limiter; confirms the acquire-before-read, release-after-verification placement

Only shared code is src/plugin-sdk/webhook-request-guards.ts (re-export added) and src/infra/http-request-lifecycle.ts (consumed, not modified). Both PRs are contained in this branch's base.

Evidence

Path Mode Before After
Nextcloud Talk webhook listener (real TCP, production handler) 65 concurrent incomplete unauthenticated bodies Request 66 admitted; socket left open; 0 recorded failures Request 65 receives immediate HTTP/1.1 429 with Connection: close
Same listener Valid signed delivery during/after the flood Held behind unbounded readers 200 with dispatch; recovery proven in the same test run
Same listener Pipelined request behind a saturated connection with admission pending past the 1 s close timer Acknowledgement lost: socket destroyed before the queued 200 flushed (acknowledgedAt = -1) 200 flushed with durable marker before the 429; ordering held on the wire
Same listener Invalid signature 401 + failure recorded Unchanged: 401 + failure recorded

Sink-level observations come from raw-socket runs against the production createNextcloudTalkWebhookServer listener before and after the change; the pipelined-acknowledgement regression test fails on the pre-ordering head (expected -1 to be greater than or equal to 0) and passes on this head.

Overload and delivery decisions

The operator accepts bounded overload refusal and documents it: the channel guide now records the 64-slot admission bound, the close-aware 429 overflow behavior, ordered keep-alive acknowledgements, and the explicit caveat that the budget is fixed and not configurable — deployments that regularly saturate it should reduce or buffer upstream concurrency (for example, cap reverse-proxy fan-in toward the listener) and accept that deliveries refused during saturation may be lost.

  • Overload response contract: 429 + Connection: close retained — the semantically correct per-listener admission signal, matching the merged SMS and Feishu precedent; 503 (proposed by fix(nextcloud-talk): bound concurrent pre-auth webhook reads #138278) implies service-level unavailability rather than a per-listener budget. If maintainers prefer 503, the switch is a one-line change in the rejection call.
  • Sender redelivery: documented as an accepted, unverified risk rather than a verified guarantee.
  • SDK ordering documentation: runHttpConnectionRequest's response-completion and closure semantics are documented on the SDK infrastructure page (pass the response for ordering; omitting it releases the next request early and loses the guarantee).
  • Acceptance record: the author/operator acceptance of this tradeoff is recorded in this comment; explicit maintainer acceptance for Nextcloud users is still requested per the review's Decision needed section.

Testing

  • New: extensions/nextcloud-talk/src/monitor.preauth-inflight.test.ts — real-TCP regressions for (a) the 64-slot overflow rejection and recovery, and (b) preservation of an earlier queued acknowledgement when a pipelined request hits overflow with admission pending past the close timer; (b) fails on the pre-ordering head and passes on this head.
  • New coverage for the replay suite's request-listener stub to match the shared lifecycle's response contract.
  • Unchanged-green: full extensions/nextcloud-talk suite — 28 test files, 195 tests, including the durable-acknowledgement and replay payload-validation suites.
  • Gates: tsgo:extensions:test, type-aware oxlint and oxfmt on touched files, check:changed --base upstream/main (including the Plugin SDK surface budget), and the assertion-SAFETY ratchet against upstream/main — all green.

Acquire a listener-owned in-flight limiter slot before the unauthenticated
webhook body read, reject overflow with a close-aware HTTP 429, and release
the slot after signature verification but before authenticated dispatch.

Incomplete requests previously pinned a pre-auth reader for the full timeout
without consuming the authentication-failure budget, letting any reachable
client hold unbounded numbers of sockets and readers to degrade webhook
availability. This follows the owner-level pattern merged for SMS (#136504)
and Feishu (#137230).
@clawsweeper

clawsweeper Bot commented Sep 12, 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 channel: nextcloud-talk Channel integration: nextcloud-talk size: S maintainer Maintainer-authored PR labels Sep 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 12, 2026, 7:58 PM ET / 23:58 UTC (Revision 7).

ClawSweeper review

What this changes

Caps Nextcloud Talk’s unauthenticated webhook reads at 64, closes overflow requests with HTTP 429, preserves acknowledgement ordering, and documents the shared plugin API.

Merge readiness

⛔ Blocked before merge - 4 items remain

The PR remains useful: current main still lacks this bound, and the prior ordering and documentation findings are resolved. The author’s explicit operator acceptance does not settle the outstanding maintainer decision.

Priority: P2
Reviewed head: 5a96210aa585b0fa563fb6b4e23be596739047f7
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with relevant transport proof and resolved prior findings; outstanding policy acceptance does not reduce patch quality.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): Recorded real-TCP runs exercise the production listener’s overflow closure, signed recovery, and delayed pipelined acknowledgement ordering; source inspection matches those scenarios. Sender redelivery remains an explicitly unproven tradeoff.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Recorded real-TCP runs exercise the production listener’s overflow closure, signed recovery, and delayed pipelined acknowledgement ordering; source inspection matches those scenarios. Sender redelivery remains an explicitly unproven tradeoff.
Evidence reviewed 9 items Current main still needs the change: The standalone listener reads each body before signature verification without an aggregate in-flight limiter; incomplete bodies never reach authentication-failure accounting.
Latest release comparison: The supplied latest release, v2026.9.4, also contains the listener without the proposed concurrency bound.
Admission and authentication boundary: The patch acquires before reading, releases in finally before authenticated dispatch, and preserves signature verification and durable acceptance. The production caller supplies spool.receive as the admission callback.
Findings None None.
Security None None.

How this fits together

Nextcloud Talk sends signed HTTP events to a plugin-owned listener. The listener reads and authenticates each event before handing it to durable storage and acknowledging acceptance.

flowchart TD
  A[Nextcloud webhook requests] --> B[Order requests per connection]
  B --> C{Read capacity available?}
  C -->|No| D[429 and connection close]
  C -->|Yes| E[Read body and verify signature]
  E --> F[Release read capacity]
  F --> G[Store authenticated event]
  G --> H[Send durable acknowledgement]
Loading

Decision needed

Question Recommendation
Should Nextcloud Talk adopt the fixed 64-read limit with closed 429 overflow responses and possible saturation loss, together with the documented SDK ordering export? Accept the documented contract: Approve the bounded overload behavior and SDK export, accepting possible refused-delivery loss in exchange for bounded pre-authentication readers.

Why: Production-boundary proof supports the implementation, but operator acceptance cannot establish the repository’s delivery tradeoff or public API commitment.

Before merge

  • Resolve merge risk (P1) - Existing deployments exceeding 64 concurrent unauthenticated reads will newly receive closed 429 responses, including for legitimate deliveries; unverified Nextcloud redelivery means saturation may lose messages.
  • Resolve merge risk (P1) - The new public SDK export commits to documented response-completion and connection-closure semantics and needs acceptance as a supported plugin contract.
  • Complete next step (P2) - Obtain maintainer acceptance of the fixed 64-read limit, closed 429 overflow responses, possible delivery loss, and documented SDK ordering export.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +54, Tests +258, Docs +13, Other +2. Total +327 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 124 70 +54
Tests 2 258 0 +258
Docs 2 13 0 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 2 +2
Total 7 399 72 +327

Review metrics

Metric Value Why it matters
Admission policy 64 concurrent reads; 0 new settings The fixed bound changes overload behavior for both existing and new deployments.
Public SDK expansion 1 added function export An existing internal lifecycle becomes a documented plugin contract.
Production versus test growth Production net +54 lines; tests net +258; tooling net +2 Production growth implements bounded admission and ordered acknowledgements; tests exercise those behaviors over real TCP.

Merge-risk options

Maintainer options:

  1. Accept bounded overload refusal (recommended)
    Record maintainer acceptance of the documented 64-read limit, closed 429 responses, delivery-loss caveat, and SDK contract.
  2. Hold for sender behavior evidence
    Pause landing until Nextcloud redelivery evidence supports the desired overload response and recovery contract.

Technical review

Best possible solution:

Retain the shared bounded-admission and ordered-response design with an explicitly accepted overload policy and supported SDK contract.

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

Yes, for the missing concurrency bound: current source admits incomplete bodies without an aggregate limit, and supplied TCP evidence exercises that path. Actual resource starvation was not independently reproduced.

Is this the best way to solve the issue?

Yes, the implementation reuses the existing limiter and connection lifecycle at the owning listener; selecting the overload response and accepting possible delivery loss remain maintainer judgments.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is focused availability hardening for one channel listener without demonstrated widespread service failure.
  • merge-risk: 🚨 compatibility: The fixed concurrency default changes existing deployment behavior and exposes a new supported SDK function.
  • merge-risk: 🚨 message-delivery: Legitimate overflow deliveries can be refused without verified sender redelivery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Recorded real-TCP runs exercise the production listener’s overflow closure, signed recovery, and delayed pipelined acknowledgement ordering; source inspection matches those scenarios. Sender redelivery remains an explicitly unproven tradeoff.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded real-TCP runs exercise the production listener’s overflow closure, signed recovery, and delayed pipelined acknowledgement ordering; source inspection matches those scenarios. Sender redelivery remains an explicitly unproven tradeoff.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record maintainer acceptance of the overload-delivery tradeoff and documented SDK export.

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 (6 earlier review cycles)
  • reviewed 2026-09-12T19:26:19.543Z sha aeed55b :: blocked before merge. :: [P2] Preserve earlier pipelined responses before closing overflow
  • reviewed 2026-09-12T20:29:27.441Z sha aeed55b :: blocked before merge. :: [P2] Preserve earlier pipelined responses before closing overflow
  • reviewed 2026-09-12T21:37:49.050Z sha aeed55b :: blocked before merge. :: [P2] Preserve earlier pipelined responses before closing overflow
  • reviewed 2026-09-12T23:08:03.975Z sha 16aad45 :: blocked before merge. :: none
  • reviewed 2026-09-12T23:30:34.071Z sha c685d7b :: blocked before merge. :: [P3] [P3] Replace the proxy-capacity advice with an effective mitigation
  • reviewed 2026-09-12T23:37:31.543Z sha 5a96210 :: blocked before merge. :: none

@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

… overflow

Serialize webhook admission per connection through the shared HTTP request
lifecycle (runHttpConnectionRequest, re-exported on the plugin SDK guards
subpath) so a pipelined request's overflow rejection only starts after every
earlier response on the connection finished. Covers the reviewed sequence with
real TCP: a saturated keep-alive connection with admission pending past the
one-second close timer must still deliver the earlier signed 200 before the
close-aware 429.
@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 12, 2026
…ordering

Record the 64-slot admission bound, its close-aware 429 overflow behavior,
ordered keep-alive acknowledgements, and the unverified sender-redelivery
risk in the channel guide. Document runHttpConnectionRequest's
response-completion and closure semantics for plugin-owned webhook
listeners on the SDK infrastructure page.
@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

The 64-read admission budget is hard-coded and not configurable, so raising
reverse-proxy connection limits cannot relieve saturation and can feed more
requests into the rejection path. Advise reducing or buffering upstream
concurrency instead, and state plainly that the budget is fixed.
@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@eleqtrizit

Copy link
Copy Markdown
Contributor Author

Recording the overload-tradeoff acceptance requested by this review's Before merge items:

As the author and the operator deploying this listener, I accept the fixed 64-read admission limit, the close-aware 429 overflow responses, and possible delivery loss during saturation. Nextcloud Talk's retry behavior for refused deliveries is unverified; the accepted mitigation is documented in docs/channels/nextcloud-talk.md: the budget is fixed and not configurable, and deployments that regularly saturate it should reduce or buffer upstream concurrency (for example, cap reverse-proxy fan-in toward the listener).

Scope note: I am the PR author, not an openclaw/openclaw maintainer — this records the author/operator acceptance and the documented tradeoff. Explicit maintainer acceptance for Nextcloud users is still requested per the review's Decision needed section.

@eleqtrizit

Copy link
Copy Markdown
Contributor Author

Merge record

Summary: The Nextcloud Talk webhook listener previously admitted an unbounded number of concurrent unauthenticated body reads, so any client that could reach the port could occupy pre-auth readers and sockets for up to five seconds each, delaying or blocking legitimate webhook deliveries. This PR acquires a listener-owned in-flight slot before the unauthenticated read, rejects overflow with an immediate close-aware HTTP 429, releases the slot after signature verification and before authenticated dispatch, and serializes each connection through the shared HTTP request lifecycle so an overflow rejection can never destroy a socket ahead of an earlier queued acknowledgement. The documented overload tradeoff — fixed 64-read limit and possible delivery loss during saturation with unverified sender redelivery — is accepted by the author/operator and recorded in the channel guide and PR discussion.

Decision Reason for Merge: Merged because ClawSweeper's final review found no actionable defects and rated the patch correct (platinum hermit 4/6, ready for maintainer look), the real-TCP proof verified the fixed behavior, the author accepted the documented overload tradeoff, and the sole failing CI check was a timing-flaky core test unrelated to this PR's files — the same flake failing other PRs — with all other checks green.

Compatibility Checks Done: Full extension suite (28 files, 195 tests) green locally; tsgo:extensions:test, type-aware oxlint, oxfmt, check:changed including the Plugin SDK surface budget, and the assertion-SAFETY ratchet all green on the merged head; ClawSweeper's final review verified the real-TCP proof and rated proof sufficient (platinum hermit, no findings); compatibility re-verified SAFE on the final state (additive SDK re-export and documentation only, no config surface, no contract change for existing callers); GitHub CI on the head: 173 checks green with one timing-flaky core test unrelated to the PR's files — the same flake observed on other PRs — rerun in progress at merge time.

@eleqtrizit
eleqtrizit enabled auto-merge (squash) September 13, 2026 00:02
@eleqtrizit
eleqtrizit merged commit b04aaad into openclaw:main Sep 13, 2026
380 of 384 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 13, 2026
…#146356)

* fix(nextcloud-talk): reject excess concurrent webhook reads

Acquire a listener-owned in-flight limiter slot before the unauthenticated
webhook body read, reject overflow with a close-aware HTTP 429, and release
the slot after signature verification but before authenticated dispatch.

Incomplete requests previously pinned a pre-auth reader for the full timeout
without consuming the authentication-failure budget, letting any reachable
client hold unbounded numbers of sockets and readers to degrade webhook
availability. This follows the owner-level pattern merged for SMS (openclaw#136504)
and Feishu (openclaw#137230).

* fix(nextcloud-talk): preserve queued acknowledgements under pipelined overflow

Serialize webhook admission per connection through the shared HTTP request
lifecycle (runHttpConnectionRequest, re-exported on the plugin SDK guards
subpath) so a pipelined request's overflow rejection only starts after every
earlier response on the connection finished. Covers the reviewed sequence with
real TCP: a saturated keep-alive connection with admission pending past the
one-second close timer must still deliver the earlier signed 200 before the
close-aware 429.

* docs(nextcloud-talk): document overload admission and SDK connection ordering

Record the 64-slot admission bound, its close-aware 429 overflow behavior,
ordered keep-alive acknowledgements, and the unverified sender-redelivery
risk in the channel guide. Document runHttpConnectionRequest's
response-completion and closure semantics for plugin-owned webhook
listeners on the SDK infrastructure page.

* docs(nextcloud-talk): correct overload mitigation guidance

The 64-read admission budget is hard-coded and not configurable, so raising
reverse-proxy connection limits cannot relieve saturation and can feed more
requests into the rejection path. Advise reducing or buffering upstream
concurrency instead, and state plainly that the budget is fixed.
@eleqtrizit eleqtrizit self-assigned this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: nextcloud-talk Channel integration: nextcloud-talk maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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