Skip to content

fix: cap shared storage and extend deny-only recovery - #143

Merged
LIghtJUNction merged 6 commits into
mainfrom
fix/capacity-recovery-20260928
Sep 28, 2026
Merged

LIghtJUNction merged 6 commits into
mainfrom
fix/capacity-recovery-20260928

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Contributor

Summary

  • Port the still-relevant durability bounds from the old src/msgd PRs onto current src/msg: SSH receive-pack stdin size and timeout, deployment Git byte cap, staged transfer rows/bytes, keystore ciphertext, pending CSRs, webhook queue, idempotency results, and ACK reactions. Purge tombstones keep only the newest bounded set. Finished webhook jobs are reclaimed before new work is refused.
  • Add topic_ban.lift to the deny-only recovery checkpoint, without a promotion path.
  • Add identity.todo_put@2 so a todo revision can carry its own content signature. Version 1 stays compatible.

Not closed

Test plan

  • pytest tests/test_capacity_bounds.py tests/test_personal_content_signatures.py tests/test_task_a_recovery_checkpoint.py tests/test_notes_todos.py tests/test_ssh_rss.py tests/test_dictionary.py tests/test_extensions.py tests/test_transfer.py tests/test_subject_read_aliases.py (41 + 23 + 10 passed)
  • Exact-head CI on this PR

Made with Cursor

Bound SSH Git input, staged transfers, keystores, CSRs, webhooks, receipts, and purge records so fresh identities cannot fill the deployment. Replay can now lift topic bans, and todo writes can carry an independent revision signature.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings September 28, 2026 13:17

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-28T13:27:53.252253Z d0f348e PR opened

Security findings

Advisory findings (1)

ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: d0f348e484

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread src/msg/storage/sqlite.py
Comment on lines +410 to +411
from msg.storage.capacity import require_result_capacity
require_result_capacity(self)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Codex Security Review · Automatically triggered

P1 Badge Security: Reclaim result rows before enforcing the global cap

A normal signed user with read access to one public post can submit 100,000 successful discussion.like/unlike calls with fresh request IDs. Every non-read operation reaches save_result, and this new deployment-wide check then rejects every subsequent result, rolling back new writes for all identities; PostgresSession inherits this method. The shipped nginx has no request-rate limit, and no code deletes or expires result rows, so the outage persists until database intervention. Use bounded per-principal retention/quotas (with compact idempotency tombstones) rather than a terminal global write gate.

Useful? React with 👍 / 👎.

The old pay, dispute, and package shortcuts named operations and fields that the registry no longer publishes. Bind them to the live operations without merging the stale branch that would drop the security repairs already on main.

Co-authored-by: Cursor <cursoragent@cursor.com>
LIghtJUNction and others added 3 commits September 28, 2026 21:45
orders.history is no longer a registered operation, so the shortcut was dropped; keep the exact-routing assertion on the live read-only order entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
c77fbf3 accidentally committed unrelated staged packaging moves; put setup.py, MANIFEST.in and docs/system back so #143 only carries its own changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Installed services can no longer depend on a repo-only docs/system path, so the rules move into msg.data and the build switches to uv_build.

Co-authored-by: Cursor <cursoragent@cursor.com>
@LIghtJUNction
LIghtJUNction merged commit 4d93186 into main Sep 28, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants