lean-runtime 2.7.0__tar.gz → 2.9.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.
Files changed (183) hide show
  1. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/CHANGELOG.md +34 -0
  2. {lean_runtime-2.7.0/lean_runtime.egg-info → lean_runtime-2.9.0}/PKG-INFO +11 -4
  3. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/README.md +10 -3
  4. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/cli.md +35 -9
  5. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/getting-started.md +11 -2
  6. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/local-projects.md +13 -2
  7. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/portable-copies.md +48 -4
  8. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/project-publishing.md +9 -2
  9. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/__init__.py +6 -1
  10. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/cli.py +401 -28
  11. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/console.py +32 -11
  12. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/diagnostics.py +1 -1
  13. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/errors.py +70 -0
  14. lean_runtime-2.9.0/lean_runtime/header_cache.py +126 -0
  15. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/health.py +33 -0
  16. lean_runtime-2.9.0/lean_runtime/identifier_resolver.py +96 -0
  17. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/models.py +1 -0
  18. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/oci.py +338 -29
  19. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/project_execution.py +136 -24
  20. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/projects.py +56 -12
  21. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/runtime.py +124 -36
  22. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/store.py +125 -22
  23. {lean_runtime-2.7.0 → lean_runtime-2.9.0/lean_runtime.egg-info}/PKG-INFO +11 -4
  24. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime.egg-info/SOURCES.txt +4 -0
  25. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/pyproject.toml +1 -1
  26. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/schemas/execution-v1.schema.json +3 -2
  27. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_bundles.py +220 -3
  28. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_cli.py +138 -7
  29. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_console.py +43 -0
  30. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_diagnostics.py +9 -0
  31. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_events_health.py +1 -0
  32. lean_runtime-2.9.0/tests/test_header_cache.py +44 -0
  33. lean_runtime-2.9.0/tests/test_identifier_resolver.py +59 -0
  34. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_project_publish.py +45 -2
  35. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_projects.py +87 -0
  36. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_store.py +15 -0
  37. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/LICENSE +0 -0
  38. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/MANIFEST.in +0 -0
  39. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/environments.toml +0 -0
  40. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/locks/core-v4.32.2.lock.json +0 -0
  41. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/locks/leancert-v4.30.0.5.lock.json +0 -0
  42. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/locks/leancert-v4.31.0.lock.json +0 -0
  43. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/locks/leancert-v4.32.2.4.lock.json +0 -0
  44. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/locks/leancert-v4.33.0.lock.json +0 -0
  45. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/locks/mathlib-v4.30.0.lock.json +0 -0
  46. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/locks/mathlib-v4.31.0.lock.json +0 -0
  47. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/locks/mathlib-v4.32.2.lock.json +0 -0
  48. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/catalog/locks/mathlib-v4.33.0.lock.json +0 -0
  49. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/compatibility/README.md +0 -0
  50. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/compatibility/lake-artifact-cache-4.33.0.json +0 -0
  51. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/compatibility/mathlib-4.32.2.json +0 -0
  52. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/compatibility/mathlib-4.32.2.toml +0 -0
  53. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/compatibility/mathlib-4.33.0.json +0 -0
  54. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/compatibility/mathlib-4.33.0.toml +0 -0
  55. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/architecture.md +0 -0
  56. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/captures.md +0 -0
  57. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/case-study-v1.md +0 -0
  58. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/development.md +0 -0
  59. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/environments.md +0 -0
  60. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/index.md +0 -0
  61. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/lake-artifact-cache-design.md +0 -0
  62. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/python-api.md +0 -0
  63. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/ready-programs.md +0 -0
  64. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/standalone-files.md +0 -0
  65. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/trust-and-limitations.md +0 -0
  66. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/docs/v1-precision.md +0 -0
  67. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/examples/mathlib.toml +0 -0
  68. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/__main__.py +0 -0
  69. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/_git.py +0 -0
  70. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/_paths.py +0 -0
  71. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/backends.py +0 -0
  72. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/bundles.py +0 -0
  73. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/capsules.py +0 -0
  74. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/comparison.py +0 -0
  75. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/decisions.py +0 -0
  76. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/__init__.py +0 -0
  77. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/analyzer.py +0 -0
  78. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/api.py +0 -0
  79. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/candidate.py +0 -0
  80. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/catalog.py +0 -0
  81. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/catalog_build.py +0 -0
  82. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/catalog_cli.py +0 -0
  83. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/catalog_manifest.py +0 -0
  84. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/data/catalog.json +0 -0
  85. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/defaults.py +0 -0
  86. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/engine.py +0 -0
  87. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/errors.py +0 -0
  88. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/module_inventory.py +0 -0
  89. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/planner.py +0 -0
  90. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/policy.py +0 -0
  91. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/probe.py +0 -0
  92. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/py.typed +0 -0
  93. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/result.py +0 -0
  94. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/schema_resources.py +0 -0
  95. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/schemas/catalog-v1.schema.json +0 -0
  96. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/schemas/plan-v1.schema.json +0 -0
  97. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/discovery/schemas/result-v1.schema.json +0 -0
  98. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/environments.py +0 -0
  99. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/events.py +0 -0
  100. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/facade.py +0 -0
  101. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/frontmatter.py +0 -0
  102. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/lake.py +0 -0
  103. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/lake_cache.py +0 -0
  104. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/lockfiles.py +0 -0
  105. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/locking.py +0 -0
  106. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/matrix.py +0 -0
  107. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/oci_protocol.py +0 -0
  108. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/packs.py +0 -0
  109. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/policies.py +0 -0
  110. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/profiling.py +0 -0
  111. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/programs.py +0 -0
  112. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/project_sharing.py +0 -0
  113. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/publisher_verification.py +0 -0
  114. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/py.typed +0 -0
  115. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/references.py +0 -0
  116. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/resolver.py +0 -0
  117. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/run_cli.py +0 -0
  118. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/schema_resources.py +0 -0
  119. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/serialization.py +0 -0
  120. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/shared_projects.py +0 -0
  121. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/specs.py +0 -0
  122. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/timings.py +0 -0
  123. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/toolchain_oci.py +0 -0
  124. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/toolchain_slim.py +0 -0
  125. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/toolchains.py +0 -0
  126. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/verification.py +0 -0
  127. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime/wire.py +0 -0
  128. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime.egg-info/dependency_links.txt +0 -0
  129. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime.egg-info/entry_points.txt +0 -0
  130. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime.egg-info/requires.txt +0 -0
  131. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/lean_runtime.egg-info/top_level.txt +0 -0
  132. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/mkdocs.yml +0 -0
  133. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/schemas/cleanup-v1.schema.json +0 -0
  134. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/schemas/comparison-v1.schema.json +0 -0
  135. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/schemas/inspect-v1.schema.json +0 -0
  136. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/schemas/matrix-v1.schema.json +0 -0
  137. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/schemas/profile-v1.schema.json +0 -0
  138. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/schemas/verify-v1.schema.json +0 -0
  139. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/scripts/announcement_gate.py +0 -0
  140. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/scripts/lake_cache_gate.py +0 -0
  141. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/scripts/registry_preflight.py +0 -0
  142. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/scripts/run_compatibility.py +0 -0
  143. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/scripts/run_v1_case_study.py +0 -0
  144. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/scripts/smoke_wheel.py +0 -0
  145. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/setup.cfg +0 -0
  146. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/conftest.py +0 -0
  147. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/discovery/e2e/test_real_discovery.py +0 -0
  148. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/discovery/test_analyzer.py +0 -0
  149. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/discovery/test_catalog.py +0 -0
  150. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/discovery/test_catalog_build.py +0 -0
  151. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/discovery/test_discovery_schema_resources.py +0 -0
  152. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/discovery/test_engine.py +0 -0
  153. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/discovery/test_planner.py +0 -0
  154. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/discovery/test_policy.py +0 -0
  155. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_backend.py +0 -0
  156. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_capsules.py +0 -0
  157. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_environment_integration.py +0 -0
  158. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_facade.py +0 -0
  159. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_frontmatter.py +0 -0
  160. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_git.py +0 -0
  161. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_interactive.py +0 -0
  162. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_lake_cache.py +0 -0
  163. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_lockfiles.py +0 -0
  164. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_models.py +0 -0
  165. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_multifile.py +0 -0
  166. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_oci_protocol.py +0 -0
  167. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_packs.py +0 -0
  168. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_paths.py +0 -0
  169. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_prebuilt_policy.py +0 -0
  170. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_programs.py +0 -0
  171. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_references.py +0 -0
  172. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_run_cli.py +0 -0
  173. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_runtime.py +0 -0
  174. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_schema_resources.py +0 -0
  175. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_schemas.py +0 -0
  176. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_signatures.py +0 -0
  177. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_specs.py +0 -0
  178. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_toolchain_oci.py +0 -0
  179. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_toolchain_slim.py +0 -0
  180. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_toolchains.py +0 -0
  181. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_v1_precision.py +0 -0
  182. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_verification_inventory.py +0 -0
  183. {lean_runtime-2.7.0 → lean_runtime-2.9.0}/tests/test_verification_probe.py +0 -0
