chore(deps): consume alkcall 0.3.1 — list-peers announced-op discovery gate
The alkcall 0.3.1 fix (fd21230, alkhttp review 006 UP-03) lands PeerCompositeEnv::peer_operations, so services/list-peers now lists peer-announced ops. Version pin stays 0.3 (semver-compatible); the lockfile bump carries no source change. - Extend op_register_served_per_session_and_collision_is_already_exists with the discovery assertion that originally surfaced UP-03: after the announce resolves, services/list-peers attributes consumer/exec to the alice peer entry (fails against 0.3.0, verified by the original draft). - Review 006 UP-03 entry records the 0.3.1 landing (alkcall ADR-030). Verification: cargo test 454 passed / 0 failed; cargo test --all-features 582 / 0; clippy (default + all-features, all-targets, -D warnings) clean; fmt clean; doc clean.
This commit is contained in:
@@ -1345,6 +1345,34 @@ async fn op_register_served_per_session_and_collision_is_already_exists() {
|
||||
assert_eq!(env.r#type, EVENT_RESPONDED, "got {}", env.r#type);
|
||||
assert_eq!(env.payload["output"]["registered"], true);
|
||||
|
||||
// The announced op is discoverable via services/list-peers: the
|
||||
// peer entry keyed by the connection identity (alice) lists it
|
||||
// (UP-03, fixed in alkcall 0.3.1).
|
||||
let peers = call_and_await(
|
||||
&mut ws,
|
||||
"req-list-peers",
|
||||
"services/list-peers",
|
||||
serde_json::json!({}),
|
||||
)
|
||||
.await;
|
||||
assert_eq!(peers.r#type, EVENT_RESPONDED, "got {}", peers.r#type);
|
||||
let peer_entry = peers.payload["output"]["peers"]
|
||||
.as_array()
|
||||
.expect("peers array")
|
||||
.iter()
|
||||
.find(|p| p["peer_id"] == "alice")
|
||||
.expect("alice peer entry present");
|
||||
let peer_op_names: Vec<&str> = peer_entry["operations"]
|
||||
.as_array()
|
||||
.expect("peer operations array")
|
||||
.iter()
|
||||
.filter_map(|o| o["name"].as_str())
|
||||
.collect();
|
||||
assert!(
|
||||
peer_op_names.contains(&"consumer/exec"),
|
||||
"announced op discoverable via services/list-peers: {peer_entry}"
|
||||
);
|
||||
|
||||
// The announced op landed in the overlay: a second announce of the
|
||||
// same name without `replace` hits the overlay collision gate.
|
||||
let spec = OperationSpec::new(
|
||||
|
||||
Reference in New Issue
Block a user