diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-10 17:30:40 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-10 17:30:40 +0200 |
| commit | d5442e3a335327b445d27d0f7e8798726ba20973 (patch) | |
| tree | f83e276a210fe36e1371bcc6a15bf5023c758056 /packages/meshbay-hub | |
| parent | 803e654086ac63e2d01fa4eb9cca50a4ebebcb73 (diff) | |
| download | meshbay-d5442e3a335327b445d27d0f7e8798726ba20973.tar.gz | |
docs(code): drop the references to a plan file that no longer exists
Seven comments pointed at sections of `~/next/improve-downloads.md`, which is
not in the tree and not anywhere a reader of this repository can follow. Each
now states the thing it was citing: why a paused transfer holds nothing, why the
lease is taken after the save target and not before, why a chunk request marks
a lease alive, where the leaseless bound's number comes from.
The leaseless comment also said "two files at a time" three paragraphs under
`MAX_LEASELESS_IN_FLIGHT = 12`, left behind when the bound was raised. A comment
that contradicts the constant beside it is worse than no comment: one of them is
wrong and the reader cannot tell which.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsoWC3GmhNdwVFomW3QjH3
Diffstat (limited to 'packages/meshbay-hub')
4 files changed, 10 insertions, 9 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/downloads.js b/packages/meshbay-hub/src/meshbay_hub/static/downloads.js index c790394..9c23d3c 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/downloads.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/downloads.js @@ -649,8 +649,9 @@ async function _attemptStreamedDownload(filename, size, attempt, // writing to the stream stalls that download where we cannot see it or // resume it, and an idle worker is terminated within seconds, taking the // stream with it. A pause button here would restart from zero, which is - // worse than not offering one. §6.5 of ~/next/improve-downloads.md records - // what giving Firefox and Safari a resumable target would cost. + // worse than not offering one. Offering Firefox and Safari a resumable + // target means a resumable sink of our own, which is a larger piece of work + // than the button it would enable. pausable: false, writable: { write: (bytes) => { lastWrite = Date.now(); return writer.write(bytes); }, diff --git a/packages/meshbay-hub/src/meshbay_hub/static/file-utils.js b/packages/meshbay-hub/src/meshbay_hub/static/file-utils.js index 99d9f9a..b732734 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/file-utils.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/file-utils.js @@ -451,9 +451,9 @@ async function downloadEntry(transfers, transport, gek, entry) { }, // After the target, never before: a granted slot has to be taken up within - // the node's deadline, and opening a target can outlast it. See §8.1 of - // ~/next/improve-downloads.md — the other order was tried and cost two of - // three downloads. + // the node's deadline, and opening a target can outlast it — a Save As + // dialog waits for a person. Asking for the slot first loses it to the + // grant deadline while the dialog is open. makeLease: () => transport.openTransfer({ kind: 'download', bytes: entry.size, chunks: totalChunks }), diff --git a/packages/meshbay-hub/tests/test_client_version_gate.py b/packages/meshbay-hub/tests/test_client_version_gate.py index 69ca062..4dc9b98 100644 --- a/packages/meshbay-hub/tests/test_client_version_gate.py +++ b/packages/meshbay-hub/tests/test_client_version_gate.py @@ -5,9 +5,9 @@ The SPA is served by the hub, so a browser picks up a new client on reload. The desktop application **ships its own interface**, so on a flag day an un-updated one can still sign in, still list groups, and then fail every connection with `version_too_old` — a refusal in a protocol vocabulary, surfacing as a node that -will not talk, with nothing anyone can act on. §12.3 of -~/next/improve-downloads.md named this as the thing that had to exist before -MNP 3.0 could ship. +will not talk, with nothing anyone can act on. Refusing at the handshake is only +honest if something tells the person *before* they get there, and this is that +something. `compareVersions` and `refuseIfTooOld` are lifted out of `main.js` **as text** and executed against a modelled environment, on the rule this repo follows diff --git a/packages/meshbay-hub/tests/test_transfers.py b/packages/meshbay-hub/tests/test_transfers.py index d93cf80..a776b50 100644 --- a/packages/meshbay-hub/tests/test_transfers.py +++ b/packages/meshbay-hub/tests/test_transfers.py @@ -560,7 +560,7 @@ def test_a_transport_is_not_closed_under_a_preparing_transfer(tmp_path): # The rule the whole design turns on: **a paused transfer holds nothing.** Its # slot goes back to the node the moment it stops, and resuming rejoins the queue # at the tail. Anything else lets one member close a node by pausing four -# downloads and going to lunch (§6.2 of ~/next/improve-downloads.md). +# downloads and going to lunch. def _pausable_run(): |