@@ -2,6 +2,40 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.9.0 - 2026-08-15
6
+
7
+ - Make environment publication fail closed: verify registry push access before
8
+ building, report the selected credential source, remotely verify every
9
+ manifest, emit an explicit terminal failure event, and reserve exit codes 3,
10
+ 4, and 5 for permission, retryable transport, and partial/indeterminate
11
+ publication failures respectively.
12
+ - Make standalone `check FILE` failures point directly to `--toolchain`, and
13
+ have project checks ask Lake to materialize a missing local import before one
14
+ automatic retry.
15
+ - Accept any fetchable Git origin for immutable project locks and local exports,
16
+ including self-hosted and local bare repositories; GitHub origins retain
17
+ their canonical `github:` convenience reference.
18
+
19
+ ## 2.8.0 - 2026-08-14
20
+
21
+ - Cut repeated project-check latency with capability-probed Lean header snapshots;
22
+ `check --watch` rechecks on save, while `check --repeat` and `check --across`
23
+ absorb the common profile/matrix workflows without removing legacy aliases.
24
+ - Suggest exact-workspace declarations after coded unknown-identifier diagnostics
25
+ using persisted `.ilean` indexes from the pinned dependency graph.
26
+ - Make `init --mathlib-version VERSION` unambiguous, preserve common repository
27
+ scaffolding, optionally generate matching CI with `--ci`, and retain the old
28
+ `--mathlib` spelling as a validated compatibility alias.
29
+ - Add `project scan/attach/detach/update`, `publish KIND`, `finalize KIND`, and
30
+ `copy save/open` namespaces while retaining existing command spellings for
31
+ automation.
32
+ - Give environments and doctor human output plus `--json`, add `doctor --fix`,
33
+ fingerprinted storage accounting with `storage --verify`, cleanup nudges,
34
+ `clean --keep-last` retention, curated help, and generated Bash/Zsh/Fish
35
+ completions.
36
+ - Report cumulative frame and byte counters while restoring sparse capsules, so
37
+ both terse and verbose cold-start output shows measurable forward progress.
38
+
5
39
  ## 2.7.0 - 2026-08-14
