Repository navigation
fix: Arm the archive write guard in write-capable MCP - #5241
Conversation
polylogued run already installs the connection-level guard. Standalone MCP with write or maintenance enabled is a separate writer process and did not, so an unleased sqlite3.connect onto an archive tier could still contend through the busy timeout. Read-only MCP is left unarmed.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedNext included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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. |
Summary
Standalone MCP with write or maintenance enabled now arms the same connection-level archive write guard that
polylogued runarms. Read-only MCP is left unarmed.Problem
PR #5232 installed
install_archive_write_guardon the daemon writer boundary. HTTP is started from that same process, so it was already covered.polylogue-mcpis a separate process: withwriteormaintenanceenabled it mutates archive tiers without the guard, so an unleasedsqlite3.connectonto a tier file can still contend through the busy timeout (polylogue-8qm4k).Solution
serve_stdioarmsarm_write_lease_enforcement(process_wide=True)andinstall_archive_write_guard()when write or maintenance is enabled.server.run.This is the MCP slice of the #5232 residual.
index_generationwritable opens that are not explicitly leased remain.Verification
tests/unit/mcp/test_server_runtime.pytests/unit/storage/test_write_guard.py