You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 020a765
Browse filesBrowse the repository at this point in the historyBrowse files
Larry
committed
test(acp): prove DM steer through the dispatch handoff
The DM native-steer rule reads the running prompt's classification
from a cell the queue hands to run_prompt_task. Drive that real path:
dispatch a DM turn through dispatch_pending to a held ACP agent with
DM channel metadata, wait for the prompt to reach the agent, then send
a top-level follow-up through the listener. It must steer natively and
not cancel.
The test fails if run_prompt_task stops recording the classification
or if dispatch passes a detached cell.
Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
let acp = acp::AcpClient::spawn("bash", &["-c".into(), script], &[], false)
10217
+
.await
10218
+
.expect("spawn holding ACP");
10219
+
let ingress = |event: nostr::Event| NormalListenerIngress {
10220
+
buzz_event: relay::BuzzEvent {
10221
+
connection_generation: 0,
10222
+
channel_id,
10223
+
event,
10224
+
},
10225
+
effective_author: "author".into(),
10226
+
prompt_tag: "@mention".into(),
10227
+
edit: None,
10228
+
};
10229
+
let running = ingress(message(None));
10230
+
let scope = running.session_scope(scope::SessionPolicy::Channel, true);
10231
+
let mut agent = pool::OwnedAgent {
10232
+
index: 0,
10233
+
acp,
10234
+
state: pool::SessionState::default(),
10235
+
model_capabilities: None,
10236
+
desired_model: None,
10237
+
model_overridden: false,
10238
+
desired_model_request_id: None,
10239
+
desired_model_pending_ack: false,
10240
+
startup_effort: None,
10241
+
agent_name: "dm-steer-test-agent".into(),
10242
+
goose_system_prompt_supported: None,
10243
+
protocol_version: 1,
10244
+
};
10245
+
agent
10246
+
.state
10247
+
.sessions
10248
+
.insert(scope.clone(), "live-session".into());
10249
+
// The relay has no newer metadata, project, or history: every query
10250
+
// returns no events, so the prompt keeps the startup DM metadata.
10251
+
let relay = tokio::net::TcpListener::bind("127.0.0.1:0")
10252
+
.await
10253
+
.expect("bind relay fixture");
10254
+
let base_url = format!("http://{}", relay.local_addr().unwrap());
10255
+
let relay = tokio::spawn(async move {
10256
+
use tokio::io::{AsyncReadExt, AsyncWriteExt};
10257
+
loop {
10258
+
let (mut socket, _) = relay.accept().await.expect("accept relay query");
0 commit comments