6
40
 
7
41
  - Keep newly initialized project roots narrow: the generated root imports its
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lean-runtime
3
- Version: 2.7.0
3
+ Version: 2.9.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
@@ -188,6 +188,7 @@ default, and exact dependencies are shared automatically:
188
188
  lean-runtime init MyProof
189
189
  cd MyProof
190
190
  lean-runtime check MyProof/Basic.lean
191
+ lean-runtime check MyProof/Basic.lean --watch
191
192
  # Check every declared local library, in Lake dependency order:
192
193
  lean-runtime check
193
194
  lean-runtime build
@@ -196,7 +197,7 @@ lean-runtime build
196
197
  `init` also writes an `AGENTS.md` with the project build, checking, dependency,
197
198
  and shared-package rules for coding agents. Pass `--no-agents` to omit it; an
198
199
  existing `AGENTS.md` is never overwritten. Use `--core` for no Mathlib, or
199
- `--mathlib 4.33.0` to select a cataloged release. `lean-runtime update`
200
+ `--mathlib-version 4.33.0` to select a cataloged release. `lean-runtime update`
200
201
  explicitly moves a project to the newest cataloged Mathlib after a preview.
201
202
 
202
203
  Running `lean-runtime init .` in an existing pinned Lake project adopts its
@@ -257,11 +258,17 @@ Environment libraries may be public or private. For example:
257
258
 
