letify 2.12.2__tar.gz → 2.12.3__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.12.2 → letify-2.12.3}/PKG-INFO +1 -1
- {letify-2.12.2 → letify-2.12.3}/docs/SPEC.md +1 -1
- {letify-2.12.2 → letify-2.12.3}/letify/__init__.py +1 -1
- {letify-2.12.2 → letify-2.12.3}/letify/protocol/worker.py +50 -11
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/channel.py +6 -1
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/reattach.py +12 -3
- {letify-2.12.2 → letify-2.12.3}/letify-core/Cargo.lock +3 -3
- {letify-2.12.2 → letify-2.12.3}/letify-core/Cargo.toml +1 -1
- {letify-2.12.2 → letify-2.12.3}/letify-ext/package-lock.json +2 -2
- {letify-2.12.2 → letify-2.12.3}/letify-ext/package.json +1 -1
- {letify-2.12.2 → letify-2.12.3}/pyproject.toml +1 -1
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_agent.py +14 -3
- {letify-2.12.2 → letify-2.12.3}/tests/test_run_reattach.py +40 -1
- {letify-2.12.2 → letify-2.12.3}/.github/workflows/ci.yml +0 -0
- {letify-2.12.2 → letify-2.12.3}/.github/workflows/docs.yml +0 -0
- {letify-2.12.2 → letify-2.12.3}/.github/workflows/letify-link.yml +0 -0
- {letify-2.12.2 → letify-2.12.3}/.github/workflows/publish-crates.yml +0 -0
- {letify-2.12.2 → letify-2.12.3}/.github/workflows/publish.yml +0 -0
- {letify-2.12.2 → letify-2.12.3}/.github/workflows/reserve-crates.yml +0 -0
- {letify-2.12.2 → letify-2.12.3}/.gitignore +0 -0
- {letify-2.12.2 → letify-2.12.3}/.researchtree +0 -0
- {letify-2.12.2 → letify-2.12.3}/CLAUDE.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/LICENSE +0 -0
- {letify-2.12.2 → letify-2.12.3}/PROJECT.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/README.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/COMPONENT.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/INTENT.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/NETWORK.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/ROADMAP-3.0.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/01-getting-started.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/02-providers.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/03-execution-modes.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/04-environments-and-data.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/05-concurrency.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/06-cost.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/07-troubleshooting.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/08-releasing.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/09-agent.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/README.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/ko/01-/354/213/234/354/236/221/355/225/230/352/270/260.md" +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/ko/02-/355/224/204/353/241/234/353/260/224/354/235/264/353/215/224.md" +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/ko/03-/354/213/244/355/226/211-/353/260/251/354/213/235.md" +0 -0
- {letify-2.12.2 → letify-2.12.3}/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.12.2 → letify-2.12.3}/docs/guide/ko/05-/353/217/231/354/213/234-/354/213/244/355/226/211.md" +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/ko/06-/353/271/204/354/232/251.md" +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/ko/07-/353/254/270/354/240/234-/355/225/264/352/262/260.md" +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/ko/08-/353/246/264/353/246/254/354/212/244.md" +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/ko/09-/354/227/220/354/235/264/354/240/204/355/212/270.md" +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/guide/ko/README.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/locales/README_ko.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/docs/mkdocs.yml +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/README.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/nvfp4-lora/.letify.example +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/nvfp4-lora/00_smoke.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/nvfp4-lora/01_sweep.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/nvfp4-lora/02_resume.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/nvfp4-lora/03_watch.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/nvfp4-lora/README.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/nvfp4-lora/README_ko.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/nvfp4-lora/common.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/examples/nvfp4-lora/recipe.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/cli.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/config/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/config/inventory.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/config/login.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/config/schema.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/config/secrets.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/config/writer.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/declare/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/declare/cache.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/declare/env.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/declare/exit.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/declare/function.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/declare/instance.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/declare/reduce.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/declare/replicas.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/errors.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/install.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/launcher.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/paths.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/protocol/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/protocol/codec.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/protocol/driver.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/protocol/handle.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/protocol/wire.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/base.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/colab.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/colab_files.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/colab_keepalive.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/elice.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/kaggle.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/kaggle_adapter.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/local.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/modal.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/modal_adapter.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/naming.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/shell.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/tunnel.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/providers/usage.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/device/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/device/client.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/device/cuda.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/device/executor.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/device/frames.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/device/guard.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/device/tensor.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/device/trace.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/remoting/device/value.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/render.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/bootstrap.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/broker.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/control.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/lease.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/pool.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/session.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/takeover.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/telemetry.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/runtime/workers.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/backends/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/backends/drive.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/backends/filesystem.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/backends/google_auth.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/backends/layout.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/backends/objects.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/cas.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/handoff.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/pathdata.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/sendorder.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/store/volume.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/stubs.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/tools.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/__init__.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/agent.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/announce.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/link.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/linkagent.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/linkchannel.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/linkd.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/linkmailbox.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/linkpump.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/linkshim.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/linksignal.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/linkupload.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/linkwebsocket.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/nat.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/pipeline.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/portmap.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/probe.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/quic.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/rendezvous.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/setup.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/sshopts.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify/transport/strategies.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/.gitignore +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/build.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify/Cargo.toml +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify/LICENSE +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify/README.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify/src/lib.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/Cargo.toml +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/examples/bench.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/acceptor.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/bin/letify-link.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/config.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/error.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/frame.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/handshake.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/hysteresis.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/identity.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/keys.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/lib.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/observe.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/paths.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/plan.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/policing.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/punch.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/record.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/relay.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/rendezvous.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/replay.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/session.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/sidecar.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/stream.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/stun.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/tcp.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/trace.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/src/udp.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/acceptor.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/api.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/common/mod.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/diag_sim.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/fairness.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/gauge.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/handshake.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/hysteresis.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/keepalive.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/mobile.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/nat.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/paths.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/qad.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/rekey.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/relay.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/relay_pairing.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/rendezvous.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/reorder.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/replay.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/resume.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/revoke.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/session.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/sidecar.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/startup.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/subflows.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/trace.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/udp.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-link/tests/udp_bench.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-quic/Cargo.toml +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/letify-quic/src/main.rs +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-core/rust-toolchain.toml +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/.vscodeignore +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/LICENSE +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/README.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/media/icon.svg +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/src/cli.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/src/extension.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/src/history.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/src/model.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/src/poll.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/src/render.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/test/cli.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/test/manifest.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/test/model.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/test/regressions.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-ext/tsconfig.json +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/README.md +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/cloudflare.config.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/package-lock.json +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/package.json +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/src/auth.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/src/ed25519.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/src/handler.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/src/index.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/src/limiter.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/src/mailbox.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/src/objects.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/src/protocol.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/src/storage.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/test/auth.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/test/ed25519.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/test/helpers.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/test/interop.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/test/limiter.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/test/mailbox.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/test/objects.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/test/setup.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/test/worker.test.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/tsconfig.json +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify-signal/vitest.config.ts +0 -0
- {letify-2.12.2 → letify-2.12.3}/letify_providers.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/scripts/sync-main.sh +0 -0
- {letify-2.12.2 → letify-2.12.3}/scripts/version.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/conftest.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/fake_kaggle_adapter.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/fake_modal_adapter.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_cli.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_cli_output.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_colab_keepalive.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_config.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_core.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_data.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_data_in_place.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_data_streaming.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_declare.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_device.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_device_compile.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_distributed.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_drive_handoff.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_drive_store.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_editor_sessions.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_elice.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_frames.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_install.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_kaggle.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_kaggle_cookie.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_kaggle_link.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_channel.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_command_channel.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_exec.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_log.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_mailbox_close.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_opt_in.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_signal.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_ssh_stream.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_link_upload.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_linkd.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_notebook.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_parallel_placement.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_paths.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_portmap.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_protocol.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_providers.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_punch_sockets.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_quic.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_remoting.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_render.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_run_control.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_run_takeover.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_runtime.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_shell_workers.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_ship.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_store.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_strategies.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_stubs.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_transport.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_tunnel_agent_login.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_tunnel_setup.py +0 -0
- {letify-2.12.2 → letify-2.12.3}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: letify
|
|
3
|
-
Version: 2.12.
|
|
3
|
+
Version: 2.12.3
|
|
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
|
|
@@ -1119,7 +1119,7 @@ The worker outlives a channel that closes without a shutdown frame, as [Taking o
|
|
|
1119
1119
|
|
|
1120
1120
|
`RuntimeLost` (including `SpotPreempted`), `RuntimeFailure` (including a call that exceeded its `timeout`), `RemoteError` and a provider that raises `UnsupportedMode` from `attach_channel` are never reattached. They take the path of [Failure and retry](#failure-and-retry).
|
|
1121
1121
|
2. **Attempts.** The owner stops renewing the lease on the dead channel, waits 5, 10, 20, then 40 s before each attempt (40 s for every attempt after the fourth, at most 8 attempts), and gives up when the next wait plus `MARGIN_S` would pass the lease deadline. Each attempt builds a channel with `Provider.attach_channel`, starts it and sends `adopt` for the run id, exactly as `letify takeover` does, and the body's `timeout` keeps counting from the first send.
|
|
1122
|
-
3. **On success.** The runtime's channel becomes the new one, which keeps the old channel's output setting. The lease is armed again over it, the
|
|
1122
|
+
3. **On success.** The runtime's channel becomes the new one, which keeps the old channel's output setting. The lease is armed again over it, and the call goes on waiting for its reply. The output the call made reaches this process in order and once, whatever the lost channel had carried: `adopt` names, per stream, how many bytes of the call's output this process has received (`have`), and the worker replays the rest from its history before anything newer. A byte the worker wrote into the broken link but this process never read is therefore replayed, and one it did read is not. The worker keeps the last 256 KiB (`_BACKLOG_BYTES`) of each stream for the call, and a `have` older than that replays the whole history. An `adopt` with no `have`, as `letify takeover` sends, replays only the output no channel could take. The call's value, its raised exception and its written-back outputs are those of the original call. The body is not run again. A channel lost again is reattached again under the same limits. As after a takeover, the session ends when the reattached call returns, even inside `keep_alive`.
|
|
1123
1123
|
4. **Messages.** Before each attempt the owner prints to standard error `letify: lost the channel to <runtime> during <run>; reattaching (attempt <n>)`, and on success `letify: reattached to <run> on <runtime>`.
|
|
1124
1124
|
5. **When it gives up.** The old channel is closed without a shutdown frame, and the original failure takes the path of [Failure and retry](#failure-and-retry): the runtime is discarded and the call is retried on a fresh one under `retries`. A failure of the user's code is never retried, as before.
|
|
1125
1125
|
|
|
@@ -98,14 +98,24 @@ _SENDER = (TextSender if _LETIFY_TEXT_FRAMES else Sender)(fd_writer(_FRAME_FD))
|
|
|
98
98
|
# owner the door connection that adopted the call, and owner_stream its request id
|
|
99
99
|
# finished/outcome the call's reply once the body has ended and before it is delivered
|
|
100
100
|
# backlog the tail of output made while no channel could take it
|
|
101
|
+
# history the tail of all output the call made, per stream, and total the number of
|
|
102
|
+
# bytes it made, so an owner that says how much it has received can be given
|
|
103
|
+
# the rest. Guarded by _HISTORY_LOCK, which also guards the choice of sender.
|
|
101
104
|
_TAKE = {
|
|
102
105
|
"run": None, "path": None, "listener": None, "stream": None, "live": True,
|
|
103
106
|
"ended_input": False, "moved": False, "owner": None, "owner_stream": None,
|
|
104
107
|
"finished": False, "outcome": None, "primary": None, "new_owner": None,
|
|
105
108
|
"backlog": {STDOUT: bytearray(), STDERR: bytearray()},
|
|
109
|
+
"history": {STDOUT: bytearray(), STDERR: bytearray()},
|
|
110
|
+
"total": {STDOUT: 0, STDERR: 0},
|
|
106
111
|
}
|
|
107
112
|
_TAKE_COND = threading.Condition()
|
|
108
113
|
|
|
114
|
+
#: Held by a pump while it records output and picks the sender it goes to, and by an adoption
|
|
115
|
+
#: while it replays the history and switches the sender, so each byte goes to exactly one side
|
|
116
|
+
#: of the switch. Taken after _TAKE_COND, never before.
|
|
117
|
+
_HISTORY_LOCK = threading.Lock()
|
|
118
|
+
|
|
109
119
|
#: The most output kept for a new owner while no channel could take it, per stream.
|
|
110
120
|
_BACKLOG_BYTES = 256 << 10
|
|
111
121
|
|
|
@@ -119,6 +129,17 @@ _DOOR_IDLE_S = 30.0
|
|
|
119
129
|
_DRAIN_TOKEN = b"\x1a\x1aLETIFY-DRAIN-7f3a9c4e\x1a\x1a"
|
|
120
130
|
|
|
121
131
|
|
|
132
|
+
def _remember_output(kind, data):
|
|
133
|
+
"""Add output to the history of the call being served. The caller holds _HISTORY_LOCK."""
|
|
134
|
+
if _TAKE["run"] is None:
|
|
135
|
+
return
|
|
136
|
+
kept = _TAKE["history"][kind]
|
|
137
|
+
kept += data
|
|
138
|
+
_TAKE["total"][kind] += len(data)
|
|
139
|
+
if len(kept) > _BACKLOG_BYTES:
|
|
140
|
+
del kept[: len(kept) - _BACKLOG_BYTES]
|
|
141
|
+
|
|
142
|
+
|
|
122
143
|
def _held_back(data):
|
|
123
144
|
"""How many bytes at the end of ``data`` could be the start of a split token."""
|
|
124
145
|
most = min(len(_DRAIN_TOKEN) - 1, len(data))
|
|
@@ -148,7 +169,10 @@ class _Pump(threading.Thread):
|
|
|
148
169
|
return
|
|
149
170
|
self.busy = True
|
|
150
171
|
try:
|
|
151
|
-
|
|
172
|
+
with _HISTORY_LOCK:
|
|
173
|
+
_remember_output(self.kind, data)
|
|
174
|
+
sender = _SENDER
|
|
175
|
+
sender.frame(self.kind, 0, data)
|
|
152
176
|
except OSError:
|
|
153
177
|
# While a call runs, a channel that closed must not take the pump with it: the body
|
|
154
178
|
# would die of a broken pipe on its next print. The output is kept for a new owner.
|
|
@@ -3759,8 +3783,9 @@ def _door_open(take):
|
|
|
3759
3783
|
run=take["run"], live=True, ended_input=False, finished=False, outcome=None,
|
|
3760
3784
|
path=take["door"],
|
|
3761
3785
|
)
|
|
3762
|
-
for kept in _TAKE["backlog"].values():
|
|
3786
|
+
for kept in list(_TAKE["backlog"].values()) + list(_TAKE["history"].values()):
|
|
3763
3787
|
del kept[:]
|
|
3788
|
+
_TAKE["total"] = {STDOUT: 0, STDERR: 0}
|
|
3764
3789
|
listener = None
|
|
3765
3790
|
try:
|
|
3766
3791
|
import socket
|
|
@@ -3838,20 +3863,34 @@ def _door_adopt(door, stream, request):
|
|
|
3838
3863
|
"state": "finished" if _TAKE["finished"] else "running",
|
|
3839
3864
|
"orphaned": not was_live,
|
|
3840
3865
|
}
|
|
3866
|
+
have = request.get("have")
|
|
3841
3867
|
try:
|
|
3842
3868
|
door.sender.message(REPLY, stream, {"ok": True, "value": state})
|
|
3843
|
-
for kind in (STDOUT, STDERR):
|
|
3844
|
-
kept = _TAKE["backlog"][kind]
|
|
3845
|
-
if kept:
|
|
3846
|
-
door.sender.frame(kind, 0, bytes(kept))
|
|
3847
|
-
del kept[:]
|
|
3848
3869
|
except OSError:
|
|
3849
3870
|
return
|
|
3850
3871
|
door.connection.settimeout(None)
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3872
|
+
with _HISTORY_LOCK:
|
|
3873
|
+
try:
|
|
3874
|
+
for kind in (STDOUT, STDERR):
|
|
3875
|
+
kept = _TAKE["backlog"][kind]
|
|
3876
|
+
if have is None:
|
|
3877
|
+
data = bytes(kept)
|
|
3878
|
+
else:
|
|
3879
|
+
# What the owner has not received: the history after its count. A
|
|
3880
|
+
# count older than the history replays all of it.
|
|
3881
|
+
key = "stdout" if kind == STDOUT else "stderr"
|
|
3882
|
+
history = _TAKE["history"][kind]
|
|
3883
|
+
first = _TAKE["total"][kind] - len(history)
|
|
3884
|
+
data = bytes(history[max(int(have.get(key, 0)) - first, 0):])
|
|
3885
|
+
if data:
|
|
3886
|
+
door.sender.frame(kind, 0, data)
|
|
3887
|
+
del kept[:]
|
|
3888
|
+
except OSError:
|
|
3889
|
+
return
|
|
3890
|
+
_TAKE.update(
|
|
3891
|
+
owner=door, owner_stream=stream, moved=True, live=True, ended_input=False
|
|
3892
|
+
)
|
|
3893
|
+
_SENDER = door.sender
|
|
3855
3894
|
_TAKE_COND.notify_all()
|
|
3856
3895
|
# Told last, after the output has been switched, so that nothing the body prints from
|
|
3857
3896
|
# the moment the former owner learns of the move is sent to a channel that has stopped
|
|
@@ -313,6 +313,9 @@ class Connection:
|
|
|
313
313
|
self._slots_lock = threading.Lock()
|
|
314
314
|
self._next_stream = 1
|
|
315
315
|
self._tail = _Tail()
|
|
316
|
+
#: Bytes of worker output received on this channel, by stream. Spec "Reattaching after
|
|
317
|
+
#: a lost channel": a reattach tells the worker how much of a call's output arrived.
|
|
318
|
+
self.received: dict[str, int] = {"stdout": 0, "stderr": 0}
|
|
316
319
|
#: Device executor messages that arrived on ``wire.DEVICE_STREAM``, or None when closed.
|
|
317
320
|
self._device: collections.deque | None = None
|
|
318
321
|
#: ``data_want`` payloads that arrived on ``wire.DATA_STREAM``, for the data sender.
|
|
@@ -343,7 +346,9 @@ class Connection:
|
|
|
343
346
|
open_slots = list(self._slots.values())
|
|
344
347
|
for slot in open_slots:
|
|
345
348
|
slot.tail.add(value)
|
|
346
|
-
|
|
349
|
+
name = "stdout" if kind == wire.STDOUT else "stderr"
|
|
350
|
+
self.received[name] += len(value)
|
|
351
|
+
self._emit(name, value)
|
|
347
352
|
elif kind == wire.HELLO:
|
|
348
353
|
with self._turn:
|
|
349
354
|
self.hello = value
|
|
@@ -81,6 +81,7 @@ def request(
|
|
|
81
81
|
"""
|
|
82
82
|
started = time.monotonic()
|
|
83
83
|
assert runtime.channel is not None
|
|
84
|
+
seen = dict(getattr(runtime.channel, "received", {}))
|
|
84
85
|
try:
|
|
85
86
|
return runtime.channel.request(payload, timeout=timeout)
|
|
86
87
|
except ProtocolError as exc:
|
|
@@ -91,7 +92,7 @@ def request(
|
|
|
91
92
|
remaining = timeout - (time.monotonic() - started)
|
|
92
93
|
if remaining <= 0:
|
|
93
94
|
raise RuntimeFailure(f"{runtime.name}: the call exceeded {timeout}s") from failure
|
|
94
|
-
pieces = _reattach(runtime, run, failure, remaining, on_channel)
|
|
95
|
+
pieces = _reattach(runtime, run, failure, remaining, on_channel, seen)
|
|
95
96
|
try:
|
|
96
97
|
return next(pieces), ""
|
|
97
98
|
except ProtocolError as exc:
|
|
@@ -107,10 +108,14 @@ def _reattach(
|
|
|
107
108
|
failure: ProtocolError,
|
|
108
109
|
timeout: float | None,
|
|
109
110
|
on_channel: Callable[[Channel], None] | None,
|
|
111
|
+
seen: dict[str, int],
|
|
110
112
|
) -> Iterator[Any]:
|
|
111
113
|
"""Adopt the run again over a new channel and return the stream that carries its reply.
|
|
112
114
|
|
|
113
|
-
Raises ``failure`` when the conditions do not hold or no attempt succeeds.
|
|
115
|
+
Raises ``failure`` when the conditions do not hold or no attempt succeeds. ``seen`` is what
|
|
116
|
+
the channel had received when the call was sent, so the difference is what the call's own
|
|
117
|
+
output amounted to. It goes to the worker as ``have``, and the new channel goes on counting
|
|
118
|
+
from the old one's totals.
|
|
114
119
|
"""
|
|
115
120
|
if not eligible(runtime, run, failure):
|
|
116
121
|
raise failure
|
|
@@ -137,11 +142,15 @@ def _reattach(
|
|
|
137
142
|
flush=True,
|
|
138
143
|
)
|
|
139
144
|
channel.echo, channel.on_output = old.echo, old.on_output
|
|
145
|
+
total = dict(getattr(old, "received", {}))
|
|
146
|
+
have = {name: count - seen.get(name, 0) for name, count in total.items()}
|
|
147
|
+
if hasattr(channel, "received"):
|
|
148
|
+
channel.received = total
|
|
140
149
|
pieces = None
|
|
141
150
|
try:
|
|
142
151
|
channel.start()
|
|
143
152
|
pieces = channel.stream(
|
|
144
|
-
{"op": "adopt", "run": run.id, "owner": os.getpid()}, timeout=timeout
|
|
153
|
+
{"op": "adopt", "run": run.id, "owner": os.getpid(), "have": have}, timeout=timeout
|
|
145
154
|
)
|
|
146
155
|
next(pieces)
|
|
147
156
|
except RemoteError:
|
|
@@ -396,11 +396,11 @@ dependencies = [
|
|
|
396
396
|
|
|
397
397
|
[[package]]
|
|
398
398
|
name = "letify"
|
|
399
|
-
version = "2.12.
|
|
399
|
+
version = "2.12.3"
|
|
400
400
|
|
|
401
401
|
[[package]]
|
|
402
402
|
name = "letify-link"
|
|
403
|
-
version = "2.12.
|
|
403
|
+
version = "2.12.3"
|
|
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.12.
|
|
419
|
+
version = "2.12.3"
|
|
420
420
|
dependencies = [
|
|
421
421
|
"quinn",
|
|
422
422
|
"rcgen",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "letify-status",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "letify-status",
|
|
9
|
-
"version": "2.12.
|
|
9
|
+
"version": "2.12.3",
|
|
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.12.
|
|
5
|
+
"version": "2.12.3",
|
|
6
6
|
"publisher": "darkpyonix",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
|
8
8
|
"repository": {
|
|
@@ -382,14 +382,25 @@ def test_a_stopped_agent_leaves_its_loop_at_once(start_service) -> None:
|
|
|
382
382
|
assert not agent.thread.is_alive() and time.monotonic() - began < 10
|
|
383
383
|
|
|
384
384
|
|
|
385
|
+
@pytest.mark.parametrize("connected", [False, True], ids=["down_at_connect", "dropped_while_open"])
|
|
385
386
|
def test_a_service_that_fails_is_retried_with_a_backoff_and_logged_once(
|
|
386
|
-
start_service, signal_service, daemons
|
|
387
|
+
start_service, signal_service, daemons, connected: bool
|
|
387
388
|
) -> None:
|
|
389
|
+
# Spec "Agent and pairing" item 5: the first failure prints one line, whether the
|
|
390
|
+
# connect is refused ("the signalling service did not answer") or an open socket ends
|
|
391
|
+
# ("the signalling WebSocket ended"). Which one comes first depends on whether the
|
|
392
|
+
# agent had connected before the service went away, so both orders are pinned.
|
|
388
393
|
agent = start_service(backoff_s=(0.05, 0.1))
|
|
394
|
+
if connected:
|
|
395
|
+
assert wait_for(lambda: signal_service.sockets_open(agent.node_id) == 1)
|
|
389
396
|
signal_service.close()
|
|
390
|
-
|
|
397
|
+
|
|
398
|
+
def failures() -> list[str]:
|
|
399
|
+
return [line for line in agent.lines if "retrying with a backoff" in line]
|
|
400
|
+
|
|
401
|
+
assert wait_for(lambda: len(failures()) >= 1), agent.lines
|
|
391
402
|
time.sleep(0.5)
|
|
392
|
-
assert
|
|
403
|
+
assert len(failures()) == 1 and "signalling" in failures()[0], agent.lines
|
|
393
404
|
assert agent.thread.is_alive()
|
|
394
405
|
|
|
395
406
|
|
|
@@ -35,7 +35,7 @@ LOCAL = '[a]\nkind = "local"\n'
|
|
|
35
35
|
#: worker's own status, as ssh passes on the status of the remote command.
|
|
36
36
|
PROXY = textwrap.dedent(
|
|
37
37
|
"""
|
|
38
|
-
import os, signal, subprocess, sys, threading
|
|
38
|
+
import os, signal, subprocess, sys, threading, time
|
|
39
39
|
|
|
40
40
|
signal.signal(signal.SIGTERM, lambda *_: os._exit(255))
|
|
41
41
|
worker = subprocess.Popen(
|
|
@@ -64,6 +64,9 @@ PROXY = textwrap.dedent(
|
|
|
64
64
|
data = os.read(worker.stdout.fileno(), 65536)
|
|
65
65
|
if not data:
|
|
66
66
|
break
|
|
67
|
+
# A test can hold what is on its way to the owner, as a link that stalls does.
|
|
68
|
+
while os.path.exists(os.environ.get("LETIFY_TEST_HOLD", "/nonexistent-hold")):
|
|
69
|
+
time.sleep(0.01)
|
|
67
70
|
os.write(1, data)
|
|
68
71
|
sys.exit(worker.wait())
|
|
69
72
|
"""
|
|
@@ -193,6 +196,42 @@ def test_a_call_whose_channel_broke_is_adopted_again_and_returns_its_value(
|
|
|
193
196
|
assert f"letify: reattached to {run} on " in captured.err
|
|
194
197
|
|
|
195
198
|
|
|
199
|
+
def test_output_the_broken_link_never_delivered_is_replayed_on_reattach(
|
|
200
|
+
let, tmp_path, capfd, monkeypatch
|
|
201
|
+
) -> None:
|
|
202
|
+
hold = tmp_path / "hold"
|
|
203
|
+
monkeypatch.setenv("LETIFY_TEST_HOLD", str(hold))
|
|
204
|
+
ready, stop = tmp_path / "ready", tmp_path / "stop"
|
|
205
|
+
|
|
206
|
+
@let.function(device=let.providers.a.CPU, host=letify.remote, retries=1)
|
|
207
|
+
def train(hold_file: str, ready_file: str, stop_file: str) -> int:
|
|
208
|
+
import os
|
|
209
|
+
import time
|
|
210
|
+
from pathlib import Path
|
|
211
|
+
|
|
212
|
+
# The link stalls first, so the line is written into it and never read by the owner.
|
|
213
|
+
Path(hold_file).touch()
|
|
214
|
+
print("before the gap", flush=True)
|
|
215
|
+
Path(ready_file).touch()
|
|
216
|
+
while not os.path.exists(stop_file):
|
|
217
|
+
time.sleep(0.02)
|
|
218
|
+
print("during the gap", flush=True)
|
|
219
|
+
return 7
|
|
220
|
+
|
|
221
|
+
call = Running(train, str(hold), str(ready), str(stop))
|
|
222
|
+
until(ready.exists, "the body to start")
|
|
223
|
+
time.sleep(0.3)
|
|
224
|
+
cut_the_link(let)
|
|
225
|
+
hold.unlink()
|
|
226
|
+
stop.touch()
|
|
227
|
+
call.join()
|
|
228
|
+
assert call.error is None
|
|
229
|
+
assert call.value == 7
|
|
230
|
+
out = capfd.readouterr().out
|
|
231
|
+
assert out.count("before the gap") == 1
|
|
232
|
+
assert out.index("before the gap") < out.index("during the gap")
|
|
233
|
+
|
|
234
|
+
|
|
196
235
|
def test_a_reattached_call_goes_on_renewing_the_lease_over_the_new_channel(let, tmp_path) -> None:
|
|
197
236
|
ready, stop, ledger = tmp_path / "ready", tmp_path / "stop", tmp_path / "ledger"
|
|
198
237
|
call = Running(declare(let), str(ready), str(stop), str(ledger))
|
|
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
|
|
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
|