Skip to content

Commit dfa42eb

Browse files
committed
test(protocol): align handshake fixtures with 1.0 floor and clarify v2/v3 naming
1 parent ad64eeb commit dfa42eb

12 files changed

Lines changed: 15 additions & 13 deletions

File tree

apps/extension/src/lib/__tests__/connection-controller.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function handshake(
2626
}
2727

2828
describe("computeConnectedState (protocol-based compat)", () => {
29-
it("returns connected when protocol strings match", () => {
29+
it("returns connected when daemon protocol equals extension protocol", () => {
3030
expect(computeConnectedState(handshake("1.1", "1.0"), MIN_COMPATIBLE_PROTOCOL)).toEqual({
3131
kind: "connected",
3232
});

apps/extension/src/transport/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,9 @@ export interface EmulateResult {
657657
}
658658

659659
// --------------------------------------------------------------------------
660-
// Semantic record payloads — mirror bsk-protocol record.rs
660+
// Semantic record payloads — legacy Trace v2 shapes (`Trace`/`Step`) mirror
661+
// bsk-protocol record_v2.rs; Trace v3 shapes (`TraceV3`/`StepV3`) mirror
662+
// record.rs (note: in Rust, `Trace` is the v3 shape).
661663
// --------------------------------------------------------------------------
662664

663665
export const TRACE_VERSION = 3;

crates/bsk-cli/tests/browser_wait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ async fn handshake_as_ext(
119119
version: "131.0".into(),
120120
},
121121
min_compatible_peer: Some("0.1.0-dev.0".parse().unwrap()),
122-
min_compatible_protocol: Some("1.1".into()),
122+
min_compatible_protocol: Some("1.0".into()),
123123
label: "Test".into(),
124124
};
125125
let req = RequestFrame {

crates/bsk-cli/tests/cancel_forwarding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async fn handshake_as_ext(
8383
},
8484
label: "Test".into(),
8585
min_compatible_peer: Some("0.1.0-dev.0".parse().unwrap()),
86-
min_compatible_protocol: Some("1.1".into()),
86+
min_compatible_protocol: Some("1.0".into()),
8787
};
8888
let req = RequestFrame {
8989
id: "hs".into(),

crates/bsk-cli/tests/per_session_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async fn handshake_as_ext(
8888
version: "131.0".into(),
8989
},
9090
min_compatible_peer: Some("0.1.0-dev.0".parse().unwrap()),
91-
min_compatible_protocol: Some("1.1".into()),
91+
min_compatible_protocol: Some("1.0".into()),
9292
label: "Test".into(),
9393
};
9494
let req = RequestFrame {

crates/bsk-cli/tests/session_user_interrupt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async fn handshake_as_ext(
8989
},
9090
label: "Test".into(),
9191
min_compatible_peer: Some("0.1.0-dev.0".parse().unwrap()),
92-
min_compatible_protocol: Some("1.1".into()),
92+
min_compatible_protocol: Some("1.0".into()),
9393
};
9494
let req = RequestFrame {
9595
id: "hs".into(),

crates/bsk-cli/tests/sessions_ipc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async fn handshake_as_ext(
9191
version: "131.0".into(),
9292
},
9393
min_compatible_peer: Some("0.1.0-dev.0".parse().unwrap()),
94-
min_compatible_protocol: Some("1.1".into()),
94+
min_compatible_protocol: Some("1.0".into()),
9595
label: "Test".into(),
9696
};
9797
let req = RequestFrame {
@@ -407,7 +407,7 @@ async fn connect_second_ext(
407407
version: "130".into(),
408408
},
409409
min_compatible_peer: Some("0.1.0-dev.0".parse().unwrap()),
410-
min_compatible_protocol: Some("1.1".into()),
410+
min_compatible_protocol: Some("1.0".into()),
411411
label: label.into(),
412412
};
413413
let hs = RequestFrame {

crates/bsk-cli/tests/tools_ipc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async fn do_handshake(ws: &mut Ws) -> HandshakeResult {
8080
version: "131.0".into(),
8181
},
8282
min_compatible_peer: Some("0.1.0-dev.0".parse().unwrap()),
83-
min_compatible_protocol: Some("1.1".into()),
83+
min_compatible_protocol: Some("1.0".into()),
8484
label: "Test".into(),
8585
};
8686
let req = RequestFrame {

crates/bsk-cli/tests/tools_m7_ipc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async fn do_handshake(ws: &mut Ws) -> HandshakeResult {
8383
version: "131.0".into(),
8484
},
8585
min_compatible_peer: Some("0.1.0-dev.0".parse().unwrap()),
86-
min_compatible_protocol: Some("1.1".into()),
86+
min_compatible_protocol: Some("1.0".into()),
8787
label: "Test".into(),
8888
};
8989
let req = RequestFrame {

crates/bsk-cli/tests/tools_m8_ipc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async fn do_handshake(ws: &mut Ws) -> HandshakeResult {
8282
version: "131.0".into(),
8383
},
8484
min_compatible_peer: Some("0.1.0-dev.0".parse().unwrap()),
85-
min_compatible_protocol: Some("1.1".into()),
85+
min_compatible_protocol: Some("1.0".into()),
8686
label: "Test".into(),
8787
};
8888
let req = RequestFrame {

0 commit comments

Comments
 (0)