258
259
  ```bash
259
260
  lean-runtime --library ghcr.io/owner/lean-environments download environment.lock.json
260
- lean-runtime build-and-publish environment.lock.json \
261
+ lean-runtime publish environment environment.lock.json \
261
262
  --publish-to ghcr.io/owner/lean-environments
262
263
  ```
263
264
 
264
- To publish an existing clean, pushed GitHub Lean project, inspect it and
265
+ Publication verifies push access before doing an expensive build and reports
266
+ which credential source it selected. Run `lean-runtime publish environment
267
+ --publish-to ghcr.io/owner/lean-environments --check-access` to test access by
268
+ itself. A registry denial is a nonzero, machine-distinct failure; success is not
269
+ reported until the remote manifest digest is read back and verified.
270
+
271
+ To publish an existing clean Git-backed Lean project, inspect it and
265
272
  generate the maintained multi-platform workflow:
266
273
 
267
274
  ```bash
@@ -152,6 +152,7 @@ default, and exact dependencies are shared automatically:
152
152
  lean-runtime init MyProof
153
153
  cd MyProof
154
154
  lean-runtime check MyProof/Basic.lean
155
+ lean-runtime check MyProof/Basic.lean --watch
155
156
  # Check every declared local library, in Lake dependency order:
156
157
  lean-runtime check
157
158
  lean-runtime build
@@ -160,7 +161,7 @@ lean-runtime build
160
161
  `init` also writes an `AGENTS.md` with the project build, checking, dependency,
161
162
  and shared-package rules for coding agents. Pass `--no-agents` to omit it; an
162
163
  existing `AGENTS.md` is never overwritten. Use `--core` for no Mathlib, or
163
- `--mathlib 4.33.0` to select a cataloged release. `lean-runtime update`
164
+ `--mathlib-version 4.33.0` to select a cataloged release. `lean-runtime update`
164
165
  explicitly moves a project to the newest cataloged Mathlib after a preview.
165
166
 
166
167
  Running `lean-runtime init .` in an existing pinned Lake project adopts its
@@ -221,11 +222,17 @@ Environment libraries may be public or private. For example:
221
222
 
222
223
  ```bash
223
224
  lean-runtime --library ghcr.io/owner/lean-environments download environment.lock.json
224
- lean-runtime build-and-publish environment.lock.json \
225
+ lean-runtime publish environment environment.lock.json \
225
226
  --publish-to ghcr.io/owner/lean-environments
226
227
  ```
227
228
 
228
- To publish an existing clean, pushed GitHub Lean project, inspect it and
229
+ Publication verifies push access before doing an expensive build and reports
230
+ which credential source it selected. Run `lean-runtime publish environment
231
+ --publish-to ghcr.io/owner/lean-environments --check-access` to test access by
232
+ itself. A registry denial is a nonzero, machine-distinct failure; success is not
233
+ reported until the remote manifest digest is read back and verified.
234
+
235
+ To publish an existing clean Git-backed Lean project, inspect it and
229
236
  generate the maintained multi-platform workflow:
230
237
 
231
238
  ```bash
@@ -32,6 +32,19 @@ first-time download cannot expire the search. `--discovery-timeout` and
32
32
 
33
33
  All commands accept `--home PATH` before the subcommand to select a store.
34
34
 
