Skip to content

perf(test): replace ingress capacity waits - #124630

Merged
steipete merged 1 commit into
mainfrom
perf/ingress-capacity-tests
Aug 16, 2026
Merged

steipete merged 1 commit into
mainfrom
perf/ingress-capacity-tests

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The LINE and Microsoft Teams ingress concurrency regressions wait 1.1 seconds and 600 milliseconds respectively to prove that a ninth durable delivery does not exceed each plugin's eight-delivery cap. The ninth admission already requests an explicit second drain pump, so waiting for periodic timer pumps adds wall time without strengthening the owner-boundary assertion.

Why This Change Was Made

Replace both elapsed observation windows with deterministic pump and durable-state proof:

  • Record the queue scan count after the first eight deliveries occupy every slot.
  • Admit the ninth event, which explicitly requests another drain pump.
  • Wait until that pump scans the durable queue.
  • Assert the ninth event remains pending with its exact event id and lane while only eight deliveries are active.

The real SQLite-backed queue, plugin ingress wrappers, shared monitor, adoption lifecycle, and blocked delivery promises remain. Production behavior is unchanged.

User Impact

Maintainers get roughly 1.5 seconds faster feedback from these two extension suites without weakening the per-plugin concurrency-cap regression.

Evidence

Controlled same-Testbox A/B on tbx_01m05d90rdmy52emrah1vt62vc, with one excluded warmup and two retained samples per state, the same commands, one worker, distinct filesystem module caches, import diagnostics, and /usr/bin/time -v:

Metric Before After Gain
Wall 17.75s 16.28s -1.47s (-8.3%)
Vitest 17.61s 16.14s -1.47s (-8.4%)
Test body 9.58s 8.02s -1.56s (-16.3%)
Imports 4.02s 4.07s effectively flat

CPU and peak RSS were effectively flat/noisy, so this PR makes no resource-usage claim.

Validation:

  • LINE and Microsoft Teams focused suites: 29/29 tests passed.
  • Capacity tests passed 10/10 repeated focused runs.
  • Shared ingress-monitor owner suite: 22/22 tests passed.
  • Nextcloud Talk sibling concurrency suite: 13/13 tests passed.
  • Mutation proof: changing either plugin's production delivery cap from 8 to 9 makes its rewritten test fail immediately with 9 active deliveries.
  • Full post-rebase extension changed gate passed, including typecheck, targeted lint, plugin boundaries, dead exports, formatting, and assertion guards.
  • Fresh post-rebase autoreview: no accepted/actionable findings.
  • Production LOC: +0/-0; test LOC: +27/-6.

Benchmark Testbox workflow: https://github.com/openclaw/openclaw/actions/runs/31950863434

Final post-rebase changed gate: https://github.com/openclaw/openclaw/actions/runs/31951565544

AI-assisted: yes. The change and evidence were reviewed by the maintainer agent and fresh structured autoreview.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 16, 2026 14:09
@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line channel: msteams Channel integration: msteams size: XS maintainer Maintainer-authored PR labels Aug 16, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for de67b3c969bcac42b9009a4d9534385072d25ca7:

@steipete
steipete merged commit ea77e21 into main Aug 16, 2026
156 of 165 checks passed
@steipete
steipete deleted the perf/ingress-capacity-tests branch August 16, 2026 14:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: line Channel integration: line channel: msteams Channel integration: msteams maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant