Fix Discord queue backpressure and related read-path bottlenecks#79562
Fix Discord queue backpressure and related read-path bottlenecks#79562neuroradgist wants to merge 9 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 3, 2026, 11:47 PM ET / 03:47 UTC. Summary PR surface: Source +577, Tests +772. Total +1349 across 22 files. Reproducibility: yes. for the review findings by source inspection: current main and the PR diff differ on Discord replay/cleanup, Codex timeout semantics, transcript sidecar state, and generated config metadata; no live reproduction was established for the original load claim. Review metrics: 3 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Split or rework this into narrow owner-bounded PRs that preserve retry and cleanup semantics, avoid blanket Codex deadlines, keep transcript idempotency in owned storage, align generated config metadata if queue controls stay, and add redacted live behavior proof. Do we have a high-confidence way to reproduce the issue? Yes for the review findings by source inspection: current main and the PR diff differ on Discord replay/cleanup, Codex timeout semantics, transcript sidecar state, and generated config metadata; no live reproduction was established for the original load claim. Is this the best way to solve the issue? No; this is a broad mitigation rather than the best fix, and the safer path is smaller owner-bounded changes that preserve existing delivery, timeout, and storage contracts unless maintainers explicitly approve new policy. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d68f877ac3e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +577, Tests +772. Total +1349 across 22 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
7085180 to
9575627
Compare
9575627 to
bd224fb
Compare
|
Checks are passing and the branch is up to date with main. Ready for maintainer review/merge when convenient. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Thanks for the contribution. I’m closing this broad branch because it changes Discord delivery, session state, configuration, and Codex timeout behavior without the live proof needed for those compatibility-sensitive surfaces. Please split any still-current fixes into focused PRs against current |
Adds regression coverage and targeted performance/backpressure fixes for Discord queues, media downloads, preview writes, transcript idempotency, Codex RPC writes, and session-store reads.
Real behavior proof
Behavior or issue addressed:
This PR addresses real backpressure/read-path risk in the OpenClaw runtime: Discord queues and media handling can build up work, Codex app-server stdin writes can ignore backpressure, transcript idempotency checks can repeatedly scan transcript files, and session-history reads can synchronously load more session-store data than needed.
Real environment tested:
Real local OpenClaw checkout on macOS at /Users/openclaw/dev/openclaw, on branch fix/discord-queue-backpressure, pushed to neuroradgist/openclaw and opened as #79562.
Exact steps or command run after this patch:
Ran these commands from the real checkout after the patch:
Evidence after fix:
Copied terminal output from the real checkout:
git status
On branch fix/discord-queue-backpressure
Your branch is up to date with 'neuroradgist/fix/discord-queue-backpressure'.
gh pr checks 79562 --repo openclaw/openclaw --watch
89 successful, 19 skipped, and 0 pending checks.
CI/check passed.
CI/check-additional passed.
CI/check-lint passed.
CI/check-prod-types passed.
CI/check-test-types passed.
CI/check-additional-extension-bundled passed.
pnpm lint --threads=8
Found 0 warnings and 0 errors.
pnpm run lint:extensions:bundled
Found 0 warnings and 0 errors.
pnpm tsgo:core
passed.
pnpm tsgo:test
passed.
pnpm test src/config/sessions/transcript.test.ts extensions/discord/src/monitor/message-utils.test.ts extensions/discord/src/monitor/message-run-queue.test.ts -- --reporter=verbose
[test] passed 2 Vitest shards in 4.91s.
Runtime-config transcript tests: 16 passed.
Extension-discord message/media/run-queue tests: 49 passed.
Observed result after fix:
The PR branch is pushed and the affected code checks are green on GitHub Actions. The earlier type and lint failures were fixed. The real checkout shows the branch clean/up to date after pushing, and the PR checks show no pending code checks.
What was not tested:
I did not run a live Discord bot against production Discord traffic, did not run a live Codex app-server process, and did not perform a long-duration production load test.