summaryrefslogtreecommitdiff
path: root/test/daemon.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-23 04:21:13 -0300
committerGabriel Schneider <[email protected]>2026-11-23 07:28:22 -0300
commit396247178d20678a36e9e1782c2a457eeb1916de (patch)
tree80d9b7d21cdcd64b2b246eae92c6f817f3a882e8 /test/daemon.py
parent3a0acb503613a672c3d84f685031ab5e65c10ff6 (diff)
downloadpardes-396247178d20678a36e9e1782c2a457eeb1916de.tar.gz
pardes-396247178d20678a36e9e1782c2a457eeb1916de.zip
link: a far client that falls behind dials again, as before round 1 (the coordinator's ruling P63a): `Link.backHere` says no for a link that crosses machines (`Link.far`, set by runtime/client.zig from its `Have`) and fell behind `behind_max_ms`, so that client says its goodbye, shuts its link and dials again through the daemon, a new connection that drops what the old one holds for it; every other way back (a divergence, a near lag, a cut, a refused load's ask) stays on the link; marked in the code as the second road it is, with what replaces it (bounded flight: the session never more than a window past what its client has taken); the failing row first: test/daemon.py `--far` on ReleaseSafe 6 of 7 on round 1's tree (`far_flood`: over its own link the far client read through all the relay held for it, agreeing 49-68 s after `yes` against 22.7 s by a dial); `far_flood` now asserts the far client behind took ANOTHER connection; the lag test asserts both roads (`backHere` near yes, far no) ; gated with the next change as its tree (g1, rnllpvzw fd3730201cb3): `--far` on ReleaseSafe 7 of 7, far_flood ANOTHER connection each time and agreed 22.3-26.0 s after `yes` ended (Debug 25.3 s), every other row as before: core-test 931/1095 (164 skipped), shell-test 1137/1140 (3 skipped), process-test 0 of 146 failed both ways, the soak x3 and --pair x3 clean, daemon.py every mode on both builds, the upgrades 12 of 12, frames 77/77 and 121 counts within 0.1% against tree6, the cross-builds
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/daemon.py')
-rw-r--r--test/daemon.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/daemon.py b/test/daemon.py
index c22d95d4..caa1272b 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -2382,13 +2382,15 @@ def far_flood(binary):
# Queued behind the flood, let go for its lag, joined again from a
# dump: a link of its ended (its stats line), and its notice says why.
assert joins(stats), ('no link of the far client ended under the flood', checks(stats))
- # Over its own link (the relay's one connection for it), each join's
- # time and the KB it was sent; the flood's end to its agreement.
+ # Fallen behind, a far client dials again (core/replica.zig
+ # `Link.backHere`: the second road until bounded flight): a new
+ # connection, not what the old one holds for it read through; each
+ # join's time and the KB it was sent; the flood's end to its agreement.
same = sockets(c.pid) == links
print(f'far flood: the far client\'s link {"the same" if same else "another"} after {len(joins(stats))} joins again '
f'(join ms {[j.get("join_ms") for j in joins(stats)]}, sent KB {[j.get("sent_kb") for j in joins(stats)]}); '
f'agreed {time.monotonic() - ended_at:.1f} s after yes ended')
- assert same, ('the far client joined again over its own link', links, sockets(c.pid))
+ assert not same, ('the far client behind dialled again: another connection', links, sockets(c.pid))
wait_for('the far client\'s notice of its join again', lambda: b'joined again: ' in t.text() and b' s behind' in t.text(), timeout=30)
os.write(t.master, b'echo from-far\r')
wait_for('the far client\'s keys in the shell', lambda: b'from-far' in nine.read(f'/pane/{shell}/body'), timeout=30)