35
+ For project iteration, `check FILE --watch` rechecks on save with warm native
36
+ import snapshots. `check FILE --repeat N` measures the same path, and
37
+ `check FILE --across matrix.toml` checks exact contexts. The older `profile`
38
+ and `matrix` commands remain compatibility aliases.
39
+
40
+ `storage` reads a fingerprinted ledger after its first inventory, so large
41
+ stores remain an instant-information command. `storage --verify` explicitly
42
+ rebuilds that ledger and prints a progress line because it must walk the store.
43
+ `doctor` is human-readable by default; `doctor --json` preserves automation and
44
+ `doctor --fix` applies its safe stale-staging and private-Elan remedies.
45
+ `clean --keep-last N` (or `LEAN_RUNTIME_CLEAN_KEEP_LAST`) retains the newest N
46
+ otherwise eligible unnamed environments in addition to the age threshold.
47
+
35
48
  ## One-shot package workflow
36
49
 
37
50
  ```bash
@@ -61,9 +74,10 @@ lean-runtime check Main.lean \
61
74
  lean-runtime prepare environment.toml --output environment.lock.json
62
75
  lean-runtime open environment.lock.json --name research-stack
63
76
  lean-runtime --library ghcr.io/owner/lean-environments download environment.lock.json
64
- lean-runtime save-copy research-stack --output research-stack.lean-environment
65
- lean-runtime --home /tmp/fresh open-copy research-stack.lean-environment --name research-stack
66
- lean-runtime build-and-publish environment.lock.json --publish-to ghcr.io/owner/lean-environments
77
+ lean-runtime copy save research-stack --output research-stack.lean-environment
78
+ lean-runtime --home /tmp/fresh copy open research-stack.lean-environment --name research-stack
79
+ lean-runtime publish environment environment.lock.json --publish-to ghcr.io/owner/lean-environments
80
+ lean-runtime publish environment --publish-to ghcr.io/owner/lean-environments --check-access
67
81
  lean-runtime check research-stack Main.lean --json
68
82
  lean-runtime inspect research-stack --packages
69
83
  lean-runtime environments
@@ -79,9 +93,10 @@ lean-runtime clean --execute
79
93
 
80
94
  `clean` is a dry run unless `--execute` is supplied.
81
95
 
82
- `save-copy` creates a portable environment file. `open-copy` verifies its exact
96
+ `copy save` creates a portable environment file. `copy open` verifies its exact
83
97
  identity, package Git trees, computer compatibility, and Lean probe before
84
- making the environment available. See [Portable copies and environment
98
+ making the environment available. The former `save-copy` and `open-copy`
99
+ spellings remain compatibility aliases. See [Portable copies and environment
85
100
  libraries](portable-copies.md) for its trust boundary.
86
101
 
87
102
  ## Slim toolchains
@@ -211,6 +226,15 @@ controls whether ready-to-use environments are downloaded or built locally.
211
226
  `LEAN_RUNTIME_LIBRARIES` accepts a comma-separated equivalent and
212
227
  `LEAN_RUNTIME_AVAILABILITY` sets the default policy.
213
228
 
229
+ Environment publishing probes repository push access before opening or building
230
+ the lock. `--check-access` runs only that content-free preflight and needs no
231
+ lock. GHCR publishers can use an authenticated `gh` session; explicit
232
+ `LEAN_RUNTIME_REGISTRY_USERNAME` and `LEAN_RUNTIME_REGISTRY_PASSWORD` values take
233
+ precedence. Publication exits `3` for authentication/permission denial, `4` for
234
+ retryable transport or registry failures, and `5` when remote state is partial
235
+ or indeterminate. Success is emitted only after the published manifest is read
236
+ back and its digest is verified. See [Portable copies](portable-copies.md#publishing).
237
+
214
238
  ## Publish an existing project
215
239
 
216
240
  ```bash
@@ -221,10 +245,12 @@ lean-runtime project init-publish . --module MyProject \
221
245
  --library ghcr.io/owner/my-project-environments
