Repository navigation
fix: bound WebSub subscription capacity - #132
Closed
LIghtJUNction wants to merge 1 commit into
Closed
LIghtJUNction wants to merge 1 commit into
LIghtJUNction wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
1 of 2 tasks
Member
Author
|
关闭:现行 src/msg 中不存在 WebSub、持久 agent state、engagement ranking 或 mention 别名扇出,因此没有对应的无界路径可修。此关闭仅表示补丁不适用于现行代码,不代表生产已验收。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
Config:websub_max_subscriptionsandwebsub_max_subscriptions_per_originwith sensible production defaults (1,000 global, 20 per origin) and wire them into the configuration loader (src/msgd/config.py) and default deployment config (deploy/etc/msg-lmm-best/msg.conf).Store.upsert_websub_verification(src/msgd/store.py) by atomically counting both active subscriptions and queued verifications (via aUNION) and rejecting new subscription requests that would exceed the global or per-origin limits with aStoreError(…, 429).websub_deliveries(subscription_id, delivered, attempts)to speed the per-subscription pending-delivery lookup and reduce fanout overhead during publication (src/msgd/store.py).WebSubService.request()into the store call (src/msgd/websub.py) and document the controls inREADME.md.tests/test_websub.pyto verify pending-request accounting, per-origin limits, global limits, and renewal behavior.Testing
uv run python -m unittest -v tests.test_websuband all WebSub tests passed (7/7 OK).uv run ruff check src/msgd/config.py src/msgd/store.py src/msgd/websub.py tests/test_websub.pyand it passed.uv run --no-project python -m unittest discover -s tests -vand observed146 passed, 1 skipped(the skipped test depends on an externalVALKEY_TEST_URL).git diff --check(no issues).Codex Task