Commit Graph
4 Commits
Author SHA1 Message Date
Niko1221 4c06268498 net: updates, components, the draft layer and the other transfers follow the one network rule (lane 15, item 2)
The rest of the call table goes through strata_control/netpolicy.py:
- transfer.read_small and transfer.download: 12 s then a 30 s retry for the connection; a download resumes from the byte it reached, in the same
  run, while bytes keep coming, and stops after 5 minutes in a row with no new byte (W6), never on a total time. transfer.Unreachable /
  Interrupted carry the host and the words.
- feed.fetch (the update check): W7 and its two companions (offline; "did not answer a moment ago"), raised as feed.FeedUnreachable(FeedError,
  exit code 6). Callers that must stay silent at a launch catch the class, not the words: dsv41_engine.upgrade matched the text "could not be
  read" and would have printed "A newer DeepSeek engine may be available but could not be checked: ..." offline with the new sentence; drafting_fetch
  names the class too. feed_models.load reads under shorter limits, prints the waiting line and no failure sentence. Silence offline / refused /
  never answering is tested for dsv41_engine.upgrade, shape_engine.ensure, drafting_fetch, feed_models.load, driver_floor.from_feed and the daily
  check (tests/terminal/net_dead.py, test_net_silent_callers.py and the callers' own test files).
- updater, pictures and drafting_fetch say what they download, so the failure reads "... so <what> could not be downloaded".
- components._fetch and tools/mtp_fetch.py use netpolicy.urlopen through open_url in full (the draft layer's 120 s x 6 loop is gone); setup runs
  the draft-layer fetch again only when the last run moved bytes, and stops on its NO_ANSWER exit (4) with the fetch's own lines.
- setup's parallel and single downloads end after 5 minutes without a new byte (W6) instead of 30 rounds or 35 minutes of silence.
- Host memory: only a call that used the whole window (12 s, then 30 s) writes it; shorter calls only read it.

transfer._copy keeps what arrived before a stall. It read 1 MiB blocks with read(): when a connection stalled mid-block the received bytes were
thrown away, so a stalled download lost up to 1 MiB and the 5-minute clock (counted on the .part size) saw no progress. It now gathers read1 pieces
up to 1 MiB and hands them on at once when a read had to wait; on an error the gathered bytes are written first. Measured on loopback, 2 GiB per
run, 3 runs alternating, client CPU, MiB/s (copy CPU s):
  p2006 HTTP  old 4044 (0.51)  read1 only 3945 (0.52)  gathered 3899 (0.52)
  p2006 TLS   old 1751 (1.14)  read1 only 1264 (1.60)  gathered 1523 (1.32)
  l620  HTTP  old 2918 (0.57)  read1 only 2896 (0.70)  gathered 2937 (0.65)
  l620  TLS   old 1160 (1.74)  read1 only  826 (2.45)  gathered  970 (2.10)
HTTP is within noise; TLS is 13-16% under the old loop at 1.5 and 0.97 GiB/s, above any link a user downloads over. The gathering is kept on
purpose: it is what keeps received bytes across a stall; do not remove it to win the TLS figure back.

Existing tests that encoded the old behaviour are updated to the new rule: the "cut download resumes" tests (updater, dsv41 engine and upgrade,
shape engine, update-with-model) now assert that the first run completes, that exactly one more request follows with the header
"Range: bytes=<kept>-" and that no byte is fetched twice; the W6 test also resumes on the next run from the kept size. The unreachable-feed tests
assert the approved sentences.

Tests: tests/terminal/test_net_transfer.py (including the 365 s real-time trickle tests with STRATA_SLOW_NET_TESTS=1, which passed on the final
tree), test_net_silent_callers.py, tools/test_setup_dl_fix.py, tools/test_mtp_fetch.py, tools/test_setup_pins.py, tests/tuning/test_components.py,
tests/terminal/test_net_launch_waits.py (the short model-list read keeps the download its own attempt).
2026-11-10 19:44:31 +01:00
Niko1221 8de1ec4165 Test: torch has one pin per Python range since #3474; compare the package set 2026-10-21 00:23:52 +02:00
Niko1221 1994f3acb2 FP4-Local: setup installs the pinned torch, transformers and safetensors the converter imports (requirements-nvfp4-local.txt) right before a prepare that runs; the tool names a missing package up front instead of after 20 minutes (#3227) 2026-10-19 23:44:24 +02:00
Niko1221 96a9107a27 Downloads: the MTP fetch shows progress in the app and survives a flaky link (runs again, fewer connections, one writer per folder); a cancel and a killed setup end the whole tree on Windows (snapshot + the fetch ends with its parent); Gyro's low-RAM pack gets --compat-bf16 (#3257 #3214 #3193) 2026-10-19 23:38:38 +02:00