Repository navigation
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewPR #1109 adds read-only transaction support for MCP reads on plugin drivers. Previously only built-in drivers ran MCP reads in a read-only transaction; Changes verified:
No existing inline comments or reviews were present on this PR. No issues identified. Files Reviewed (2 files)
Fix these issues in Kilo Cloud Reviewed by free · Input: 196.9K · Output: 14.5K · Cached: 546.7K |
|
Reviewed this alongside its companion plugin PR (tabularis-postgresql-plugin#151). Focused on the host-side wiring here. This side is necessary — and correctThe fallback design is the right shape. MCP reads on plugin connections today hit the trait default The
|
|
Thanks for the host-side wiring and the forwarding/fallback tests. The protected plugin RPC has now landed through #1463 with the read_only_queries capability. Legacy plugins retain their existing path until they opt in; an opted-in plugin must fail closed if its protected RPC fails. Companion plugins can advertise that capability once their implementation is ready. #1324 covers plugin-owned query classification separately. I am closing this draft as superseded by that host implementation. Any remaining gap can be handled as a focused follow-up against the current contract. Since this is your first PR here, you are welcome to join us on Discord: https://discord.com/invite/K2hmhfHRSt |
MCP reads on built-in drivers run in a read-only transaction, so the database rejects any write the classifier misses. Plugin drivers didn't get this:
RpcDriverused the trait default, which is a plainexecute_query.RpcDriver::execute_read_only_querynow calls a newexecute_read_only_queryplugin method and falls back toexecute_querywhen the plugin answers "method not found", so existing plugins behave as before. The PostgreSQL plugin implements it in TabularisDB/tabularis-postgresql-plugin#151.How to test
cargo build --release) and replace the installedpostgresql-pluginbinary with it.run_querywithSHOW transaction_read_only:main:offonoff), via the fallback.Unit tests:
cargo test --lib read_only_query(forwarding, the -32601 fallback, and other errors still surfacing).