Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(tunnel): assert the current legacy protocol upgrade hint

Steven Enamakeld7deb31a5c9b
diff --git a/app/src/lib/tunnel/crypto.test.ts b/app/src/lib/tunnel/crypto.test.ts
index 390f9b06e5..e4649cf14d 100644
--- a/app/src/lib/tunnel/crypto.test.ts
+++ b/app/src/lib/tunnel/crypto.test.ts
@@ -248,13 +248,15 @@ describe('TunnelCipher (directional v2)', () => {
expect(() => serverOpener.open(frame)).toThrow(/authentication failed/i);
});
- it('legacy v1 frames are explicitly rejected with re-pair hint', () => {
+ it('legacy v1 frames are explicitly rejected with protocol upgrade hint', () => {
// Hand-roll a v1-shaped frame: 0x01 || nonce(24) || ct(16 bytes).
const v1Frame = new Uint8Array(1 + 24 + 16);
v1Frame[0] = LEGACY_FRAME_VERSION_V1;
const client = new TunnelCipher('client', keys);
expect(() => client.open(v1Frame)).toThrow(/UnsupportedFrameVersion/);
- expect(() => client.open(v1Frame)).toThrow(/re-pair/);
+ expect(() => client.open(v1Frame)).toThrow(
+ /upgrade to v2 directional subkeys before reconnecting/
+ );
});
});