<feed xmlns='http://www.w3.org/2005/Atom'>
<title>meshbay.git/packages/meshbay-node/tests/transfer_probe.py, branch 0.15</title>
<subtitle>MeshBay — read-only public mirror</subtitle>
<id>https://git.meshbay.org/meshbay.git/atom?h=0.15</id>
<link rel='self' href='https://git.meshbay.org/meshbay.git/atom?h=0.15'/>
<link rel='alternate' type='text/html' href='https://git.meshbay.org/meshbay.git/'/>
<updated>2026-09-19T12:24:13Z</updated>
<entry>
<title>style: ruff's own fixes, mechanically applied</title>
<updated>2026-09-19T12:24:13Z</updated>
<author>
<name>Christophe Besson</name>
<email>cbesson@gmail.com</email>
</author>
<published>2026-09-19T12:24:13Z</published>
<link rel='alternate' type='text/html' href='https://git.meshbay.org/meshbay.git/commit/?id=86188385cbdae1ee90c1dca7a7b9db2edef1ecd4'/>
<id>urn:sha1:86188385cbdae1ee90c1dca7a7b9db2edef1ecd4</id>
<content type='text'>
`ruff check .` had gone unrun long enough to report 568 errors, which is the
same as having no linter: the next real finding would have been invisible in the
noise. This is the 521 it fixes by itself, in 173 files, and nothing else — the
98 it cannot fix are the next commit.

What actually changed: import sorting (225), imports nobody used (87, none of
them a re-export — no `__init__.py` is touched, which was the one way this could
have broken an import elsewhere), `datetime.timezone.utc` to `datetime.UTC` (69)
and `asyncio.TimeoutError` to `TimeoutError` (18), both plain aliases on the 3.12
this project requires, `Optional[X]` to `X | None` (24), and f-strings with
nothing to interpolate (19).

Checked rather than assumed: every module in the three packages still imports,
and the suite is 2893 passed — the same count, test for test, as the merge
before it.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>test(node): match transfer replies by id, not by arrival order</title>
<updated>2026-09-08T23:15:42Z</updated>
<author>
<name>Christophe Besson</name>
<email>cbesson@gmail.com</email>
</author>
<published>2026-09-08T23:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.meshbay.org/meshbay.git/commit/?id=a0b070e5fd382bb4a4262637836cb8d4b268fbf7'/>
<id>urn:sha1:a0b070e5fd382bb4a4262637836cb8d4b268fbf7</id>
<content type='text'>
Three defects in the probe, found while extending it to cover the per-member
hot-swap. The third is the one worth keeping.

`transfer_state` is the reply to an open, the acknowledgement of a close, and
the push that carries a grant minutes later. Reading "the next one" therefore
returns somebody else's answer as soon as more than one transfer is in play —
the probe took two stale `closed` acks as the replies to two opens and reported
a working cap as broken. That is exactly the defect `req_id` exists for in this
protocol, committed inside the tool written to check it. Replies are matched on
`tr` now.

The other two: the `transfers show` parser counted the pool summary line as a
lease once that command grew a per-group section (a probe that reads a
human-facing format signs up for this), and the per-member check began with a
member who already held several leases, which measures nothing. It waits for
the operator's own view to go quiet first — waited for, not slept through.

Both probes written today reproduced a bug already recorded in CLAUDE.md: this
one, and yesterday's timer with no strong reference. A tool that verifies the
code is not exempt from the code's rules.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HCGdheDLxGReuKHga3BtST
</content>
</entry>
<entry>
<title>test(node): the two checks that need the operator's own CLI</title>
<updated>2026-09-08T21:13:14Z</updated>
<author>
<name>Christophe Besson</name>
<email>cbesson@gmail.com</email>
</author>
<published>2026-09-08T21:13:14Z</published>
<link rel='alternate' type='text/html' href='https://git.meshbay.org/meshbay.git/commit/?id=f31aaca046911697cbb8873b27929ac10efa9e18'/>
<id>urn:sha1:f31aaca046911697cbb8873b27929ac10efa9e18</id>
<content type='text'>
`--operator` closes the last two items of the live pass, from the side the
client cannot see:

  - **a cap raised live starts what was waiting**, with no restart and no
    reconnection. Draft-v6 §2.11 promises this and it was false for months:
    `ops.set_node_settings` hot-swapped by assigning `webrtc._stream_sem`, an
    attribute that has never existed. Now it goes through `set_capacity`, and
    this is what says so from outside;
  - **a vanished peer's slots are back before anyone asks.** §5 of the plan
    makes that a hook on the connection rather than a timeout, and the
    difference is two minutes of a node that looks full.

Plus the operator's view of the queue itself, which is the only window into a
transfer stuck at "waiting" — and which reported the module defaults instead of
the operator's values until this afternoon.

Two mistakes in the check, none in the code, and the second is worth keeping:
the first version set the node cap and the member cap both to 2, so one account
holding two transfers hit both at once. Raising the node-wide cap then correctly
changed nothing — per-member is checked first, by design — and the probe
reported the design working as a failure. It now puts the node cap below the
member cap so the queue is held by the machine, which is the only arrangement
where this can be measured at all.

The cap is restored to whatever the node was running before the probe touched
it, not to a default.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HCGdheDLxGReuKHga3BtST
</content>
</entry>
<entry>
<title>test(node): keep the transfer probe in the repo</title>
<updated>2026-09-08T21:09:27Z</updated>
<author>
<name>Christophe Besson</name>
<email>cbesson@gmail.com</email>
</author>
<published>2026-09-08T21:09:27Z</published>
<link rel='alternate' type='text/html' href='https://git.meshbay.org/meshbay.git/commit/?id=4c2c5d037ebc5c4c7ec7dfcd3c816c8b7c67f252'/>
<id>urn:sha1:4c2c5d037ebc5c4c7ec7dfcd3c816c8b7c67f252</id>
<content type='text'>
It lived in `QE/`, which is deliberately not versioned — credentials and test
artefacts go there — so a tool that found several defects no test in the suite
could reach existed on exactly one machine.

What it found, none of it reachable from pytest: a cap that was never enforced,
a queue that granted a slot and never told the peer waiting on it, leases that
outlived the session holding them, and `transfers show` reporting the module
defaults instead of the operator's own values.

Not collected: the filename does not match `test_*.py`, and that is the point.
It talks to a real hub with real credentials and takes minutes; what belongs in
the suite is already there.

It still needs two things from `QE/`, which stay out of the repo: `e2e.py`, the
second implementation of the client whose `Client` speaks MNP over a real
WebRTC DataChannel, and `demo.env`. Both are located at run time and their
absence is explained in a sentence rather than raised as an ImportError from
four frames down.

Verified from the new location against the live node: 4/4.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HCGdheDLxGReuKHga3BtST
</content>
</entry>
</feed>
