letify 2.11.3__tar.gz → 2.11.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {letify-2.11.3 → letify-2.11.4}/PKG-INFO +1 -1
- {letify-2.11.3 → letify-2.11.4}/docs/SPEC.md +3 -1
- {letify-2.11.3 → letify-2.11.4}/letify/__init__.py +1 -1
- {letify-2.11.3 → letify-2.11.4}/letify/transport/linkchannel.py +18 -6
- {letify-2.11.3 → letify-2.11.4}/letify/transport/probe.py +63 -10
- {letify-2.11.3 → letify-2.11.4}/letify-core/Cargo.lock +3 -3
- {letify-2.11.3 → letify-2.11.4}/letify-core/Cargo.toml +1 -1
- {letify-2.11.3 → letify-2.11.4}/letify-ext/package-lock.json +2 -2
- {letify-2.11.3 → letify-2.11.4}/letify-ext/package.json +1 -1
- {letify-2.11.3 → letify-2.11.4}/pyproject.toml +1 -1
- {letify-2.11.3 → letify-2.11.4}/tests/conftest.py +3 -1
- {letify-2.11.3 → letify-2.11.4}/tests/test_link_channel.py +24 -3
- {letify-2.11.3 → letify-2.11.4}/tests/test_transport.py +100 -0
- {letify-2.11.3 → letify-2.11.4}/.github/workflows/ci.yml +0 -0
- {letify-2.11.3 → letify-2.11.4}/.github/workflows/docs.yml +0 -0
- {letify-2.11.3 → letify-2.11.4}/.github/workflows/letify-link.yml +0 -0
- {letify-2.11.3 → letify-2.11.4}/.github/workflows/publish-crates.yml +0 -0
- {letify-2.11.3 → letify-2.11.4}/.github/workflows/publish.yml +0 -0
- {letify-2.11.3 → letify-2.11.4}/.github/workflows/reserve-crates.yml +0 -0
- {letify-2.11.3 → letify-2.11.4}/.gitignore +0 -0
- {letify-2.11.3 → letify-2.11.4}/.researchtree +0 -0
- {letify-2.11.3 → letify-2.11.4}/CLAUDE.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/LICENSE +0 -0
- {letify-2.11.3 → letify-2.11.4}/PROJECT.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/README.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/COMPONENT.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/INTENT.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/NETWORK.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/ROADMAP-3.0.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/01-getting-started.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/02-providers.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/03-execution-modes.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/04-environments-and-data.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/05-concurrency.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/06-cost.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/07-troubleshooting.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/08-releasing.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/09-agent.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/README.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/01-/354/213/234/354/236/221/355/225/230/352/270/260.md" +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/02-/355/224/204/353/241/234/353/260/224/354/235/264/353/215/224.md" +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/03-/354/213/244/355/226/211-/353/260/251/354/213/235.md" +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/04-/355/231/230/352/262/275/352/263/274-/353/215/260/354/235/264/355/204/260.md" +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/05-/353/217/231/354/213/234-/354/213/244/355/226/211.md" +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/06-/353/271/204/354/232/251.md" +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/07-/353/254/270/354/240/234-/355/225/264/352/262/260.md" +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/08-/353/246/264/353/246/254/354/212/244.md" +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/09-/354/227/220/354/235/264/354/240/204/355/212/270.md" +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/guide/ko/README.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/locales/README_ko.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/docs/mkdocs.yml +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/README.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/nvfp4-lora/.letify.example +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/nvfp4-lora/00_smoke.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/nvfp4-lora/01_sweep.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/nvfp4-lora/02_resume.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/nvfp4-lora/03_watch.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/nvfp4-lora/README.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/nvfp4-lora/README_ko.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/nvfp4-lora/common.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/examples/nvfp4-lora/recipe.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/cli.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/config/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/config/inventory.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/config/login.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/config/schema.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/config/secrets.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/config/writer.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/declare/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/declare/cache.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/declare/env.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/declare/exit.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/declare/function.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/declare/instance.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/declare/reduce.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/declare/replicas.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/errors.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/install.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/launcher.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/paths.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/protocol/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/protocol/codec.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/protocol/driver.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/protocol/handle.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/protocol/wire.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/protocol/worker.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/base.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/colab.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/colab_files.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/colab_keepalive.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/elice.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/kaggle.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/kaggle_adapter.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/local.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/modal.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/modal_adapter.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/naming.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/shell.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/tunnel.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/providers/usage.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/device/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/device/client.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/device/cuda.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/device/executor.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/device/frames.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/device/guard.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/device/tensor.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/device/trace.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/remoting/device/value.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/render.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/bootstrap.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/broker.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/channel.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/control.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/lease.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/pool.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/reattach.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/session.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/takeover.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/telemetry.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/runtime/workers.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/backends/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/backends/drive.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/backends/filesystem.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/backends/google_auth.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/backends/layout.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/backends/objects.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/cas.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/handoff.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/pathdata.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/sendorder.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/store/volume.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/stubs.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/tools.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/__init__.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/agent.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/announce.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/link.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/linkagent.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/linkd.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/linkmailbox.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/linkpump.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/linkshim.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/linksignal.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/linkupload.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/linkwebsocket.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/nat.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/pipeline.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/portmap.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/quic.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/rendezvous.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/setup.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/sshopts.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify/transport/strategies.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/.gitignore +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/build.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify/Cargo.toml +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify/LICENSE +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify/README.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify/src/lib.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/Cargo.toml +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/examples/bench.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/acceptor.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/bin/letify-link.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/config.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/error.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/frame.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/handshake.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/hysteresis.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/identity.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/keys.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/lib.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/observe.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/paths.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/plan.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/policing.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/punch.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/record.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/relay.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/rendezvous.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/replay.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/session.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/sidecar.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/stream.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/stun.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/tcp.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/trace.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/src/udp.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/acceptor.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/api.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/common/mod.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/diag_sim.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/fairness.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/gauge.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/handshake.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/hysteresis.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/keepalive.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/mobile.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/nat.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/paths.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/qad.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/rekey.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/relay.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/relay_pairing.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/rendezvous.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/reorder.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/replay.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/resume.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/revoke.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/session.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/sidecar.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/startup.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/subflows.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/trace.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/udp.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-link/tests/udp_bench.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-quic/Cargo.toml +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/letify-quic/src/main.rs +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-core/rust-toolchain.toml +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/.vscodeignore +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/LICENSE +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/README.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/media/icon.svg +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/src/cli.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/src/extension.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/src/history.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/src/model.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/src/poll.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/src/render.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/test/cli.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/test/manifest.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/test/model.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/test/regressions.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-ext/tsconfig.json +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/README.md +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/cloudflare.config.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/package-lock.json +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/package.json +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/src/auth.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/src/ed25519.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/src/handler.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/src/index.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/src/limiter.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/src/mailbox.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/src/objects.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/src/protocol.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/src/storage.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/test/auth.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/test/ed25519.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/test/helpers.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/test/interop.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/test/limiter.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/test/mailbox.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/test/objects.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/test/setup.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/test/worker.test.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/tsconfig.json +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify-signal/vitest.config.ts +0 -0
- {letify-2.11.3 → letify-2.11.4}/letify_providers.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/scripts/sync-main.sh +0 -0
- {letify-2.11.3 → letify-2.11.4}/scripts/version.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/fake_kaggle_adapter.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/fake_modal_adapter.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_cli.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_cli_output.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_colab_keepalive.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_config.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_core.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_data.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_data_in_place.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_data_streaming.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_declare.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_device.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_device_compile.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_distributed.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_drive_handoff.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_drive_store.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_editor_sessions.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_elice.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_frames.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_install.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_kaggle.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_kaggle_cookie.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_kaggle_link.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_link_agent.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_link_command_channel.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_link_exec.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_link_log.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_link_opt_in.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_link_signal.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_link_upload.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_linkd.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_notebook.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_parallel_placement.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_paths.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_portmap.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_protocol.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_providers.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_punch_sockets.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_quic.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_remoting.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_render.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_run_control.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_run_reattach.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_run_takeover.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_runtime.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_shell_workers.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_ship.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_store.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_strategies.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_stubs.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_tunnel_setup.py +0 -0
- {letify-2.11.3 → letify-2.11.4}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: letify
|
|
3
|
-
Version: 2.11.
|
|
3
|
+
Version: 2.11.4
|
|
4
4
|
Summary: Declarations that become infrastructure.
|
|
5
5
|
Project-URL: Homepage, https://github.com/DarkPyonix/letify
|
|
6
6
|
Project-URL: Documentation, https://github.com/DarkPyonix/letify/tree/main/docs
|
|
@@ -1871,6 +1871,8 @@ A strategy that cannot carry the probe, such as the provider fallback, does not
|
|
|
1871
1871
|
|
|
1872
1872
|
Every connected strategy is probed: 30 round trips, then a warm-up transfer that is discarded, then 2 s of transfer in each direction. The warm-up is `min(2.0, max(0.5, 8 x round trip))` seconds, long enough for TCP to leave slow start, and it runs as a transfer of its own on the same connection so the congestion window it opens carries into the measured one. Without it the probe charges a far link for its own ramp: the window is fixed in seconds while the ramp is fixed in round trips, so at a 190 ms round trip more than half the 2 s is spent ramping and the reported throughput is the ramp average, while at 47 ms it is a seventh. A live Kaggle runtime measured up 5.0 MiB/s at 190 ms and up 46.1 MiB/s at 47 ms on the same account, and the throughput times the round trip is 0.95 MiB against 2.18 MiB, which is a window that never finished opening rather than a path that cannot carry more. A strategy whose probe is below the account's floor, [Link floor](#link-floor), is rejected outright, before any comparison between strategies. Of what remains, a strategy whose throughput in either direction is below 25% of the fastest connected strategy in that direction is rejected. The lowest ranked strategy that remains is chosen. When only one strategy connects, it is chosen without comparison, but it is still held to the floor: a single connected strategy below the floor fails the connection rather than being used because nothing else was available.
|
|
1873
1873
|
|
|
1874
|
+
The probe of a letify-link session ([Sidecar interface](#link-sidecar) item 7) stops each stage on evidence, so a fast link is not measured for longer than it needs. The round trips stop at 10 when the median of the first half of the samples and the median of the second half differ by at most 10%, and otherwise continue to 30. After its warm-up a direction is measured for 1 s, and that is the result when its rate is at least twice the account's `min_mib_per_s`; otherwise the direction is measured for 1 s more, so a rate under twice the floor is judged on the same 2 s window as above. The warm-up is unchanged, and the two directions still run one after the other, because a direction measured while the other transfers is lower and would refuse links that clear the floor. The floor is applied to the resulting numbers as in [Link floor](#link-floor). The measurements are in the pull request `Perf: Stop the session probe when its numbers are settled`.
|
|
1875
|
+
|
|
1874
1876
|
The race is not over until a link is accepted. A strategy rejected by the floor does not end it: when every connected strategy has been rejected, the grace period is dropped and the strategies still connecting are given the rest of the race timeout, then probed and held to the floor in their turn. Without this a fast strategy that connects a second later than a rejected one is closed unprobed, and the connection fails although an acceptable link was in hand. The connection fails only when every applicable strategy has settled, or the timeout passes, with nothing above the floor.
|
|
1875
1877
|
|
|
1876
1878
|
Strategies that lose are closed, including one that connects after the choice is made. Once the choice is made, every attempt still running is cancelled: the pipeline hands each attempt a cancel event and sets it, so a TCP punch stops waiting for its agreed start time and stops dialing within 0.1 s, and its attempt ends with a cancellation that is printed as cancelled rather than failed. An attempt that cannot observe the event, such as a provider call already in progress, runs to its end and is closed if it connects.
|
|
@@ -2431,7 +2433,7 @@ The sidecar is a binary named `letify-link`, built for each wheel and installed
|
|
|
2431
2433
|
|
|
2432
2434
|
**Taking over a call.** The run record of [Taking over a running call](#run-takeover) carries a `link` object for a worker that was reached through a session: `node_id`, the remote node id; `endpoint`, the `address:port` the shim listens on; and `local_node`, the node id of the owner. The shim accepts a session from every node id in its `allow` list at any time while it runs, so a second session is a second owner, and it leaves only when no session has a live path for the resume window. A new owner opens a session to `endpoint` with the account's own key (`~/.letify/accounts/<alias>/link.key`), opens one stream with a `door` line, adopts the call on it and speaks the frames of [Channels](#channels). It uses no ssh. A new owner whose node id differs from `local_node`, which is a second machine or a second key, is refused with `UnsupportedMode` saying so, because the shim's `allow` list would need that node id added. Adding it is later work: it needs one more ssh command that reaches the running shim, which has no standard input after the hand-over, and is not built.
|
|
2433
2435
|
|
|
2434
|
-
The connect fails with its reason when any step fails: the binary is missing, the shim reports an error, the handshake is refused, or no candidate answers within `start_timeout_ms`. It does not use the ssh data path instead, unless the account says `link = "ssh"`. [Link floor](#link-floor) and [Choosing a link](#choosing-a-link) apply to the session's measured rates, not to the idle probe of the sidecar (one 16 KiB record, a lower bound that reported 0.15 MiB/s on a link that carried 27.8 MiB/s). Once the session is up and before the hand-over, the local side measures it with the probe of [Choosing a link](#choosing-a-link): 30 round trips with a discarded warm-up, then 2 s of transfer in each direction, on one stream of the session in the `bulk` class opened with the `probe` kind below. The rates are those of the session, the sum over its subflows, and the round trip is the median of the 30. `max_rtt_ms` and `min_mib_per_s` are held to those numbers. A session below either closes and the connect fails with `ProviderUnavailable` and the floor rejection of [Link floor](#link-floor), naming both settings, both rates and the round trip, and the policing pattern when one direction is tens of times the other. A probe that cannot run (the stream cannot open, the shim answers out of order) fails the connect with the reason, because a link that cannot be measured has not cleared the floor. **The path set settles first.** The reply to `open_session` comes when the first candidate has completed the handshake, and the others join afterwards, each after its own handshake. The probe therefore waits until every candidate has either joined (`path_added`) or been lost (`path_lost`), at most `SETTLE_S` (10 s) after the session opened. The wait counts in the `session` phase. When it expires the probe runs over the paths that exist, and the floor is held to what they measure, so a slow set is refused and never accepted on the strength of paths that were still joining. The measured round trip, upload and download are kept on the `LinkRemote` as `rtt_ms`, `upload_bps` and `download_bps`, and the transfer decision of [Several connections at once](#parallel-placement) reads them in place of the sidecar's idle `probe_rate`.
|
|
2436
|
+
The connect fails with its reason when any step fails: the binary is missing, the shim reports an error, the handshake is refused, or no candidate answers within `start_timeout_ms`. It does not use the ssh data path instead, unless the account says `link = "ssh"`. [Link floor](#link-floor) and [Choosing a link](#choosing-a-link) apply to the session's measured rates, not to the idle probe of the sidecar (one 16 KiB record, a lower bound that reported 0.15 MiB/s on a link that carried 27.8 MiB/s). Once the session is up and before the hand-over, the local side measures it with the probe of [Choosing a link](#choosing-a-link): up to 30 round trips with a discarded warm-up, then up to 2 s of transfer in each direction, ended early on a settled round trip or a rate of at least twice `min_mib_per_s` as that section says, on one stream of the session in the `bulk` class opened with the `probe` kind below. The rates are those of the session, the sum over its subflows, and the round trip is the median of the 30. `max_rtt_ms` and `min_mib_per_s` are held to those numbers. A session below either closes and the connect fails with `ProviderUnavailable` and the floor rejection of [Link floor](#link-floor), naming both settings, both rates and the round trip, and the policing pattern when one direction is tens of times the other. A probe that cannot run (the stream cannot open, the shim answers out of order) fails the connect with the reason, because a link that cannot be measured has not cleared the floor. **The path set settles first.** The reply to `open_session` comes when the first candidate has completed the handshake, and the others join afterwards, each after its own handshake. The probe therefore waits until every candidate has either joined (`path_added`) or been lost (`path_lost`), at most `SETTLE_S` (10 s) after the session opened. The wait counts in the `session` phase. When it expires the probe runs over the paths that exist, and the floor is held to what they measure, so a slow set is refused and never accepted on the strength of paths that were still joining. The measured round trip, upload and download are kept on the `LinkRemote` as `rtt_ms`, `upload_bps` and `download_bps`, and the transfer decision of [Several connections at once](#parallel-placement) reads them in place of the sidecar's idle `probe_rate`.
|
|
2435
2437
|
|
|
2436
2438
|
**The probe stream.** `{"kind":"probe","token":"<hex>"}` asks the shim to answer the probe of [Choosing a link](#choosing-a-link) on the stream: it echoes a round trip request, discards the bytes of an upload and reports their total, and sends bytes for a requested number of seconds for a download. It starts no process.
|
|
2437
2439
|
|
|
@@ -767,7 +767,7 @@ def connect_over(
|
|
|
767
767
|
)
|
|
768
768
|
began = clock()
|
|
769
769
|
try:
|
|
770
|
-
result = measure_session(remote)
|
|
770
|
+
result = measure_session(remote, min_bps)
|
|
771
771
|
except (OSError, EOFError, RuntimeFailure, linkd.LinkError) as error:
|
|
772
772
|
remote.close()
|
|
773
773
|
raise _fail(alias, f"cannot measure the session: {error}") from error
|
|
@@ -1009,12 +1009,24 @@ def attach(
|
|
|
1009
1009
|
)
|
|
1010
1010
|
|
|
1011
1011
|
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1012
|
+
#: Round trips the session probe takes at least, and the share of the floor a direction must
|
|
1013
|
+
#: reach to end after its first window. Spec "Choosing a link".
|
|
1014
|
+
SESSION_MIN_ROUND_TRIPS = 10
|
|
1015
|
+
EARLY_FLOOR_FACTOR = 2.0
|
|
1015
1016
|
|
|
1016
1017
|
|
|
1017
|
-
def
|
|
1018
|
+
def make_probe(min_bps: float | None = None) -> Probe:
|
|
1019
|
+
"""The session probe of Spec "Choosing a link": up to 30 round trips, a discarded warm-up
|
|
1020
|
+
and up to 2 s each way, each stage ended early on evidence.
|
|
1021
|
+
|
|
1022
|
+
A direction ends early only at ``EARLY_FLOOR_FACTOR`` times ``min_bps``. With no floor
|
|
1023
|
+
there is nothing to be well above, so every direction runs its full window.
|
|
1024
|
+
"""
|
|
1025
|
+
early = EARLY_FLOOR_FACTOR * min_bps if min_bps else None
|
|
1026
|
+
return Probe(min_round_trips=SESSION_MIN_ROUND_TRIPS, early_bps=early)
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
def measure_session(remote: LinkRemote, min_bps: float | None = None) -> ProbeResult:
|
|
1018
1030
|
"""Run the bulk probe over the session on a dedicated ``probe`` stream of the shim.
|
|
1019
1031
|
|
|
1020
1032
|
The stream is in the bulk class, so the rates are the session's, summed over its subflows.
|
|
@@ -1023,7 +1035,7 @@ def measure_session(remote: LinkRemote) -> ProbeResult:
|
|
|
1023
1035
|
sock = remote.open_stream("bulk")
|
|
1024
1036
|
try:
|
|
1025
1037
|
sock.sendall(stream_header("probe", secrets.token_hex(8)))
|
|
1026
|
-
return make_probe().measure(sock)
|
|
1038
|
+
return make_probe(min_bps).measure(sock)
|
|
1027
1039
|
finally:
|
|
1028
1040
|
with contextlib.suppress(OSError):
|
|
1029
1041
|
sock.close()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Probe, a short measurement of a Link.
|
|
2
2
|
|
|
3
|
-
Owns the client side of the probe: 30 round trips, then a discarded warm-up and a
|
|
4
|
-
transfer in each direction against the responder in ``nat.serve_probe
|
|
5
|
-
what the numbers decide; the pipeline does.
|
|
3
|
+
Owns the client side of the probe: up to 30 round trips, then a discarded warm-up and a
|
|
4
|
+
timed transfer in each direction against the responder in ``nat.serve_probe``, with the
|
|
5
|
+
rules that end a stage early. It does not own what the numbers decide; the pipeline does.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
from __future__ import annotations
|
|
@@ -43,9 +43,28 @@ WARMUP_ROUND_TRIPS = 8
|
|
|
43
43
|
WARMUP_MIN_S = 0.5
|
|
44
44
|
WARMUP_MAX_S = 2.0
|
|
45
45
|
|
|
46
|
+
#: Round trips after which the round trip counts as settled, when the medians of the two
|
|
47
|
+
#: halves of the samples differ by at most this share of the median of all of them.
|
|
48
|
+
SETTLED_SHARE = 0.10
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def settled(rtts: list[float]) -> bool:
|
|
52
|
+
"""Whether the median of the first half of ``rtts`` matches that of the second half."""
|
|
53
|
+
middle = len(rtts) // 2
|
|
54
|
+
if middle == 0:
|
|
55
|
+
return False
|
|
56
|
+
overall = statistics.median(rtts)
|
|
57
|
+
gap = abs(statistics.median(rtts[:middle]) - statistics.median(rtts[middle:]))
|
|
58
|
+
return gap <= SETTLED_SHARE * overall
|
|
59
|
+
|
|
46
60
|
|
|
47
61
|
class Probe:
|
|
48
|
-
"""30 round trips, a discarded warm-up, then ``seconds`` of transfer each way.
|
|
62
|
+
"""Up to 30 round trips, a discarded warm-up, then ``seconds`` of transfer each way.
|
|
63
|
+
|
|
64
|
+
By default every stage runs its full length. ``min_round_trips`` lets the round trips
|
|
65
|
+
stop once ``settled``. ``early_bps`` ends a direction after ``early_window`` seconds
|
|
66
|
+
when it already measures at least that rate, and otherwise measures the rest of
|
|
67
|
+
``seconds``, so only a rate well above the caller's floor is cut short.
|
|
49
68
|
|
|
50
69
|
The warm-up exists because TCP's ramp is fixed in round trips while the measurement
|
|
51
70
|
window is fixed in seconds, so without it a far link is charged for its own slow
|
|
@@ -57,10 +76,16 @@ class Probe:
|
|
|
57
76
|
round_trips: int = 30,
|
|
58
77
|
seconds: float = 2.0,
|
|
59
78
|
*,
|
|
79
|
+
min_round_trips: int | None = None,
|
|
80
|
+
early_bps: float | None = None,
|
|
81
|
+
early_window: float = 1.0,
|
|
60
82
|
clock: Callable[[], float] = time.perf_counter,
|
|
61
83
|
):
|
|
62
84
|
self.round_trips = round_trips
|
|
63
85
|
self.seconds = seconds
|
|
86
|
+
self.min_round_trips = min_round_trips
|
|
87
|
+
self.early_bps = early_bps
|
|
88
|
+
self.early_window = early_window
|
|
64
89
|
self.clock = clock
|
|
65
90
|
|
|
66
91
|
def warmup_for(self, rtt_ms: float) -> float:
|
|
@@ -77,17 +102,45 @@ class Probe:
|
|
|
77
102
|
if nat.recv_exact(stream, 9) != b"P" + payload:
|
|
78
103
|
raise OSError("the probe responder answered out of order")
|
|
79
104
|
rtts.append((self.clock() - began) * 1000.0)
|
|
105
|
+
if self.min_round_trips and len(rtts) >= self.min_round_trips and settled(rtts):
|
|
106
|
+
break
|
|
80
107
|
rtt_ms = statistics.median(rtts) if rtts else 0.0
|
|
81
108
|
|
|
82
109
|
# The warm-up runs on the same connection, so the window it opens carries over.
|
|
83
110
|
warmup = self.warmup_for(rtt_ms)
|
|
84
111
|
self._upload(stream, warmup)
|
|
85
|
-
upload = self.
|
|
112
|
+
upload = self._window(self._send, stream)
|
|
86
113
|
self._download(stream, warmup)
|
|
87
|
-
download = self.
|
|
114
|
+
download = self._window(self._receive, stream)
|
|
88
115
|
return ProbeResult(rtt_ms, upload, download)
|
|
89
116
|
|
|
117
|
+
def _window(
|
|
118
|
+
self, segment: Callable[[Stream, float], tuple[int, float]], stream: Stream
|
|
119
|
+
) -> float:
|
|
120
|
+
"""The measured rate of one direction, in bytes per second.
|
|
121
|
+
|
|
122
|
+
With ``early_bps`` set the first ``early_window`` seconds decide: at or above that
|
|
123
|
+
rate the direction is done, below it the rest of ``seconds`` is measured and both
|
|
124
|
+
segments make the rate.
|
|
125
|
+
"""
|
|
126
|
+
if self.early_bps is None or self.early_window >= self.seconds:
|
|
127
|
+
total, took = segment(stream, self.seconds)
|
|
128
|
+
return total / max(took, 1e-9)
|
|
129
|
+
total, took = segment(stream, self.early_window)
|
|
130
|
+
if total / max(took, 1e-9) < self.early_bps:
|
|
131
|
+
more, longer = segment(stream, self.seconds - self.early_window)
|
|
132
|
+
total, took = total + more, took + longer
|
|
133
|
+
return total / max(took, 1e-9)
|
|
134
|
+
|
|
90
135
|
def _upload(self, stream: Stream, seconds: float) -> float:
|
|
136
|
+
total, took = self._send(stream, seconds)
|
|
137
|
+
return total / max(took, 1e-9)
|
|
138
|
+
|
|
139
|
+
def _download(self, stream: Stream, seconds: float) -> float:
|
|
140
|
+
total, took = self._receive(stream, seconds)
|
|
141
|
+
return total / max(took, 1e-9)
|
|
142
|
+
|
|
143
|
+
def _send(self, stream: Stream, seconds: float) -> tuple[int, float]:
|
|
91
144
|
block = b"\0" * nat.CHUNK
|
|
92
145
|
stream.sendall(b"U")
|
|
93
146
|
began = self.clock()
|
|
@@ -95,9 +148,9 @@ class Probe:
|
|
|
95
148
|
stream.sendall(struct.pack("!I", len(block)) + block)
|
|
96
149
|
stream.sendall(struct.pack("!I", 0))
|
|
97
150
|
received = struct.unpack("!Q", nat.recv_exact(stream, 8))[0]
|
|
98
|
-
return received
|
|
151
|
+
return received, self.clock() - began
|
|
99
152
|
|
|
100
|
-
def
|
|
153
|
+
def _receive(self, stream: Stream, seconds: float) -> tuple[int, float]:
|
|
101
154
|
began = self.clock()
|
|
102
155
|
stream.sendall(b"D" + struct.pack("!d", seconds))
|
|
103
156
|
total = 0
|
|
@@ -106,7 +159,7 @@ class Probe:
|
|
|
106
159
|
if size == 0:
|
|
107
160
|
break
|
|
108
161
|
total += len(nat.recv_exact(stream, size))
|
|
109
|
-
return total
|
|
162
|
+
return total, self.clock() - began
|
|
110
163
|
|
|
111
164
|
|
|
112
|
-
__all__ = ["Probe", "ProbeResult", "Stream"]
|
|
165
|
+
__all__ = ["Probe", "ProbeResult", "Stream", "settled"]
|
|
@@ -396,11 +396,11 @@ dependencies = [
|
|
|
396
396
|
|
|
397
397
|
[[package]]
|
|
398
398
|
name = "letify"
|
|
399
|
-
version = "2.11.
|
|
399
|
+
version = "2.11.4"
|
|
400
400
|
|
|
401
401
|
[[package]]
|
|
402
402
|
name = "letify-link"
|
|
403
|
-
version = "2.11.
|
|
403
|
+
version = "2.11.4"
|
|
404
404
|
dependencies = [
|
|
405
405
|
"ed25519-dalek",
|
|
406
406
|
"getrandom 0.2.17",
|
|
@@ -416,7 +416,7 @@ dependencies = [
|
|
|
416
416
|
|
|
417
417
|
[[package]]
|
|
418
418
|
name = "letify-quic"
|
|
419
|
-
version = "2.11.
|
|
419
|
+
version = "2.11.4"
|
|
420
420
|
dependencies = [
|
|
421
421
|
"quinn",
|
|
422
422
|
"rcgen",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "letify-status",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "letify-status",
|
|
9
|
-
"version": "2.11.
|
|
9
|
+
"version": "2.11.4",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/node": "^18.19.0",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "letify-status",
|
|
3
3
|
"displayName": "letify Status",
|
|
4
4
|
"description": "letify quota and GPU activity in the status bar, read from the letify CLI.",
|
|
5
|
-
"version": "2.11.
|
|
5
|
+
"version": "2.11.4",
|
|
6
6
|
"publisher": "darkpyonix",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
|
8
8
|
"repository": {
|
|
@@ -2312,7 +2312,9 @@ def quick_link_probe(monkeypatch):
|
|
|
2312
2312
|
def warmup_for(self, rtt_ms: float) -> float:
|
|
2313
2313
|
return 0.05
|
|
2314
2314
|
|
|
2315
|
-
monkeypatch.setattr(
|
|
2315
|
+
monkeypatch.setattr(
|
|
2316
|
+
linkchannel, "make_probe", lambda min_bps=None: Quick(round_trips=5, seconds=0.2)
|
|
2317
|
+
)
|
|
2316
2318
|
|
|
2317
2319
|
|
|
2318
2320
|
# -- the signalling service ----------------------------------------------------------------
|
|
@@ -27,6 +27,8 @@ from letify.runtime.channel import PersistentChannel
|
|
|
27
27
|
from letify.transport import linkchannel, linkd
|
|
28
28
|
|
|
29
29
|
MIB = 1 << 20
|
|
30
|
+
#: The probe the connect builds, taken before the autouse fixture swaps in a quick one.
|
|
31
|
+
REAL_MAKE_PROBE = linkchannel.make_probe
|
|
30
32
|
|
|
31
33
|
|
|
32
34
|
class LocalShell(Shell):
|
|
@@ -374,7 +376,9 @@ def test_a_session_at_the_floor_is_accepted() -> None:
|
|
|
374
376
|
def test_a_connect_whose_probe_measures_below_the_floor_fails_and_closes(
|
|
375
377
|
linked, monkeypatch
|
|
376
378
|
) -> None:
|
|
377
|
-
monkeypatch.setattr(
|
|
379
|
+
monkeypatch.setattr(
|
|
380
|
+
linkchannel, "measure_session", lambda remote, min_bps=None: measured(60.0, 0.5, 0.4)
|
|
381
|
+
)
|
|
378
382
|
with pytest.raises(ProviderUnavailable) as raised:
|
|
379
383
|
linked.open_channel(runtime())
|
|
380
384
|
text = str(raised.value)
|
|
@@ -383,7 +387,7 @@ def test_a_connect_whose_probe_measures_below_the_floor_fails_and_closes(
|
|
|
383
387
|
|
|
384
388
|
|
|
385
389
|
def test_a_connect_whose_probe_cannot_run_fails_with_the_reason(linked, monkeypatch) -> None:
|
|
386
|
-
def broken(remote):
|
|
390
|
+
def broken(remote, min_bps=None):
|
|
387
391
|
raise OSError("the probe responder answered out of order")
|
|
388
392
|
|
|
389
393
|
monkeypatch.setattr(linkchannel, "measure_session", broken)
|
|
@@ -472,7 +476,9 @@ def test_the_connect_announces_nothing_when_announce_is_off(linked, capsys) -> N
|
|
|
472
476
|
|
|
473
477
|
|
|
474
478
|
def test_a_rejected_session_announces_the_rejection(linked, capsys, monkeypatch) -> None:
|
|
475
|
-
monkeypatch.setattr(
|
|
479
|
+
monkeypatch.setattr(
|
|
480
|
+
linkchannel, "measure_session", lambda remote, min_bps=None: measured(60.0, 0.5, 0.4)
|
|
481
|
+
)
|
|
476
482
|
with pytest.raises(ProviderUnavailable):
|
|
477
483
|
linked.open_channel(runtime())
|
|
478
484
|
assert "lab letify-link: rejected, " in capsys.readouterr().err
|
|
@@ -922,3 +928,18 @@ def test_an_account_that_cannot_classify_its_nat_prints_the_nat_line_before_fail
|
|
|
922
928
|
provider.close_link()
|
|
923
929
|
nat = [line for line in capsys.readouterr().err.splitlines() if "letify-link: NAT " in line]
|
|
924
930
|
assert nat and nat[0].split("letify-link: ")[1].startswith("NAT unknown here (cannot classify")
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
def test_the_session_probe_ends_early_at_twice_the_account_floor() -> None:
|
|
934
|
+
"""Spec "Choosing a link": the early stop is relative to the floor the account holds."""
|
|
935
|
+
probe = REAL_MAKE_PROBE(10.0 * MIB)
|
|
936
|
+
assert probe.early_bps == 20.0 * MIB
|
|
937
|
+
assert probe.min_round_trips == 10
|
|
938
|
+
assert (probe.round_trips, probe.seconds) == (30, 2.0)
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
def test_a_session_probe_with_no_floor_never_ends_a_direction_early() -> None:
|
|
942
|
+
for floor in (None, 0.0):
|
|
943
|
+
probe = REAL_MAKE_PROBE(floor)
|
|
944
|
+
assert probe.early_bps is None
|
|
945
|
+
assert probe.min_round_trips == 10
|
|
@@ -262,6 +262,106 @@ def test_the_probe_discards_a_warm_up_transfer_in_each_direction() -> None:
|
|
|
262
262
|
assert measured.download_bps > 0
|
|
263
263
|
|
|
264
264
|
|
|
265
|
+
class _Counting:
|
|
266
|
+
"""A stream to a real responder that records which ops the probe sent."""
|
|
267
|
+
|
|
268
|
+
def __init__(self, user: socket.socket):
|
|
269
|
+
self.user = user
|
|
270
|
+
self.ops: list[bytes] = []
|
|
271
|
+
|
|
272
|
+
def recv(self, size: int) -> bytes:
|
|
273
|
+
return self.user.recv(size)
|
|
274
|
+
|
|
275
|
+
def sendall(self, data: bytes) -> None:
|
|
276
|
+
if data[:1] in (b"P", b"U", b"D"):
|
|
277
|
+
self.ops.append(data[:1])
|
|
278
|
+
self.user.sendall(data)
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
class _RoundTripClock:
|
|
282
|
+
"""A clock whose first ``len(rtts_ms)`` round trips last exactly the given times.
|
|
283
|
+
|
|
284
|
+
The probe reads the clock twice per round trip, so the first calls alternate between a
|
|
285
|
+
start and a start plus the next round trip. After those it advances 10 ms per call.
|
|
286
|
+
"""
|
|
287
|
+
|
|
288
|
+
def __init__(self, rtts_ms: list[float]):
|
|
289
|
+
self.rtts = [r / 1000.0 for r in rtts_ms]
|
|
290
|
+
self.calls = 0
|
|
291
|
+
self.now = 0.0
|
|
292
|
+
|
|
293
|
+
def __call__(self) -> float:
|
|
294
|
+
index, phase = divmod(self.calls, 2)
|
|
295
|
+
self.calls += 1
|
|
296
|
+
if index < len(self.rtts):
|
|
297
|
+
if phase == 0:
|
|
298
|
+
return self.now
|
|
299
|
+
self.now += self.rtts[index]
|
|
300
|
+
return self.now
|
|
301
|
+
self.now += 0.01
|
|
302
|
+
return self.now
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
def _responder() -> socket.socket:
|
|
306
|
+
user, remote = socket.socketpair()
|
|
307
|
+
threading.Thread(target=nat.serve_probe, args=(remote,), daemon=True).start()
|
|
308
|
+
return user
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
def test_the_round_trips_stop_at_ten_when_the_median_has_settled() -> None:
|
|
312
|
+
"""Spec "Choosing a link": a steady round trip is not sampled thirty times."""
|
|
313
|
+
user = _responder()
|
|
314
|
+
stream = _Counting(user)
|
|
315
|
+
clock = _RoundTripClock([120.0] * 30)
|
|
316
|
+
Probe(round_trips=30, seconds=0.02, min_round_trips=10, clock=clock).measure(stream)
|
|
317
|
+
user.close()
|
|
318
|
+
assert stream.ops.count(b"P") == 10
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
def test_the_round_trips_continue_to_thirty_while_the_median_keeps_moving() -> None:
|
|
322
|
+
"""Spec "Choosing a link": a jittery link is sampled to the full thirty."""
|
|
323
|
+
user = _responder()
|
|
324
|
+
stream = _Counting(user)
|
|
325
|
+
# A round trip that keeps growing: the halves never agree at any length.
|
|
326
|
+
clock = _RoundTripClock([100.0 + 10.0 * i for i in range(30)])
|
|
327
|
+
Probe(round_trips=30, seconds=0.02, min_round_trips=10, clock=clock).measure(stream)
|
|
328
|
+
user.close()
|
|
329
|
+
assert stream.ops.count(b"P") == 30
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
def test_a_probe_without_an_early_stop_takes_all_thirty_round_trips() -> None:
|
|
333
|
+
user = _responder()
|
|
334
|
+
stream = _Counting(user)
|
|
335
|
+
Probe(round_trips=30, seconds=0.02, clock=_RoundTripClock([120.0] * 30)).measure(stream)
|
|
336
|
+
user.close()
|
|
337
|
+
assert stream.ops.count(b"P") == 30
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
def test_a_direction_well_above_the_floor_is_measured_for_one_window() -> None:
|
|
341
|
+
"""Spec "Choosing a link": at least twice the floor ends the direction after one window."""
|
|
342
|
+
user = _responder()
|
|
343
|
+
stream = _Counting(user)
|
|
344
|
+
probe = Probe(round_trips=2, seconds=0.04, early_bps=1.0, early_window=0.02)
|
|
345
|
+
probe.warmup_for = lambda _rtt_ms: 0.02
|
|
346
|
+
measured = probe.measure(stream)
|
|
347
|
+
user.close()
|
|
348
|
+
assert stream.ops[2:] == [b"U", b"U", b"D", b"D"]
|
|
349
|
+
assert measured.upload_bps > 0 and measured.download_bps > 0
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
def test_a_direction_under_twice_the_floor_is_measured_for_the_full_window() -> None:
|
|
353
|
+
"""Spec "Choosing a link": a rate near the floor is judged on the same 2 s as before."""
|
|
354
|
+
user = _responder()
|
|
355
|
+
stream = _Counting(user)
|
|
356
|
+
probe = Probe(round_trips=2, seconds=0.04, early_bps=1e18, early_window=0.02)
|
|
357
|
+
probe.warmup_for = lambda _rtt_ms: 0.02
|
|
358
|
+
measured = probe.measure(stream)
|
|
359
|
+
user.close()
|
|
360
|
+
# A warm-up and two window segments each way.
|
|
361
|
+
assert stream.ops[2:] == [b"U", b"U", b"U", b"D", b"D", b"D"]
|
|
362
|
+
assert measured.upload_bps > 0 and measured.download_bps > 0
|
|
363
|
+
|
|
364
|
+
|
|
265
365
|
def test_a_responder_asked_to_bridge_stops_answering_the_probe() -> None:
|
|
266
366
|
user, remote = socket.socketpair()
|
|
267
367
|
user.sendall(b"B")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|