222
246
  ```
223
247
 
224
- `inspect` is read-only. The other commands require a clean root GitHub project
225
- whose exact HEAD commit is available from `origin`. `init-publish` creates a
226
- small caller for the maintained multi-platform publication and clean-consumer
227
- workflow. See [Publishing a Lean project](project-publishing.md).
248
+ `inspect` is read-only. The other commands require a clean root Git project
249
+ whose exact HEAD commit is available from its configured origin. GitHub,
250
+ self-hosted HTTPS/SSH, and local bare repositories are supported.
251
+ `init-publish` creates a small caller for the maintained multi-platform
252
+ publication and clean-consumer workflow. See
253
+ [Publishing a Lean project](project-publishing.md).
228
254
 
229
255
  Use global `--publisher_verification required --trusted-publisher ID --trusted-issuer ISSUER`
230
256
  to require a verified publisher. `build-and-publish --sign` records the trusted
@@ -21,17 +21,19 @@ shared exact dependencies:
21
21
  lean-runtime init MyProof
22
22
  cd MyProof
23
23
  lean-runtime check MyProof/Basic.lean
24
+ lean-runtime check MyProof/Basic.lean --watch
24
25
  lean-runtime check
25
26
  lean-runtime build
26
27
  ```
27
28
 
28
29
  By default, `init` writes an `AGENTS.md` explaining the project workflow and
29
30
  shared-dependency safety rules to coding agents. Pass `--no-agents` to omit it.
30
- An existing file is preserved. The generated root imports only the project's
31
+ An existing file is preserved. Pass `--ci` to generate a workflow that checks
32
+ the same exact committed project graph. The generated root imports only the project's
31
33
  local `Basic` module; add the narrow Mathlib imports each implementation file
32
34
  needs rather than paying for the all-Mathlib umbrella on every root import.
33
35
 
34
- Use `--mathlib 4.33.0` to select that release explicitly, or `--core` for a
36
+ Use `--mathlib-version 4.33.0` to select that release explicitly, or `--core` for a
35
37
  core-only library. The root project remains an ordinary mutable Lake project;
36
38
  its dependency sources and build artifacts are reused by other projects with
37
39
  the same exact graph.
@@ -81,6 +83,8 @@ lean-runtime scan ~/research
81
83
  ```
82
84
 
83
85
  `scan` only records exact local graphs as possible future zero-download seeds.
86
+ The converged spelling is `lean-runtime project scan`; `project attach`,
87
+ `project detach`, and `project update` group the other dependency-graph actions.
84
88
  Advanced bulk migration remains available through `attach`. See [Local Lake
85
89
  projects](local-projects.md) for detachment, storage estimates, and the complete
86
90
  safety model.
@@ -111,6 +115,11 @@ lean-run Main.lean
111
115
  then lets Lean determine which candidate accepts the source. Use
112
116
  `--lock-out environment.lock.json` to pin the successful environment.
113
117
 
118
+ The lower-level `lean-runtime check Main.lean` command does not guess a
119
+ toolchain for a standalone file. Pass one explicitly, for example
120
+ `lean-runtime check Main.lean --toolchain v4.33.0`, or use `lean-run` for
121
+ catalog discovery.
122
+
114
123
  Strict TOML frontmatter remains available when the context is already known:
115
124
 
116
125
  ```lean
@@ -29,7 +29,10 @@ lean-runtime check ./my-project/MyProject/Main.lean
29
29
  ```
30
30
 
31
31
  The actual project-relative file is passed to `lake env lean`, so imports of
32
- local modules retain normal Lake semantics. Checking a source string writes a
32
+ local modules retain normal Lake semantics. A successful file check does not
33
+ itself write that file's `.olean`; if another checked file imports a local
34
+ module whose artifact is missing, Lean Runtime asks Lake to build that module's
35
+ `leanArts` target and retries once. Checking a source string writes a
33
36
  uniquely named disposable file under `.lake/lean-runtime/` and removes it after
34
37
  execution:
35
38
 
@@ -46,6 +49,7 @@ each repository's `.lake/packages`. New projects can start in shared mode:
46
49
  lean-runtime init MyProof
47
50
  cd MyProof
48
51
  lean-runtime check MyProof/Basic.lean
52
+ lean-runtime check MyProof/Basic.lean --watch
49
53
  lean-runtime check
50
54
  lean-runtime build
51
55
  ```
@@ -64,12 +68,19 @@ stays silent. Only root-project outputs enter this cache: locked dependencies
64
68
  continue to use the verified shared workspace, avoiding a second multi-gigabyte
65
69
  copy. `build` retains Lake's complete target semantics.
66
70
 
71
+ Repeated file checks reuse Lean's native header snapshots, keyed by the exact
72
+ toolchain, project identity, and import block. Body-only edits therefore avoid
73
+ reloading the unchanged import environment. `--watch` is a thin save loop over
74
+ the same ordinary check/result contract. Failed checks may add exact-graph
75
+ identifier hints derived from pinned `.ilean` indexes; raw Lean streams remain
76
+ unchanged.
77
+
67
78
  The generated files are a standard Lake project plus a small
68
79
  `lean-runtime.toml`. Root build outputs stay local; exact dependencies are
69
80
  shared. The generated root imports only its local `Basic` module, leaving
70
81
  implementation files free to select precise Mathlib modules. The newest stable
71
82
  cataloged Mathlib is selected by default. Select a
72
- release with `--mathlib 4.33.0`, or use `--core` for a core-only library.
83
+ release with `--mathlib-version 4.33.0`, or use `--core` for a core-only library.
73
84
  `init` also creates an `AGENTS.md` describing the safe
74
85
  build and dependency workflow unless `--no-agents` is passed; it never
75
86
  overwrites an existing guide.
@@ -113,25 +113,69 @@ Signature failure is an integrity failure and never triggers source fallback.
113
113
 
114
114
  ## Publishing
115
115
 
116
+ Check push access without building or uploading an environment:
117
+
118
+ ```bash
119
+ lean-runtime publish environment \
120
+ --publish-to ghcr.io/alerad/leancert-runtime \
121
+ --check-access
122
+ ```
123
+
124
+ For GHCR, credentials are selected in this order: the
125
+ `LEAN_RUNTIME_REGISTRY_USERNAME` / `LEAN_RUNTIME_REGISTRY_PASSWORD` pair, an
126
+ authenticated GitHub CLI session, then anonymous access. The access report names
127
+ the selected account and source but never prints the token. Lean Runtime does not
128
+ implicitly read Docker's credential store. To give the GitHub CLI package access,
129
+ run:
130
+
131
+ ```bash
132
+ gh auth refresh -s write:packages,read:packages
133
+ ```
134
+
116
135
  Publish the current platform after ensuring the lock:
117
136
 
118
137
  ```bash
119
138
  export LEAN_RUNTIME_REGISTRY_USERNAME=alerad
120
139
  export LEAN_RUNTIME_REGISTRY_PASSWORD="$GHCR_TOKEN"
121
140
 
122
- lean-runtime build-and-publish environment.lock.json \
141
+ lean-runtime publish environment environment.lock.json \
123
142
  --publish-to ghcr.io/alerad/leancert-runtime \
124
143
  --tag v4.32.2.4 \
125
144
  --sign --attest
126
145
  ```
127
146
 
128
- The publisher checks for existing blobs, uploads only missing content, publishes
129
- the platform manifest by digest, and updates the canonical `lock_<sha>` index
130
- tag last. Human tags are aliases to that same index. This follows the
147
+ The same push-access probe runs automatically before the environment is built,
148
+ so a missing scope fails in seconds instead of after export. The probe starts
149
+ and immediately cancels an empty OCI upload session; it publishes no manifest or
150
+ index. The publisher then checks for existing blobs, uploads only missing
151
+ content, publishes the platform manifest by digest, and updates the canonical
152
+ `lock_<sha>` index tag last. Every manifest is fetched back and its digest is
153
+ verified before success is reported. Human tags are aliases to that same index.
154
+ This follows the
131
155
  [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec/blob/main/spec.md)
