Skip to content

Bound persistent webhook delivery storage - #138

Closed
LIghtJUNction wants to merge 1 commit into
mainfrom
codex/propose-fix-for-webhook-delivery-vulnerability
Closed

LIghtJUNction wants to merge 1 commit into
mainfrom
codex/propose-fix-for-webhook-delivery-vulnerability

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Contributor

Motivation

  • Prevent unbounded webhook delivery fan-out from duplicating full post payloads into SQLite and exhausting disk capacity by adding global queue limits and prompt cleanup.

Description

  • Add webhook_max_queued_deliveries configuration and load/validate it in Config so the delivery queue has a tunable global row cap. (src/msgd/config.py, deploy/etc/msg-lmm-best/msg.conf)
  • Enforce a global queue quota in Store.queue_webhook_event by checking current delivery row count and total serialized delivery bytes (against cfg.max_storage_bytes) before inserting new delivery rows. (src/msgd/store.py)
  • Remove successful deliveries and deliveries that exhaust retry attempts immediately from webhook_deliveries to reclaim queue capacity instead of retaining them for days. (src/msgd/store.py)
  • Surface and document the new queue limits in rendered metadata and README. (src/msgd/render.py, README.md)
  • Add a regression unit test that exercises row-count limiting, payload-byte limiting, successful-delivery cleanup, and retry-exhaustion cleanup. (tests/test_webhooks.py)

Testing

  • Ran static checks with uv run ruff check . which passed.
  • Ran focused unit tests with uv run python -m unittest tests.test_webhooks -v and uv run python -m unittest discover -s tests -q, all executed tests passed (4 focused webhook tests passed; full test run: 146 tests passed, 1 skipped).
  • Verified repository formatting and linting with uv run ruff format as part of the test workflow.

Codex Task

Copilot AI lite review requested due to automatic review settings September 28, 2026 11:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-28T11:57:39.965799Z 924d1ed PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@LIghtJUNction

Copy link
Copy Markdown
Contributor Author

已被 #143 取代,关闭。旧补丁打在已删除的 src/msgd 上;现行 src/msg 的对应容量上限在分支 fix/capacity-recovery-20260928(head e77b53b),该分支已包含合并后的 #142。

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants