Skip to content

test(probe): drive several conversations from one process on both ends - #38

Merged
ForeverInLaw merged 2 commits into
mainfrom
probe/multi-session
Jul 29, 2026
Merged

test(probe): drive several conversations from one process on both ends#38
ForeverInLaw merged 2 commits into
mainfrom
probe/multi-session

Conversation

@ForeverInLaw

@ForeverInLaw ForeverInLaw commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Why

dial opens one conversation — the one shape that cannot show the failure the shared node was built to fix. The app runs several at once from a single process under a single identity.

  • dial-many accepts N invites in one runtime and requires every session ready and every message delivered.
  • listen-many serves N invites from one runtime, so the far end is one node too.
  • The runner grows --sessions N and prints both ends' topology.

The correction this PR went through

The first version ran N separate listen processes on one host. That is N nodes behind one address — the exact shape this work removed — so the far end was reproducing the defect the run was trying to measure. Three conversations failed to converge on v0.7.3 and on v0.7.2 alike, which I first read as "the harness cannot show this". It actually meant "the harness is broken". Fixed by giving the remote one process for all sessions.

What it measures now

Same script, same host, one node per side:

run local remote verdict
3 sessions 1 node, ports 52935×3 1 node, ports 52373×3 delivered
6 sessions 1 node, ports 52363×6 1 node, ports 37422×6 delivered

Against v0.7.2, built from the tag with the same harness: 3 nodes (62028, 62035, 62043), 0 of 3 ready.

Both ends print their topology, so a run that quietly falls back to a node per session is visible rather than inferred.

Note

Deploying this to a probe host needs the matching libmoss.so (>= v0.8.19) beside the binary. A stale one fails cleanly with Moss symbol unavailable: Moss_JoinRoom — which is how the first server run failed, and the guard working as intended.

`dial` opens one conversation, which is the one shape that cannot show the
failure the shared node was built to fix: the app runs several at once from a
single process under a single identity. `dial-many` accepts N invites in one
runtime, requires every session to reach ready and every message to be
delivered, and reports the listen port each session's node bound.

That last part is the measurement. Run against the same host, same script:

  v0.7.2  distinct_nodes: 3, ports [62028, 62035, 62043]
  v0.7.3  distinct_nodes: 1, ports [62482, 62482, 62482]

The runner grows `--sessions N`, which starts N independent remote `listen`
processes — each its own process and so its own counterpart — and dials them
all from one local process.

Known limit, and the reason this is a probe rather than a gate: with every
counterpart on ONE host, three concurrent conversations do not converge, on
v0.7.2 (0 of 3 ready) any more than on v0.7.3. Colocated peers behind a single
address are a configuration the substrate already handles badly, so this
harness can prove the topology and single-conversation delivery, not
multi-conversation delivery. Counterparts on distinct hosts would close that.
The far end was N separate `listen` processes on one host, which is N nodes
behind one address — the exact shape this work removed. A test whose far end
reproduces the defect cannot measure the fix, and it did not: three
conversations failed to converge on v0.7.3 and on v0.7.2 alike, which I read as
"the harness cannot show this" when it actually said "the harness is broken".

`listen-many` serves N invites from one runtime, so both ends are now one node
with N rooms. Same script, same host:

  3 sessions  local 1 node (52935 x3), remote 1 node (52373 x3)  delivered
  6 sessions  local 1 node (52363 x6), remote 1 node (37422 x6)  delivered

and on v0.7.2, three sessions are three nodes (62028, 62035, 62043) with 0 of 3
ready.

Both ends print their topology, so a run that quietly falls back to a node per
session is visible rather than inferred.
@ForeverInLaw ForeverInLaw changed the title test(probe): drive several conversations from one process test(probe): drive several conversations from one process on both ends Jul 29, 2026
@ForeverInLaw
ForeverInLaw merged commit 94e5d71 into main Jul 29, 2026
3 checks passed
@ForeverInLaw
ForeverInLaw deleted the probe/multi-session branch July 29, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant