lean-runtime 2.9.2__tar.gz → 3.0.0__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.
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/CHANGELOG.md +115 -0
- {lean_runtime-2.9.2/lean_runtime.egg-info → lean_runtime-3.0.0}/PKG-INFO +24 -15
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/README.md +23 -14
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/architecture.md +10 -4
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/captures.md +3 -1
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/cli.md +54 -41
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/environments.md +21 -10
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/getting-started.md +15 -12
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/index.md +5 -1
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/local-projects.md +23 -13
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/portable-copies.md +48 -28
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/project-publishing.md +3 -3
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/python-api.md +19 -5
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/ready-programs.md +6 -6
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/standalone-files.md +2 -1
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/trust-and-limitations.md +2 -1
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/v1-precision.md +16 -9
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/cli.py +335 -240
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/console.py +7 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/environments.py +25 -1
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/header_cache.py +109 -26
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/locking.py +50 -1
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/models.py +4 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/oci.py +133 -192
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/programs.py +10 -7
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/project_execution.py +99 -30
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/resolver.py +3 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/run_cli.py +80 -38
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/runtime.py +31 -28
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/schema_resources.py +3 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/shared_projects.py +33 -2
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/verification.py +23 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/wire.py +18 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0/lean_runtime.egg-info}/PKG-INFO +24 -15
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime.egg-info/SOURCES.txt +4 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/pyproject.toml +1 -1
- lean_runtime-3.0.0/schemas/attestation-v1.schema.json +38 -0
- lean_runtime-3.0.0/schemas/check-batch-v1.schema.json +36 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/schemas/execution-v1.schema.json +1 -1
- lean_runtime-3.0.0/schemas/plan-v1.schema.json +56 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_bundles.py +62 -207
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_cli.py +298 -11
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_environment_integration.py +22 -4
- lean_runtime-3.0.0/tests/test_header_cache.py +329 -0
- lean_runtime-3.0.0/tests/test_locking.py +59 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_prebuilt_policy.py +39 -1
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_projects.py +3 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_run_cli.py +74 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_runtime.py +75 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_schema_resources.py +3 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_schemas.py +74 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_store.py +23 -0
- lean_runtime-2.9.2/tests/test_header_cache.py +0 -44
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/LICENSE +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/MANIFEST.in +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/environments.toml +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/locks/core-v4.32.2.lock.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/locks/leancert-v4.30.0.5.lock.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/locks/leancert-v4.31.0.lock.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/locks/leancert-v4.32.2.4.lock.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/locks/leancert-v4.33.0.lock.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/locks/mathlib-v4.30.0.lock.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/locks/mathlib-v4.31.0.lock.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/locks/mathlib-v4.32.2.lock.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/catalog/locks/mathlib-v4.33.0.lock.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/compatibility/README.md +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/compatibility/lake-artifact-cache-4.33.0.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/compatibility/mathlib-4.32.2.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/compatibility/mathlib-4.32.2.toml +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/compatibility/mathlib-4.33.0.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/compatibility/mathlib-4.33.0.toml +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/case-study-v1.md +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/development.md +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/docs/lake-artifact-cache-design.md +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/examples/mathlib.toml +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/__init__.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/__main__.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/_git.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/_paths.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/backends.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/bundles.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/capsules.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/comparison.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/decisions.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/diagnostics.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/__init__.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/analyzer.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/api.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/candidate.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/catalog.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/catalog_build.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/catalog_cli.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/catalog_manifest.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/data/catalog.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/defaults.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/engine.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/errors.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/module_inventory.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/planner.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/policy.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/probe.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/py.typed +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/result.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/schema_resources.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/schemas/catalog-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/schemas/plan-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/discovery/schemas/result-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/errors.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/events.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/facade.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/frontmatter.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/health.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/identifier_resolver.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/lake.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/lake_cache.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/lockfiles.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/matrix.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/oci_protocol.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/packs.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/policies.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/profiling.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/project_sharing.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/projects.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/publisher_verification.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/py.typed +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/references.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/serialization.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/specs.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/store.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/timings.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/toolchain_oci.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/toolchain_slim.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime/toolchains.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime.egg-info/dependency_links.txt +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime.egg-info/entry_points.txt +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime.egg-info/requires.txt +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/lean_runtime.egg-info/top_level.txt +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/mkdocs.yml +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/schemas/cleanup-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/schemas/comparison-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/schemas/inspect-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/schemas/matrix-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/schemas/profile-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/schemas/publication-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/schemas/verify-v1.schema.json +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/scripts/announcement_gate.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/scripts/lake_cache_gate.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/scripts/registry_preflight.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/scripts/run_compatibility.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/scripts/run_v1_case_study.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/scripts/smoke_wheel.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/setup.cfg +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/conftest.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/discovery/e2e/test_real_discovery.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/discovery/test_analyzer.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/discovery/test_catalog.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/discovery/test_catalog_build.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/discovery/test_discovery_schema_resources.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/discovery/test_engine.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/discovery/test_planner.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/discovery/test_policy.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_backend.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_capsules.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_console.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_diagnostics.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_events_health.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_facade.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_frontmatter.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_git.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_identifier_resolver.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_interactive.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_lake_cache.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_lockfiles.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_models.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_multifile.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_oci_protocol.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_packs.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_paths.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_programs.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_project_publish.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_references.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_signatures.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_specs.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_toolchain_oci.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_toolchain_slim.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_toolchains.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_v1_precision.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_verification_inventory.py +0 -0
- {lean_runtime-2.9.2 → lean_runtime-3.0.0}/tests/test_verification_probe.py +0 -0
|
@@ -2,6 +2,121 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 3.0.0 - 2026-08-16
|
|
6
|
+
|
|
7
|
+
The first release with one canonical command vocabulary, capsule-only
|
|
8
|
+
environment libraries, and documentation that states guarantees the
|
|
9
|
+
implementation actually keeps.
|
|
10
|
+
|
|
11
|
+
### Removed (breaking)
|
|
12
|
+
|
|
13
|
+
- Removed the hidden hyphenated compatibility spellings. Every accepted command
|
|
14
|
+
is now public and appears in help and shell completion:
|
|
15
|
+
|
|
16
|
+
| Removed | Canonical replacement |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `save-copy` / `open-copy` | `copy save` / `copy open` |
|
|
19
|
+
| `build-and-publish` / `finalize-publication` | `publish environment` / `finalize environment` |
|
|
20
|
+
| `toolchain-publish` / `toolchain-finalize-publication` | `publish toolchain` / `finalize toolchain` |
|
|
21
|
+
| `toolchain-slim` / `install` | `toolchain slim` / `toolchain install` |
|
|
22
|
+
| `program-create` / `program-save-copy` / `program-open-copy` / `program-download` | `program create` / `program save` / `program open` / `program download` |
|
|
23
|
+
| `program-publish` / `program-finalize-publication` | `publish program` / `finalize program` |
|
|
24
|
+
| `check-file FILE` | `check FILE` (or `run FILE` for standalone discovery) |
|
|
25
|
+
| `profile ENV FILE` | `check --environment ENV FILE --repeat N` |
|
|
26
|
+
| `matrix MATRIX FILE` | `check FILE --across MATRIX` |
|
|
27
|
+
| top-level `scan` / `attach` / `detach` | `project scan` / `project attach` / `project detach` |
|
|
28
|
+
|
|
29
|
+
- Removed the legacy positional `check ENVIRONMENT FILE` form; use
|
|
30
|
+
`check --environment NAME FILE`.
|
|
31
|
+
- Removed the deprecated `run` aliases `--discovery-timeout` and `--timeout`;
|
|
32
|
+
use `--search-timeout` and `--check-timeout`. Removed the undeclared
|
|
33
|
+
`init --mathlib` alias in favor of `--mathlib-version`.
|
|
34
|
+
- Environment libraries are capsule-only. Removed the legacy full-bundle
|
|
35
|
+
registry paths: `OCIEnvironmentCache.pull`, `OCIEnvironmentCache.plan`, the
|
|
36
|
+
full publication profile, and the `DownloadUnavailable` fallbacks in
|
|
37
|
+
`Runtime.open_exact` and `Runtime.plan_exact`. Publication always writes the
|
|
38
|
+
`capsule-lock_<sha>` canonical reference, and an environment library object
|
|
39
|
+
must implement `pull_capsule`/`plan_capsule`. Complete source-bearing
|
|
40
|
+
environments are unaffected: source builds, `copy save`, and `copy open` all
|
|
41
|
+
keep working, and `copy open` still reads both archive formats.
|
|
42
|
+
|
|
43
|
+
### Changed (breaking)
|
|
44
|
+
|
|
45
|
+
- Program provenance renames `exact_environment_id` to `source_lock_id`
|
|
46
|
+
(`ProgramDescription`, `Runtime.create_program`, and
|
|
47
|
+
`program create --source-lock-id`), because the field always held a lock
|
|
48
|
+
identity. Program copies written with the old key still load.
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- `lean-runtime run FILE` is the canonical front-door spelling. `lean-run`
|
|
53
|
+
remains a permanently supported alias sharing one parser and implementation,
|
|
54
|
+
with identical results, envelopes, and exit codes. Global `--home`,
|
|
55
|
+
`--quiet`, `--verbose`, and `--timings` are accepted both before and after
|
|
56
|
+
`run`, and global `--library`/`--availability` reach the front door with
|
|
57
|
+
explicit conflict errors against `--offline` and `--no-source-build`.
|
|
58
|
+
- A misplaced `lean-runtime FILE.lean` invocation suggests `lean-runtime run`.
|
|
59
|
+
- `lean-runtime.plan/v1` ships as an installed schema, and the `check-batch`
|
|
60
|
+
and `attestation` schemas are registered with the schema resources API.
|
|
61
|
+
|
|
62
|
+
### Fixed (guarantees)
|
|
63
|
+
|
|
64
|
+
- `availability="local"` now forbids extending a sparse projection. Missing
|
|
65
|
+
import closures fail with an actionable error naming the roots instead of
|
|
66
|
+
silently contacting a configured library.
|
|
67
|
+
- Every path that shells out to Lake installs the full toolchain first
|
|
68
|
+
(package-graph resolution and materialization, local project probing, and
|
|
69
|
+
managed build/lake execution), so the documented source fallback no longer
|
|
70
|
+
breaks after a slim check toolchain has been acquired. Package-free core
|
|
71
|
+
environments keep their check-only fast path.
|
|
72
|
+
- Capability handling is representation-aware: `native`/`development` requests
|
|
73
|
+
are a no-op on a full environment and rejected only on a check capsule, and
|
|
74
|
+
`build()`/`execute()` fail fast on a capsule instead of failing mid-run
|
|
75
|
+
against incomplete inputs. `Environment.sparse` exposes the representation.
|
|
76
|
+
- Sparse acquisition holds a CAS collection lease across unpacking and
|
|
77
|
+
projection, so a concurrent `clean --include-downloads` cannot reclaim an
|
|
78
|
+
artifact that is being projected.
|
|
79
|
+
- `--attest` publishes a versioned `lean-runtime.attestation/v1` predicate
|
|
80
|
+
carrying the verification report plus a stable `build_inventory` of the Lake
|
|
81
|
+
build outputs, described by `schemas/attestation-v1.schema.json`.
|
|
82
|
+
- Sparse downloads record the informational platform record in
|
|
83
|
+
`metadata["platform"]` like every other representation.
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
|
|
87
|
+
- `check --repeat` accepts `--environment NAME`, covering everything the
|
|
88
|
+
removed `profile` command did.
|
|
89
|
+
- Internal dispatch uses canonical command identities (`publish-environment`,
|
|
90
|
+
`copy-save`, `program-create`, `toolchain-slim`, …) instead of rewriting
|
|
91
|
+
canonical invocations back onto legacy spellings.
|
|
92
|
+
- Shell completion and top-level help derive from one public command list; the
|
|
93
|
+
private argparse help-hiding hack is gone. Command help disambiguates the
|
|
94
|
+
vocabulary across `run`, `check`, `open`, `prepare`, `download`, and `build`.
|
|
95
|
+
- Bundled GitHub workflows and the `publish-environment` composite action use
|
|
96
|
+
the canonical publication commands.
|
|
97
|
+
- Documentation matches the implementation: corrected
|
|
98
|
+
`--publisher-verification` spelling, documented `capsule-lock_<sha>`
|
|
99
|
+
publication references, named the actual verification check codes, scoped the
|
|
100
|
+
credential-retention claim, noted `lakefile.lean` package-reference support,
|
|
101
|
+
scoped the closed JSON-envelope claim to the versioned precision surfaces, and
|
|
102
|
+
replaced "side-effect-free" planning claims with the precise guarantee.
|
|
103
|
+
|
|
104
|
+
## 2.10.0 - 2026-08-16
|
|
105
|
+
|
|
106
|
+
- Make header snapshots opt-in (`LEAN_RUNTIME_HEADER_SNAPSHOTS=1`; `--watch` and
|
|
107
|
+
`--repeat` enable them automatically), key them by module identity, load
|
|
108
|
+
existing snapshots without holding the creation lock, cancel lock waits
|
|
109
|
+
promptly, and retry once without a snapshot—quarantining it—when a snapshot
|
|
110
|
+
check times out or reports snapshot errors.
|
|
111
|
+
- Support `check FILE...` and `check DIRECTORY...` with independent per-file
|
|
112
|
+
results, `--concurrency`, a `lean-runtime.check-batch/v1` JSON envelope, and
|
|
113
|
+
an explicit `--environment NAME`; the legacy positional `ENVIRONMENT FILE`
|
|
114
|
+
form now applies only when the first argument is not an existing path.
|
|
115
|
+
- Attribute shared workspace lock waits to their holder (PID and operation),
|
|
116
|
+
announce header snapshot waits, and record `workspace_lock` and
|
|
117
|
+
`header_snapshot` phase timings so coordination cost is visible next to the
|
|
118
|
+
actual Lean check time.
|
|
119
|
+
|
|
5
120
|
## 2.9.2 - 2026-08-16
|
|
6
121
|
|
|
7
122
|
- Keep one fail-closed publication authentication session from push preflight through
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lean-runtime
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: Run Lean 4 proofs from Python or standalone files
|
|
5
5
|
Author: Alejandro Radisic
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -57,10 +57,12 @@ currently requires `LEAN_RUNTIME_ELAN`.
|
|
|
57
57
|
|
|
58
58
|
## Run one Lean file
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
Lean Runtime's main command is `lean-runtime`; its `run` subcommand discovers a
|
|
61
|
+
context and checks one file. Inside an existing pinned Lake project, just pass
|
|
62
|
+
the file:
|
|
61
63
|
|
|
62
64
|
```bash
|
|
63
|
-
lean-run MyProject/Main.lean
|
|
65
|
+
lean-runtime run MyProject/Main.lean
|
|
64
66
|
```
|
|
65
67
|
|
|
66
68
|
Standalone files do not need a throwaway Lake project or dependency declaration:
|
|
@@ -72,17 +74,21 @@ example : 2 + 2 = 4 := by norm_num
|
|
|
72
74
|
```
|
|
73
75
|
|
|
74
76
|
```bash
|
|
75
|
-
lean-run Main.lean
|
|
77
|
+
lean-runtime run Main.lean
|
|
76
78
|
```
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
The shorter `lean-run Main.lean` spelling is an equivalent, permanently
|
|
81
|
+
supported convenience alias; both call the same implementation and produce the
|
|
82
|
+
same results, JSON envelopes, and exit codes.
|
|
83
|
+
|
|
84
|
+
When no explicit context or pinned Lake project exists, `run` analyzes imports,
|
|
79
85
|
ranks a bounded set of exact environments from its bundled catalog, and asks Lean to
|
|
80
86
|
check each candidate. The successful exact lock is retained by Runtime. Pin it for
|
|
81
87
|
portable reuse whenever desired:
|
|
82
88
|
|
|
83
89
|
```bash
|
|
84
|
-
lean-run Main.lean --lock-out environment.lock.json
|
|
85
|
-
lean-run Main.lean --lock environment.lock.json
|
|
90
|
+
lean-runtime run Main.lean --lock-out environment.lock.json
|
|
91
|
+
lean-runtime run Main.lean --lock environment.lock.json
|
|
86
92
|
```
|
|
87
93
|
|
|
88
94
|
The bundled catalog covers Mathlib v4.30.0 through v4.33.0 and matching LeanCert
|
|
@@ -102,9 +108,10 @@ New-format libraries publish two independently verified pieces: a slim Lean
|
|
|
102
108
|
check runtime and seekable module packs. Lean Runtime computes the source's
|
|
103
109
|
transitive import closure, downloads only the corresponding compressed frames,
|
|
104
110
|
and shares verified module artifacts across Mathlib, LeanCert, and future
|
|
105
|
-
environments. A warm check is silent apart from its result.
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
environments. A warm check is silent apart from its result. Environment
|
|
112
|
+
libraries publish and serve capsules only; a complete source-bearing
|
|
113
|
+
environment is still available locally through a source build or a portable
|
|
114
|
+
copy.
|
|
108
115
|
|
|
109
116
|
Explicit frontmatter remains available when the desired context is already known:
|
|
110
117
|
|
|
@@ -205,13 +212,15 @@ current exact graph without running `lake update`. If you already have many
|
|
|
205
212
|
Lake checkouts, register them once as local dependency seeds:
|
|
206
213
|
|
|
207
214
|
```bash
|
|
208
|
-
lean-runtime scan ~/research
|
|
215
|
+
lean-runtime project scan ~/research
|
|
209
216
|
lean-runtime init .
|
|
210
217
|
```
|
|
211
218
|
|
|
212
|
-
`init --plan`
|
|
219
|
+
`init --plan` performs no downloads, installs, or builds; `--max-download
|
|
220
|
+
500MiB` and `--offline`
|
|
213
221
|
enforce cold-start policy. Advanced bulk migration remains available through
|
|
214
|
-
`attach`, and `detach --execute` materializes an independent
|
|
222
|
+
`project attach`, and `project detach --execute` materializes an independent
|
|
223
|
+
project again.
|
|
215
224
|
For a new project, the target may be absent, empty, or an otherwise empty Git
|
|
216
225
|
repository root; existing Git identity and index state are preserved. A custom
|
|
217
226
|
`AGENTS.md` is also allowed and retained. Other existing contents are rejected
|
|
@@ -234,8 +243,8 @@ compare, and measure the same exact contexts:
|
|
|
234
243
|
```bash
|
|
235
244
|
lean-runtime verify research-stack --offline
|
|
236
245
|
lean-runtime compare previous.lock.json environment.lock.json
|
|
237
|
-
lean-runtime
|
|
238
|
-
lean-runtime
|
|
246
|
+
lean-runtime check --environment research-stack Main.lean --repeat 5
|
|
247
|
+
lean-runtime check Main.lean --across compatibility.toml
|
|
239
248
|
```
|
|
240
249
|
|
|
241
250
|
Use `lean-run Main.lean --explain` to inspect context routing without executing Lean, and
|
|
@@ -21,10 +21,12 @@ currently requires `LEAN_RUNTIME_ELAN`.
|
|
|
21
21
|
|
|
22
22
|
## Run one Lean file
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Lean Runtime's main command is `lean-runtime`; its `run` subcommand discovers a
|
|
25
|
+
context and checks one file. Inside an existing pinned Lake project, just pass
|
|
26
|
+
the file:
|
|
25
27
|
|
|
26
28
|
```bash
|
|
27
|
-
lean-run MyProject/Main.lean
|
|
29
|
+
lean-runtime run MyProject/Main.lean
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
Standalone files do not need a throwaway Lake project or dependency declaration:
|
|
@@ -36,17 +38,21 @@ example : 2 + 2 = 4 := by norm_num
|
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
```bash
|
|
39
|
-
lean-run Main.lean
|
|
41
|
+
lean-runtime run Main.lean
|
|
40
42
|
```
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
The shorter `lean-run Main.lean` spelling is an equivalent, permanently
|
|
45
|
+
supported convenience alias; both call the same implementation and produce the
|
|
46
|
+
same results, JSON envelopes, and exit codes.
|
|
47
|
+
|
|
48
|
+
When no explicit context or pinned Lake project exists, `run` analyzes imports,
|
|
43
49
|
ranks a bounded set of exact environments from its bundled catalog, and asks Lean to
|
|
44
50
|
check each candidate. The successful exact lock is retained by Runtime. Pin it for
|
|
45
51
|
portable reuse whenever desired:
|
|
46
52
|
|
|
47
53
|
```bash
|
|
48
|
-
lean-run Main.lean --lock-out environment.lock.json
|
|
49
|
-
lean-run Main.lean --lock environment.lock.json
|
|
54
|
+
lean-runtime run Main.lean --lock-out environment.lock.json
|
|
55
|
+
lean-runtime run Main.lean --lock environment.lock.json
|
|
50
56
|
```
|
|
51
57
|
|
|
52
58
|
The bundled catalog covers Mathlib v4.30.0 through v4.33.0 and matching LeanCert
|
|
@@ -66,9 +72,10 @@ New-format libraries publish two independently verified pieces: a slim Lean
|
|
|
66
72
|
check runtime and seekable module packs. Lean Runtime computes the source's
|
|
67
73
|
transitive import closure, downloads only the corresponding compressed frames,
|
|
68
74
|
and shares verified module artifacts across Mathlib, LeanCert, and future
|
|
69
|
-
environments. A warm check is silent apart from its result.
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
environments. A warm check is silent apart from its result. Environment
|
|
76
|
+
libraries publish and serve capsules only; a complete source-bearing
|
|
77
|
+
environment is still available locally through a source build or a portable
|
|
78
|
+
copy.
|
|
72
79
|
|
|
73
80
|
Explicit frontmatter remains available when the desired context is already known:
|
|
74
81
|
|
|
@@ -169,13 +176,15 @@ current exact graph without running `lake update`. If you already have many
|
|
|
169
176
|
Lake checkouts, register them once as local dependency seeds:
|
|
170
177
|
|
|
171
178
|
```bash
|
|
172
|
-
lean-runtime scan ~/research
|
|
179
|
+
lean-runtime project scan ~/research
|
|
173
180
|
lean-runtime init .
|
|
174
181
|
```
|
|
175
182
|
|
|
176
|
-
`init --plan`
|
|
183
|
+
`init --plan` performs no downloads, installs, or builds; `--max-download
|
|
184
|
+
500MiB` and `--offline`
|
|
177
185
|
enforce cold-start policy. Advanced bulk migration remains available through
|
|
178
|
-
`attach`, and `detach --execute` materializes an independent
|
|
186
|
+
`project attach`, and `project detach --execute` materializes an independent
|
|
187
|
+
project again.
|
|
179
188
|
For a new project, the target may be absent, empty, or an otherwise empty Git
|
|
180
189
|
repository root; existing Git identity and index state are preserved. A custom
|
|
181
190
|
`AGENTS.md` is also allowed and retained. Other existing contents are rejected
|
|
@@ -198,8 +207,8 @@ compare, and measure the same exact contexts:
|
|
|
198
207
|
```bash
|
|
199
208
|
lean-runtime verify research-stack --offline
|
|
200
209
|
lean-runtime compare previous.lock.json environment.lock.json
|
|
201
|
-
lean-runtime
|
|
202
|
-
lean-runtime
|
|
210
|
+
lean-runtime check --environment research-stack Main.lean --repeat 5
|
|
211
|
+
lean-runtime check Main.lean --across compatibility.toml
|
|
203
212
|
```
|
|
204
213
|
|
|
205
214
|
Use `lean-run Main.lean --explain` to inspect context routing without executing Lean, and
|
|
@@ -51,9 +51,9 @@ artifact cache; `Runtime` should not grow a second project build planner.
|
|
|
51
51
|
Environment capsules, slim toolchains, and ready-to-run programs have distinct
|
|
52
52
|
payload schemas. Their common OCI descriptor, digest, JSON, and platform
|
|
53
53
|
selection contract lives in `oci_protocol`. Payload implementations must not
|
|
54
|
-
import another payload implementation's private protocol helpers.
|
|
55
|
-
|
|
56
|
-
the shared protocol or the
|
|
54
|
+
import another payload implementation's private protocol helpers. The complete
|
|
55
|
+
portable-copy reader remains supported, but registry transport is capsule-only
|
|
56
|
+
and new behavior belongs to the shared protocol or the sparse capsule path.
|
|
57
57
|
|
|
58
58
|
## Public identities
|
|
59
59
|
|
|
@@ -179,12 +179,18 @@ Opening a completed environment by name or digest reads only:
|
|
|
179
179
|
No resolver or network operation runs. This is tested by deleting the original
|
|
180
180
|
Git repository and reopening/checking the environment from a second process.
|
|
181
181
|
|
|
182
|
+
For a sparse check capsule, this invariant covers metadata and every already
|
|
183
|
+
projected import closure. Checking a new import extends the projection from a
|
|
184
|
+
configured library, so strictly offline use should pre-acquire the needed
|
|
185
|
+
closure; under `availability="local"` that extension is refused rather than
|
|
186
|
+
downloaded.
|
|
187
|
+
|
|
182
188
|
## Aliases and garbage collection
|
|
183
189
|
|
|
184
190
|
Names are atomic JSON pointers to environment identities. Updating a name does
|
|
185
191
|
not mutate either old or new environments. Garbage collection removes only
|
|
186
192
|
old environments that are not reachable through an alias; locks and source
|
|
187
|
-
snapshots are conservatively retained by store schema
|
|
193
|
+
snapshots are conservatively retained by the current store schema.
|
|
188
194
|
Last-use records prevent recently opened or executed unnamed environments from
|
|
189
195
|
being collected, and execution cloning shares the environment's deletion lock.
|
|
190
196
|
|
|
@@ -15,7 +15,9 @@ result = Runtime().replay_capture("result.execution.json")
|
|
|
15
15
|
Captures are manifests, not portable binary archives. They do not currently
|
|
16
16
|
embed Git repositories or compiled artifacts. A clean machine may need network
|
|
17
17
|
access to acquire exact locked commits before its first replay; a machine with
|
|
18
|
-
the environment already published can replay offline.
|
|
18
|
+
the environment already published can replay offline. For a sparse capsule
|
|
19
|
+
environment, offline replay additionally requires the capture's imported
|
|
20
|
+
modules to be projected locally already.
|
|
19
21
|
|
|
20
22
|
## Identity semantics
|
|
21
23
|
|
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
# Command-line interface
|
|
2
2
|
|
|
3
|
-
## `lean-run`
|
|
3
|
+
## `lean-runtime run` and `lean-run`
|
|
4
4
|
|
|
5
|
-
The front
|
|
5
|
+
The front door discovers a context and checks one file. `lean-runtime run FILE`
|
|
6
|
+
is the canonical main-CLI spelling; `lean-run FILE` is an equivalent
|
|
7
|
+
convenience alias with the same behavior, JSON contracts, and exit codes:
|
|
6
8
|
|
|
7
9
|
```bash
|
|
10
|
+
lean-runtime run Main.lean
|
|
11
|
+
lean-runtime run Main.lean --with mathlib@v4.32.2
|
|
12
|
+
lean-runtime run Main.lean --lock environment.lock.json
|
|
13
|
+
lean-runtime run Main.lean --json
|
|
14
|
+
lean-runtime run Main.lean --explain
|
|
15
|
+
lean-runtime run Main.lean --timings
|
|
16
|
+
lean-runtime run Main.lean --lock-out environment.lock.json
|
|
17
|
+
lean-runtime run Main.lean --no-source-build
|
|
18
|
+
lean-runtime run Main.lean --offline
|
|
8
19
|
lean-run Main.lean
|
|
9
|
-
lean-run Main.lean --with mathlib@v4.32.2
|
|
10
|
-
lean-run Main.lean --lock environment.lock.json
|
|
11
|
-
lean-run Main.lean --json
|
|
12
|
-
lean-run Main.lean --explain
|
|
13
|
-
lean-run Main.lean --timings
|
|
14
|
-
lean-run Main.lean --lock-out environment.lock.json
|
|
15
|
-
lean-run Main.lean --no-source-build
|
|
16
|
-
lean-run Main.lean --offline
|
|
17
20
|
```
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
| Command | Context behavior | Typical use |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `lean-runtime run FILE` | Discovers or selects context | Standalone/front door |
|
|
25
|
+
| `lean-run FILE` | Same as `run` | Short convenience spelling |
|
|
26
|
+
| `lean-runtime check FILE` | Requires project or explicit context | Project iteration |
|
|
27
|
+
| `lean-runtime check` | Checks all local libraries | Project-wide check |
|
|
28
|
+
| `lean-runtime build` | Full Lake target build | Executables/native outputs |
|
|
29
|
+
|
|
30
|
+
Without explicit context or a pinned Lake project, `run` automatically
|
|
20
31
|
searches its bundled exact-environment catalog. Use `--lock-out` to retain the
|
|
21
32
|
successful lock, `--no-discover` to require explicit context, and
|
|
22
33
|
`--catalog PATH` to override the catalog. Three budgets bound the work:
|
|
23
34
|
`--search-timeout` covers ranking and compiler probes, `--check-timeout`
|
|
24
35
|
covers each Lean invocation, and `--acquire-timeout` independently bounds
|
|
25
36
|
downloading, installing, or building one candidate environment, so a slow
|
|
26
|
-
first-time download cannot expire the search.
|
|
27
|
-
`--timeout` remain as deprecated aliases of `--search-timeout` and
|
|
28
|
-
`--check-timeout`. See
|
|
37
|
+
first-time download cannot expire the search. See
|
|
29
38
|
[Standalone Lean files](standalone-files.md) for routing and policy details.
|
|
30
39
|
|
|
31
40
|
## `lean-runtime`
|
|
@@ -33,9 +42,9 @@ first-time download cannot expire the search. `--discovery-timeout` and
|
|
|
33
42
|
All commands accept `--home PATH` before the subcommand to select a store.
|
|
34
43
|
|
|
35
44
|
For project iteration, `check FILE --watch` rechecks on save with warm native
|
|
36
|
-
import snapshots. `check FILE --repeat N` measures the same path
|
|
37
|
-
`
|
|
38
|
-
|
|
45
|
+
import snapshots. `check FILE --repeat N` measures the same path (add
|
|
46
|
+
`--environment NAME` to profile inside a managed environment), and
|
|
47
|
+
`check FILE --across matrix.toml` checks exact contexts.
|
|
39
48
|
|
|
40
49
|
`storage` reads a fingerprinted ledger after its first inventory, so large
|
|
41
50
|
stores remain an instant-information command. `storage --verify` explicitly
|
|
@@ -55,7 +64,9 @@ lean-runtime check Main.lean \
|
|
|
55
64
|
`--with` is repeatable. References use
|
|
56
65
|
`mathlib@REVISION`, `OWNER/REPOSITORY@REVISION`, or the explicit
|
|
57
66
|
`github:OWNER/REPOSITORY@REVISION` form. Package discovery reads the root
|
|
58
|
-
`lean-toolchain` and `lakefile.toml
|
|
67
|
+
`lean-toolchain` and a root Lake configuration (`lakefile.toml` or
|
|
68
|
+
`lakefile.lean`, translated with the package's pinned Lake), pins the
|
|
69
|
+
reference to a full commit, and
|
|
59
70
|
then uses the normal lock and environment pipeline. Multiple discovered
|
|
60
71
|
packages must declare the same toolchain unless `--toolchain` explicitly
|
|
61
72
|
selects the compatibility build.
|
|
@@ -79,15 +90,15 @@ lean-runtime --home /tmp/fresh copy open research-stack.lean-environment --name
|
|
|
79
90
|
lean-runtime publish environment environment.lock.json --publish-to ghcr.io/owner/lean-environments
|
|
80
91
|
lean-runtime publish environment --publish-to ghcr.io/owner/lean-environments --check-access
|
|
81
92
|
lean-runtime publish environment --publish-to ghcr.io/owner/lean-environments --check-access --json
|
|
82
|
-
lean-runtime check research-stack Main.lean --json
|
|
93
|
+
lean-runtime check --environment research-stack Main.lean --json
|
|
83
94
|
lean-runtime inspect research-stack --packages
|
|
84
95
|
lean-runtime environments
|
|
85
96
|
lean-runtime storage
|
|
86
97
|
lean-runtime doctor
|
|
87
98
|
lean-runtime verify research-stack --offline
|
|
88
99
|
lean-runtime compare old.lock.json new.lock.json
|
|
89
|
-
lean-runtime
|
|
90
|
-
lean-runtime
|
|
100
|
+
lean-runtime check --environment research-stack Main.lean --repeat 5
|
|
101
|
+
lean-runtime check Main.lean --across matrix.toml
|
|
91
102
|
lean-runtime clean
|
|
92
103
|
lean-runtime clean --execute
|
|
93
104
|
```
|
|
@@ -96,8 +107,7 @@ lean-runtime clean --execute
|
|
|
96
107
|
|
|
97
108
|
`copy save` creates a portable environment file. `copy open` verifies its exact
|
|
98
109
|
identity, package Git trees, computer compatibility, and Lean probe before
|
|
99
|
-
making the environment available.
|
|
100
|
-
spellings remain compatibility aliases. See [Portable copies and environment
|
|
110
|
+
making the environment available. See [Portable copies and environment
|
|
101
111
|
libraries](portable-copies.md) for its trust boundary.
|
|
102
112
|
|
|
103
113
|
## Slim toolchains
|
|
@@ -107,11 +117,11 @@ not need all of it: editor indexes, static libraries, the bundled LLVM/clang,
|
|
|
107
117
|
and toolchain sources are only used by editors and native compilation.
|
|
108
118
|
|
|
109
119
|
```bash
|
|
110
|
-
lean-runtime toolchain
|
|
111
|
-
lean-runtime toolchain
|
|
120
|
+
lean-runtime toolchain slim v4.32.2
|
|
121
|
+
lean-runtime toolchain slim v4.32.2 --prune-original
|
|
112
122
|
```
|
|
113
123
|
|
|
114
|
-
`toolchain
|
|
124
|
+
`toolchain slim` materializes a separate check-profile copy by hardlinking the
|
|
115
125
|
kept files (near-zero extra disk), then verifies it against a capability
|
|
116
126
|
corpus — elaboration, core tactics, `decide`, `#eval`, metaprogramming, and
|
|
117
127
|
`Std` imports — using the slim copy's own `lean`. A copy that fails any probe
|
|
@@ -124,20 +134,21 @@ per-module IR during ordinary elaboration, so those artifact classes must
|
|
|
124
134
|
stay; larger reductions require upstream facet-loading changes.
|
|
125
135
|
|
|
126
136
|
After pruning, source builds of *new* environments and native compilation
|
|
127
|
-
need the full toolchain again; reinstall it with `lean-runtime install`.
|
|
137
|
+
need the full toolchain again; reinstall it with `lean-runtime toolchain install`.
|
|
128
138
|
|
|
129
139
|
Libraries produced by the current publication workflow also carry this
|
|
130
140
|
verified check profile directly. A cold consumer downloads that compressed
|
|
131
141
|
profile instead of first transferring the full official release. If the
|
|
132
142
|
library has no compatible published check runtime, Lean Runtime falls back to
|
|
133
|
-
the official Elan installation path. Local `toolchain
|
|
143
|
+
the official Elan installation path. Local `toolchain slim` remains useful for
|
|
134
144
|
older stores and for testing a profile before publication.
|
|
135
145
|
|
|
136
146
|
## Sparse acquisition and capabilities
|
|
137
147
|
|
|
138
|
-
`lean-run FILE --plan` reads capsule metadata and reports the exact compressed
|
|
148
|
+
`lean-runtime run FILE --plan` reads capsule metadata and reports the exact compressed
|
|
139
149
|
frames required by `FILE`'s transitive import closure, plus the selected Lean
|
|
140
|
-
check-runtime cost. The operation
|
|
150
|
+
check-runtime cost. The operation performs no downloads, builds, or publications; constructing
|
|
151
|
+
the runtime may still initialize store metadata directories. `--max-download`
|
|
141
152
|
applies before acquisition to the combined known cost; an unknown component is
|
|
142
153
|
reported explicitly instead of treated as zero.
|
|
143
154
|
|
|
@@ -147,7 +158,9 @@ guesswork: Lean 4.32 and 4.33 reject ordinary imports when the corresponding
|
|
|
147
158
|
server/private or IR facets are omitted. `.ilean` editor indexes are a separate
|
|
148
159
|
on-demand capability through `Environment.require_capabilities(["editor"],
|
|
149
160
|
imports=[...])`. Native compilation and development builds require a full
|
|
150
|
-
environment and full toolchain; check
|
|
161
|
+
environment and full toolchain; a check capsule rejects those capability
|
|
162
|
+
requests, and also rejects `build()` and arbitrary `execute()` before any
|
|
163
|
+
Lean process starts. Open or build the full environment for them.
|
|
151
164
|
|
|
152
165
|
## Replay
|
|
153
166
|
|
|
@@ -169,15 +182,15 @@ lean-runtime init MyProof
|
|
|
169
182
|
lean-runtime init MyProof --core
|
|
170
183
|
lean-runtime init --plan --max-download 500MiB
|
|
171
184
|
lean-runtime update --plan
|
|
172
|
-
lean-runtime scan ~/research
|
|
173
|
-
lean-runtime attach ~/research --recursive
|
|
174
|
-
lean-runtime attach ~/research --recursive --execute
|
|
175
|
-
lean-runtime detach ./existing-project --execute
|
|
176
|
-
lean-runtime install 4.32.2
|
|
185
|
+
lean-runtime project scan ~/research
|
|
186
|
+
lean-runtime project attach ~/research --recursive
|
|
187
|
+
lean-runtime project attach ~/research --recursive --execute
|
|
188
|
+
lean-runtime project detach ./existing-project --execute
|
|
189
|
+
lean-runtime toolchain install 4.32.2
|
|
177
190
|
```
|
|
178
191
|
|
|
179
|
-
`check FILE` is the direct standalone/local-project route
|
|
180
|
-
`check
|
|
192
|
+
`check FILE` is the direct standalone/local-project route, and
|
|
193
|
+
`check --environment NAME FILE` checks inside a managed environment. When no
|
|
181
194
|
`--project` or `--toolchain` is supplied, it discovers the nearest directory
|
|
182
195
|
containing a Lake configuration and `lean-toolchain`, then passes the actual
|
|
183
196
|
project-relative file to `lake env lean`.
|
|
@@ -211,7 +224,7 @@ capitalization such as `IntegralFramework`.
|
|
|
211
224
|
Add supporting source files with repeatable `--include` options:
|
|
212
225
|
|
|
213
226
|
```bash
|
|
214
|
-
lean-runtime check research-stack Main.lean --include Support/Defs.lean
|
|
227
|
+
lean-runtime check --environment research-stack Main.lean --include Support/Defs.lean
|
|
215
228
|
```
|
|
216
229
|
|
|
217
230
|
Resolution and materialization print structured lifecycle progress to stderr.
|
|
@@ -256,6 +269,6 @@ self-hosted HTTPS/SSH, and local bare repositories are supported.
|
|
|
256
269
|
publication and clean-consumer workflow. See
|
|
257
270
|
[Publishing a Lean project](project-publishing.md).
|
|
258
271
|
|
|
259
|
-
Use global `--
|
|
260
|
-
to require a verified publisher. `
|
|
272
|
+
Use global `--publisher-verification required --trusted-publisher ID --trusted-issuer ISSUER`
|
|
273
|
+
to require a verified publisher. `publish environment --sign` records the trusted
|
|
261
274
|
publisher using the configured Cosign identity.
|
|
@@ -9,13 +9,17 @@ Lean Runtime separates three states:
|
|
|
9
9
|
3. `Environment` is a platform-specific, built, published environment.
|
|
10
10
|
|
|
11
11
|
The separation lets one process resolve a lock and another materialize it. A
|
|
12
|
-
completed environment can subsequently be opened offline
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
completed environment can subsequently be opened offline; for a sparse
|
|
13
|
+
capsule, checking is offline for already projected import closures, while a
|
|
14
|
+
new import extends the projection from a configured library unless
|
|
15
|
+
`availability="local"` refuses it.
|
|
16
|
+
|
|
17
|
+
Downloadable environments are sparse check capsules. A capsule stores a
|
|
18
|
+
normalized module graph and content digest for each Lean artifact, resolves to
|
|
19
|
+
the same exact lock and platform environment identity as a locally built
|
|
20
|
+
environment, and its local projection grows as new imports are checked without
|
|
21
|
+
changing that identity. Complete source-bearing environments are still
|
|
22
|
+
produced locally by source builds and exchanged as portable copies.
|
|
19
23
|
|
|
20
24
|
Package references are an input compiler for `EnvironmentSpec`, not another
|
|
21
25
|
environment type:
|
|
@@ -44,7 +48,11 @@ GitPackage(
|
|
|
44
48
|
- `name` is the Lake package identity.
|
|
45
49
|
- `url` is a Git remote.
|
|
46
50
|
- `rev` is a full commit hash; `GitPackage.tag(...)` and TOML `tag = "..."`
|
|
47
|
-
provide a friendly input that resolution converts to an exact commit.
|
|
51
|
+
provide a friendly input that resolution converts to an exact commit. The
|
|
52
|
+
resolved lock always contains the exact commit and tree, while the
|
|
53
|
+
requested tag may remain alongside it as requested-revision metadata (and,
|
|
54
|
+
for manually authored tagged specifications, in the recorded specification
|
|
55
|
+
digest).
|
|
48
56
|
- `root_module` is imported by the synthetic root library, ensuring the
|
|
49
57
|
dependency's Lean artifacts are built.
|
|
50
58
|
- `subdir` records a safe relative package subdirectory.
|
|
@@ -60,7 +68,9 @@ through the locked toolchain.
|
|
|
60
68
|
The environment identity includes the complete lock, a versioned platform
|
|
61
69
|
compatibility record, and the implemented build profile. Informational details
|
|
62
70
|
such as the Python platform and OS patch release are retained in metadata but
|
|
63
|
-
are not identity inputs.
|
|
71
|
+
are not identity inputs. Full environments and portable imports record that
|
|
72
|
+
informational platform record; sparse registry downloads currently persist
|
|
73
|
+
only the versioned compatibility record. The runtime currently supports only the `release` profile;
|
|
64
74
|
other values are rejected rather than producing misleadingly distinct IDs for
|
|
65
75
|
identical builds.
|
|
66
76
|
|
|
@@ -105,7 +115,8 @@ CAS and hardlinked into environment projections when the filesystem permits.
|
|
|
105
115
|
its logical byte count can overlap environment projections and should not be
|
|
106
116
|
added to their logical sizes as an estimate of physical disk use.
|
|
107
117
|
`clean --include-downloads` reclaims old OCI blobs and unleased CAS artifacts;
|
|
108
|
-
|
|
118
|
+
sparse acquisition holds a collection lease across unpacking and projection,
|
|
119
|
+
so an artifact being projected is never reclaimed.
|
|
109
120
|
|
|
110
121
|
```python
|
|
111
122
|
report = runtime.clean(dry_run=True)
|