Harden default environment pull behavior
Fix the default one-shot install path so empty bundled profile directories no longer win over OCI-backed environment pulls or leave broken cached symlinks behind. Treat cached installs as valid only when the manifest and boot artifacts are all present, repair invalid installs on the next pull, and add human-mode phase markers for env pull and run without changing JSON output. Align the Python lifecycle example and public docs with the current exec_vm/vm_exec auto-clean semantics, and validate the slice with focused pytest coverage, make check, make dist-check, and a real default-path pull/inspect/run smoke.
This commit is contained in:
parent
694be0730b
commit
6e16e74fd5
16 changed files with 384 additions and 91 deletions
17
README.md
17
README.md
|
|
@ -18,7 +18,7 @@ It exposes the same runtime in three public forms:
|
|||
- First run transcript: [docs/first-run.md](docs/first-run.md)
|
||||
- Terminal walkthrough GIF: [docs/assets/first-run.gif](docs/assets/first-run.gif)
|
||||
- PyPI package: [pypi.org/project/pyro-mcp](https://pypi.org/project/pyro-mcp/)
|
||||
- What's new in 2.0: [CHANGELOG.md#200](CHANGELOG.md#200)
|
||||
- What's new in 2.0.1: [CHANGELOG.md#201](CHANGELOG.md#201)
|
||||
- Host requirements: [docs/host-requirements.md](docs/host-requirements.md)
|
||||
- Integration targets: [docs/integrations.md](docs/integrations.md)
|
||||
- Public contract: [docs/public-contract.md](docs/public-contract.md)
|
||||
|
|
@ -57,8 +57,13 @@ Platform: linux-x86_64
|
|||
Runtime: PASS
|
||||
Catalog version: 2.0.0
|
||||
...
|
||||
[pull] phase=install environment=debian:12
|
||||
[pull] phase=ready environment=debian:12
|
||||
Pulled: debian:12
|
||||
...
|
||||
[run] phase=create environment=debian:12
|
||||
[run] phase=start vm_id=...
|
||||
[run] phase=execute vm_id=...
|
||||
[run] environment=debian:12 execution_mode=guest_vsock exit_code=0 duration_ms=...
|
||||
git version ...
|
||||
```
|
||||
|
|
@ -308,6 +313,8 @@ result = pyro.exec_vm(vm_id, command="git --version", timeout_seconds=30)
|
|||
print(result["stdout"])
|
||||
```
|
||||
|
||||
`exec_vm()` is a one-command auto-cleaning call. After it returns, the VM is already deleted.
|
||||
|
||||
Environment management is also available through the SDK:
|
||||
|
||||
```python
|
||||
|
|
@ -329,7 +336,7 @@ Advanced lifecycle tools:
|
|||
- `vm_list_environments()`
|
||||
- `vm_create(environment, vcpu_count=1, mem_mib=1024, ttl_seconds=600, network=false, allow_host_compat=false)`
|
||||
- `vm_start(vm_id)`
|
||||
- `vm_exec(vm_id, command, timeout_seconds=30)`
|
||||
- `vm_exec(vm_id, command, timeout_seconds=30)` auto-cleans the VM after that command
|
||||
- `vm_stop(vm_id)`
|
||||
- `vm_delete(vm_id)`
|
||||
- `vm_status(vm_id)`
|
||||
|
|
@ -371,7 +378,11 @@ make check
|
|||
make dist-check
|
||||
```
|
||||
|
||||
Contributor runtime source artifacts are still maintained under `src/pyro_mcp/runtime_bundle/` and `runtime_sources/`.
|
||||
Contributor runtime sources live under `runtime_sources/`. The packaged runtime bundle under
|
||||
`src/pyro_mcp/runtime_bundle/` contains the embedded boot/runtime assets plus manifest metadata;
|
||||
end-user environment installs pull OCI-published environments by default. Use
|
||||
`PYRO_RUNTIME_BUNDLE_DIR=build/runtime_bundle` only when you are explicitly validating a locally
|
||||
built contributor runtime bundle.
|
||||
|
||||
Official environment publication is performed locally against Docker Hub:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue