aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-18 23:24:17 -0700
committerAdam Soltys <[email protected]>2026-10-18 23:24:17 -0700
commit7367343cb45d08bcc0f5e3246c8c5462ea204281 (patch)
tree87ae8563c50a91eeec0662928b79067ca863c25e /tools
parentd007dbec5d44963b4650baf9668389ec7da944f3 (diff)
downloadcoinosv3-7367343cb45d08bcc0f5e3246c8c5462ea204281.tar.gz
coinosv3-7367343cb45d08bcc0f5e3246c8c5462ea204281.zip
Calls: the routes found before the offer or answer ride inside it (until there's a direct and a relayed one, 1.5 s at most) and only later ones go one by one — each route was its own signed message, dozens per call; a household's two devices calling each other got its IP banned by damus and rate-limited by relay.coinos.io, and the answer was refused with them: the callee stuck on Connecting…, the caller ringing on. An offer, answer, hang-up or decline no relay took is tried again (1.5, 3, 6 s) before the call gives up.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013ZDf1cyCQLkfjftYhymZAg
Diffstat (limited to 'tools')
-rw-r--r--tools/call-test.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/call-test.js b/tools/call-test.js
index 5a0c3a0..15b3d98 100644
--- a/tools/call-test.js
+++ b/tools/call-test.js
@@ -106,6 +106,7 @@ try {
console.log('[a video call]');
await openDm(A, B.pk);
check('the conversation has voice and video call buttons', await A.page.evaluate(() => document.querySelectorAll('.chat-head .call-start').length === 2));
+ const w0 = wrapIds.size;
await A.page.evaluate(() => document.querySelector('.call-start[data-call="video"]').click());
check('the caller sees it calling, their own camera on', await waitFor(A.page, () => /calling/i.test(document.querySelector('.call-overlay .call-status')?.textContent || '') && document.querySelector('video.call-local')?.videoWidth > 0, 10000));
check('the callee, on their wallet page, is rung: who, and a video call', await waitFor(B.page, () => !!document.querySelector('.call-overlay .call-accept') && /Alice Caller/.test(document.querySelector('.call-overlay').innerText) && /video call/i.test(document.querySelector('.call-overlay').innerText), 15000));
@@ -119,6 +120,9 @@ try {
await sleep(1500);
const ma = await media(A.page), mb = await media(B.page);
check('each sees the other\'s picture and gets their sound', ma.video && ma.audio && mb.video && mb.audio, JSON.stringify({ ma, mb }));
+ // the routes ride in the offer and answer: a household's two devices
+ // calling each other mustn't flood the relays (a per-IP limit ate the answer)
+ check('...in a handful of messages, not one per route', wrapIds.size - w0 <= 6, (wrapIds.size - w0) + ' wraps');
await B.page.evaluate(() => document.querySelector('.call-bar .call-btn[aria-label="Mute"]').click());
check('mute turns the microphone off', await waitFor(B.page, () => !!document.querySelector('.call-btn.on[aria-label="Unmute"]'), 3000));
await A.page.evaluate(() => document.querySelector('.call-btn[aria-label="Minimize"]').click());