cultmesh-rs: close and Drop stay in bounds during a reconnect; close/Drop tests proven, not slept (h4) #198

Merged
eureka merged 5 commits from hands/rs-subscribe-members-h4 into main 2026-11-28 12:59:09 +00:00

2026-11-28

Meta Vens
cultmesh-rs: the pump's liveness guard is _alive, so test-hooks builds don't warn it is never read
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 26m59s
Rust crates / cargo test, fmt, clippy (pull_request) Successful in 8m18s
Closes cultlib-gaps:finding:cut-rs-subscribe-members.s4.alive-dead-code-warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 13:23:08 +01:00
Meta Vens
cultmesh-rs: close's result is the pump's; pin close and drain weight; docs; test seam off the API
Some checks failed
Rust crates / cargo test, fmt, clippy (pull_request) Has been cancelled
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
- close() takes the acknowledgement from the pump thread's join result: no reply
  channel, no second 1 s give-up, and returning before the pump ended is not
  expressible (close-survivors-untested). Tests pin the early return on
  acknowledgement, the goodbye, the join, and false after the session ended.
- A test pins that try_drain releases the weight of each event (drain-weight-untested)
  and that a refused subscribe is a fault while a catalog request is in flight
  (refusal-during-wait-untested).
- The module Lifetime paragraph names close() and Drop's best effort; the struct doc
  no longer says methods never block on the network (module-doc-omits-close).
- pump_liveness is behind the crate's own test-hooks feature, enabled for its tests by
  a dev-dependency on itself, so a consumer's API does not carry it
  (pump-liveness-public-hook).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 13:04:37 +01:00
Meta Vens
cultmesh-rs tests: Drop sends an unsubscribe for each live id (drop-unsubscribes-untested)
A live peer observes the unsubscribes a dropped client sends, one per live id and none
for an id already unsubscribed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 12:58:48 +01:00
Meta Vens
cultmesh-rs tests: the scripted peer reports that it has stalled (stall-proven-by-sleep)
peer.stall() now returns once the peer's thread has entered the stall, so the close
and Drop tests meet a peer proven silent; the two 100 ms sleeps that stood in for
that proof are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 12:58:48 +01:00
Meta Vens
cultmesh-rs: close and Drop interrupt a reconnect in progress (close-drop-block-in-reconnect)
The pump's reconnect waited out connect_timeout inline, so close() gave up at its
reply bound and then joined anyway, and Drop joined the whole wait. close and Drop
now set a closing flag the connect loop polls; the reconnect ends within one poll.
The test proves the pump is inside open() (the silent peer has seen its Connect).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 12:58:08 +01:00