//! Synthetic response frames — `CommandComplete` + `ReadyForQuery`
//! sequences that halephant fabricates when it intercepts a client
//! statement instead of forwarding it to the upstream.
//!
//! Used by the transaction forwarder for LISTEN/UNLISTEN
//! (multiplex mode), DEALLOCATE, and Close-statement interception.
use SinkExt;
use TcpStream;
use Framed;
use crateBackendMessage;
use crateFrontendCodec;
use crateTransactionStatus;
/// Send a synthetic `CommandComplete(tag)` followed by
/// `ReadyForQuery(status)` to the client as if the server had
/// processed the intercepted statement.
///
/// The `status` parameter **must** match the actual session state
/// at the call site — sending `Idle` from inside an open
/// transaction makes the client believe the transaction is over.
/// The transaction forwarder threads the most recent server
/// `ReadyForQuery` status through to guarantee this.
pub async