132
156
  and uses an [OCI image index](https://github.com/opencontainers/image-spec/blob/main/image-index.md)
133
157
  for platform selection.
134
158
 
159
+ Publication has stable failure codes for CI:
160
+
161
+ | Exit | Meaning | Retry? |
162
+ |---:|---|---|
163
+ | `2` | Invalid invocation or local input | Fix the invocation |
164
+ | `3` | Registry authentication or permission denial | Fix credentials/scopes first |
165
+ | `4` | Retryable network, throttling, or registry 5xx failure | Yes, with backoff |
166
+ | `5` | Partial or indeterminate publication state | Inspect the terminal state, then retry safely |
167
+
168
+ An unpublished failure explicitly states that no manifest or index was
169
+ finalized; already uploaded content-addressed blobs are unreferenced and safe to
170
+ reuse on retry. Once a manifest write has been attempted, any failure that
171
+ cannot prove the resulting remote state is reported as partial/indeterminate;
172
+ it is never reported as success. Registries do not use status codes
173
+ uniformly: in particular, GHCR can return 403 for missing permissions as well as
174
+ an inaccessible or not-yet-created package namespace, so diagnostics describe
175
+ these as likely causes rather than certainties. Automation can consume the same
176
+ state from the terminal `library.publish_failed` or `library.published` runtime
177
+ event.
178
+
135
179
  Repository authors can use the bundled composite action after checking out the
136
180
  repository and generating or retaining a lock:
137
181
 
@@ -1,6 +1,6 @@
1
1
  # Publishing a Lean project
2
2
 
3
- Lean Runtime can freeze a clean, pushed GitHub Lean project into an exact lock,
3
+ Lean Runtime can freeze a clean Git-backed Lean project into an exact lock,
4
4
  build it on each supported computer type, and publish verified ready-to-use
5
5
  environments through an OCI-compatible library. Consumers import the project's
6
6
  public module without cloning or building the project.
@@ -24,7 +24,8 @@ Add `--check-remote` to prove that the exact HEAD commit is available from
24
24
  - a root `lakefile.toml` or `lakefile.lean` with an importable Lean library;
25
25
  - the Lake project at the Git repository root;
26
26
  - a clean checkout;
27
- - a GitHub `origin`; and
27
+ - a fetchable `origin` (GitHub, self-hosted HTTPS/SSH, `file://`, or a local
28
+ bare repository); and
28
29
  - a HEAD commit available from that remote.
29
30
 
30
31
  If `lakefile.lean` must be translated, its pinned toolchain must already be
@@ -40,6 +41,12 @@ The default output is `environment.lock.json` in the project root. The lock
40
41
  contains the exact project commit, complete Lake dependency graph, toolchain,
41
42
  and selected public module.
42
43
 
44
+ GitHub HTTPS and SSH origins are canonicalized to the portable HTTPS form and
45
+ receive a `github:OWNER/REPOSITORY@COMMIT` convenience reference. Other origins
46
+ are preserved as exact Git sources. Relative local paths become absolute
47
+ `file://` URLs, which is useful for offline export but intentionally remains
48
+ machine-local unless the resulting capsule is distributed.
49
+
43
50
  ## Export this computer
44
51
 
45
52
  A portable capsule is useful for transferring the current computer's
@@ -21,6 +21,8 @@ from .errors import (
21
21
  MaterializationError,
22
22
  PolicyError,
23
23
  ProjectError,
24
+ PublicationError,
25
+ RegistryRequestError,
24
26
  ResolutionError,
25
27
  SpecificationError,
26
28
  ToolchainError,
@@ -49,7 +51,7 @@ from .models import (
49
51
  PhaseTiming,
50
52
  ProjectProvenance,
51
53
  )
52
- from .oci import DEFAULT_ENVIRONMENT_LIBRARIES, PublicationInfo
54
+ from .oci import DEFAULT_ENVIRONMENT_LIBRARIES, PublicationAccess, PublicationInfo
53
55
  from .policies import ExecutionPolicy
54
56
  from .profiling import ProfileReport
55
57
  from .programs import ProgramDescription, ProgramInfo, ReadyProgram
@@ -142,6 +144,9 @@ __all__ = [
142
144
  "PreparedEnvironment",
143
145
  "PolicyError",
144
146
  "PublicationInfo",
147
+ "PublicationAccess",
148
+ "PublicationError",
149
+ "RegistryRequestError",
145
150
  "DownloadUnavailable",
146
151
  "ProjectError",
147
152
  "ResolutionError",