Skip to content

Reclaim content from expired uploads automatically - #128

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

LIghtJUNction wants to merge 1 commit into
mainfrom
codex/propose-fix-for-storage-exhaustion-vulnerability

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Member

Motivation

  • Prevent unprivileged temporary identities from exhausting storage by ensuring expired uploads release their content pins and become reclaimable.

Description

  • Unpin persisted chunks for an expired transfer before deleting their metadata by adding an unpin loop in _cleanup in src/msg/workers/maintenance.py.
  • Schedule content reclamation by invoking collect_garbage from the recurring worker loop in src/msg/daemon.py.
  • Add a regression test test_expired_upload_releases_chunk_pins in tests/test_transfer.py that creates an unspecified-size upload, advances the clock past expiry, runs cleanup_expired, and asserts the chunk pin and chunk rows are removed.

Testing

  • Compiled the modified modules with python -m compileall which succeeded for the changed files.
  • Ran repository checks (git diff --check and ruff) and updated imports/formatting where needed.
  • Attempted to run the transfer test suite with pytest tests/test_transfer.py; test execution was blocked by the environment lacking the PostgreSQL initdb executable so the fixture-backed tests could not complete (the new regression test is present and will run in CI where initdb/Postgres is available).

Codex Task

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

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:50:03.885390Z 39e3a9c 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
Member Author

已被合并的 #142(merge commit edf0d55)取代,关闭。这些分支基于集成前的树,直接合并会与主线上的安全修复冲突或重复。

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