Version the request a send loaded, not a second read of it

Since the plugin fix, every HTTP send versioned the stored row by
reading it again in resolve_send_inputs. On the desktop that read runs
after awaiting plugin startup, so an edit landing in between was
versioned while the earlier copy was sent, and the response named
content it never sent.

Callers now say where their request came from. One that loaded the
stored row and passes it on as is (the desktop send, the by-id sends,
MCP) gets that same copy versioned, with no second read. One that may
hold a rendered request (plugin sends) keeps the read-by-id fallback,
so rendered values still never reach history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Gregory SchierandClaude Opus 5.5 authored and Stetta task tk_mw563e1dcqtc4sqh committed 2026-11-10 14:39:11 -07:00
1 parent 07956fe68e
commit 4686d6b4a5
6 files changed
+153 -20

No files matched your search

+5 -1
View File
@@ -5,7 +5,9 @@ use rand::RngExt;
use std::net::{Ipv4Addr, SocketAddr};
use std::path::PathBuf;
use std::sync::Arc;
use yaak::send::{SendHttpRequestWithPluginsParams, send_http_request_with_plugins};
use yaak::send::{
SendHttpRequestWithPluginsParams, SendRequestSource, send_http_request_with_plugins,
};
use yaak_crypto::manager::EncryptionManager;
use yaak_http::manager::HttpConnectionManager;
use yaak_mcp::{HostResult, McpHost, WorkspaceInfo};
@@ -215,6 +217,8 @@ impl McpHost for CliMcpHost {
query_manager: &self.query_manager,
blob_manager: &self.blob_manager,
request,
// The MCP server loads the request by id and passes the row on as it is
request_source: SendRequestSource::Stored,
environment_id: environment_id.as_deref(),
update_source: UpdateSource::Sync,
cookie_jar_id,
+5 -1
View File
@@ -14,7 +14,9 @@ use yaak::plugin_events::{
GroupedPluginEvent, HostRequest, SharedPluginEventContext, handle_shared_plugin_event,
};
use yaak::response_body::FileResponseBodyStore;
use yaak::send::{SendHttpRequestWithPluginsParams, send_http_request_with_plugins};
use yaak::send::{
SendHttpRequestWithPluginsParams, SendRequestSource, send_http_request_with_plugins,
};
use yaak_crypto::manager::EncryptionManager;
use yaak_http::cookies::get_cookie_value_from_jar;
use yaak_http::manager::HttpConnectionManager;
@@ -255,6 +257,8 @@ async fn build_plugin_reply(
query_manager: &host_context.query_manager,
blob_manager: &host_context.blob_manager,
request: http_request,
// A plugin may have rendered it, so it is versioned from the stored row
request_source: SendRequestSource::Supplied,
environment_id: environment_id.as_deref(),
update_source: UpdateSource::Plugin,
cookie_jar_id,