lean-runtime 4.1.1__tar.gz → 4.2.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 (194) hide show
  1. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/CHANGELOG.md +14 -0
  2. {lean_runtime-4.1.1/lean_runtime.egg-info → lean_runtime-4.2.0}/PKG-INFO +1 -1
  3. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/environments.toml +9 -1
  4. lean_runtime-4.2.0/catalog/locks/mathlib-v4.33.1.lock.json +244 -0
  5. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/cli.py +113 -1
  6. lean_runtime-4.2.0/lean_runtime/declaration_index.py +352 -0
  7. lean_runtime-4.2.0/lean_runtime/declaration_index_build.py +348 -0
  8. lean_runtime-4.2.0/lean_runtime/declaration_index_oci.py +407 -0
  9. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/api.py +43 -1
  10. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/catalog_build.py +40 -3
  11. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/catalog_cli.py +4 -0
  12. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/data/catalog.json +1 -1
  13. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/probe.py +1 -0
  14. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/environments.py +15 -1
  15. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/runtime.py +82 -0
  16. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/store.py +95 -0
  17. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/toolchains.py +8 -0
  18. {lean_runtime-4.1.1 → lean_runtime-4.2.0/lean_runtime.egg-info}/PKG-INFO +1 -1
  19. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime.egg-info/SOURCES.txt +8 -0
  20. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/pyproject.toml +1 -1
  21. lean_runtime-4.2.0/scripts/catalog_update.py +141 -0
  22. lean_runtime-4.2.0/scripts/prepare_declaration_index.py +119 -0
  23. lean_runtime-4.2.0/scripts/publish_declaration_index.py +37 -0
  24. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/scripts/registry_preflight.py +136 -4
  25. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/discovery/test_catalog_build.py +41 -0
  26. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/discovery/test_engine.py +89 -3
  27. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/discovery/test_planner.py +2 -2
  28. lean_runtime-4.2.0/tests/test_declaration_index.py +404 -0
  29. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_projects.py +9 -9
  30. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/LICENSE +0 -0
  31. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/MANIFEST.in +0 -0
  32. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/README.md +0 -0
  33. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/locks/core-v4.32.2.lock.json +0 -0
  34. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/locks/leancert-v4.30.0.5.lock.json +0 -0
  35. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/locks/leancert-v4.31.0.lock.json +0 -0
  36. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/locks/leancert-v4.32.2.4.lock.json +0 -0
  37. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/locks/leancert-v4.33.0.lock.json +0 -0
  38. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/locks/mathlib-v4.30.0.lock.json +0 -0
  39. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/locks/mathlib-v4.31.0.lock.json +0 -0
  40. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/locks/mathlib-v4.32.2.lock.json +0 -0
  41. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/catalog/locks/mathlib-v4.33.0.lock.json +0 -0
  42. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/compatibility/README.md +0 -0
  43. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/compatibility/lake-artifact-cache-4.33.0.json +0 -0
  44. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/compatibility/mathlib-4.32.2.json +0 -0
  45. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/compatibility/mathlib-4.32.2.toml +0 -0
  46. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/compatibility/mathlib-4.33.0.json +0 -0
  47. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/compatibility/mathlib-4.33.0.toml +0 -0
  48. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/docs/concepts/context-selection.md +0 -0
  49. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/docs/index.md +0 -0
  50. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/docs/reference/commands.md +0 -0
  51. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/docs/reference/python-api.md +0 -0
  52. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/docs/trust.md +0 -0
  53. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/docs/tutorial.md +0 -0
  54. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/docs/workflows/check-files.md +0 -0
  55. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/docs/workflows/lake-projects.md +0 -0
  56. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/examples/mathlib.toml +0 -0
  57. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/__init__.py +0 -0
  58. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/__main__.py +0 -0
  59. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/_git.py +0 -0
  60. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/_paths.py +0 -0
  61. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/backends.py +0 -0
  62. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/bundles.py +0 -0
  63. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/capsules.py +0 -0
  64. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/comparison.py +0 -0
  65. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/console.py +0 -0
  66. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/context_resolution.py +0 -0
  67. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/decisions.py +0 -0
  68. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/diagnostics.py +0 -0
  69. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/__init__.py +0 -0
  70. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/analyzer.py +0 -0
  71. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/candidate.py +0 -0
  72. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/catalog.py +0 -0
  73. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/catalog_manifest.py +0 -0
  74. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/defaults.py +0 -0
  75. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/engine.py +0 -0
  76. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/errors.py +0 -0
  77. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/history.py +0 -0
  78. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/memo.py +0 -0
  79. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/module_inventory.py +0 -0
  80. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/planner.py +0 -0
  81. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/policy.py +0 -0
  82. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/py.typed +0 -0
  83. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/result.py +0 -0
  84. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/schema_resources.py +0 -0
  85. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/schemas/catalog-v1.schema.json +0 -0
  86. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/schemas/plan-v1.schema.json +0 -0
  87. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/discovery/schemas/result-v1.schema.json +0 -0
  88. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/errors.py +0 -0
  89. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/events.py +0 -0
  90. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/facade.py +0 -0
  91. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/frontmatter.py +0 -0
  92. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/header_cache.py +0 -0
  93. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/health.py +0 -0
  94. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/identifier_resolver.py +0 -0
  95. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/import_syntax.py +0 -0
  96. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/lake.py +0 -0
  97. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/lake_cache.py +0 -0
  98. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/lockfiles.py +0 -0
  99. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/locking.py +0 -0
  100. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/matrix.py +0 -0
  101. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/models.py +0 -0
  102. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/oci.py +0 -0
  103. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/oci_protocol.py +0 -0
  104. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/packs.py +0 -0
  105. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/policies.py +0 -0
  106. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/profiling.py +0 -0
  107. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/programs.py +0 -0
  108. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/project_execution.py +0 -0
  109. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/project_sharing.py +0 -0
  110. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/projects.py +0 -0
  111. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/publisher_verification.py +0 -0
  112. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/py.typed +0 -0
  113. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/references.py +0 -0
  114. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/resolver.py +0 -0
  115. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/run_cli.py +0 -0
  116. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/schema_resources.py +0 -0
  117. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/serialization.py +0 -0
  118. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/shared_projects.py +0 -0
  119. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/specs.py +0 -0
  120. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/timings.py +0 -0
  121. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/toolchain_oci.py +0 -0
  122. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/toolchain_slim.py +0 -0
  123. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/verification.py +0 -0
  124. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime/wire.py +0 -0
  125. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime.egg-info/dependency_links.txt +0 -0
  126. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime.egg-info/entry_points.txt +0 -0
  127. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime.egg-info/requires.txt +0 -0
  128. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/lean_runtime.egg-info/top_level.txt +0 -0
  129. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/mkdocs.yml +0 -0
  130. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/attestation-v1.schema.json +0 -0
  131. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/check-batch-v1.schema.json +0 -0
  132. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/cleanup-v1.schema.json +0 -0
  133. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/comparison-v1.schema.json +0 -0
  134. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/execution-v1.schema.json +0 -0
  135. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/inspect-v1.schema.json +0 -0
  136. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/matrix-v1.schema.json +0 -0
  137. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/plan-v1.schema.json +0 -0
  138. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/profile-v1.schema.json +0 -0
  139. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/publication-v1.schema.json +0 -0
  140. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/schemas/verify-v1.schema.json +0 -0
  141. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/scripts/announcement_gate.py +0 -0
  142. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/scripts/lake_cache_gate.py +0 -0
  143. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/scripts/run_compatibility.py +0 -0
  144. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/scripts/run_v1_case_study.py +0 -0
  145. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/scripts/smoke_wheel.py +0 -0
  146. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/setup.cfg +0 -0
  147. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/conftest.py +0 -0
  148. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/discovery/e2e/test_real_discovery.py +0 -0
  149. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/discovery/test_analyzer.py +0 -0
  150. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/discovery/test_catalog.py +0 -0
  151. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/discovery/test_discovery_schema_resources.py +0 -0
  152. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/discovery/test_memo.py +0 -0
  153. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/discovery/test_policy.py +0 -0
  154. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_announcement_gate.py +0 -0
  155. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_backend.py +0 -0
  156. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_bundles.py +0 -0
  157. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_capsules.py +0 -0
  158. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_cli.py +0 -0
  159. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_console.py +0 -0
  160. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_context_resolution.py +0 -0
  161. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_diagnostics.py +0 -0
  162. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_environment_integration.py +0 -0
  163. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_events_health.py +0 -0
  164. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_facade.py +0 -0
  165. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_frontmatter.py +0 -0
  166. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_git.py +0 -0
  167. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_header_cache.py +0 -0
  168. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_identifier_resolver.py +0 -0
  169. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_interactive.py +0 -0
  170. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_lake_cache.py +0 -0
  171. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_lockfiles.py +0 -0
  172. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_locking.py +0 -0
  173. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_models.py +0 -0
  174. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_multifile.py +0 -0
  175. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_oci_protocol.py +0 -0
  176. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_packs.py +0 -0
  177. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_paths.py +0 -0
  178. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_prebuilt_policy.py +0 -0
  179. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_programs.py +0 -0
  180. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_project_publish.py +0 -0
  181. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_references.py +0 -0
  182. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_run_cli.py +0 -0
  183. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_runtime.py +0 -0
  184. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_schema_resources.py +0 -0
  185. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_schemas.py +0 -0
  186. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_signatures.py +0 -0
  187. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_specs.py +0 -0
  188. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_store.py +0 -0
  189. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_toolchain_oci.py +0 -0
  190. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_toolchain_slim.py +0 -0
  191. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_toolchains.py +0 -0
  192. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_v1_precision.py +0 -0
  193. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_verification_inventory.py +0 -0
  194. {lean_runtime-4.1.1 → lean_runtime-4.2.0}/tests/test_verification_probe.py +0 -0
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.2.0 - 2026-08-23
6
+
7
+ - Add a scheduled catalog-update workflow that detects a new stable Mathlib
8
+ release, freezes its exact lock, rebuilds the bundled catalog, and opens a
9
+ pull request.
10
+ - Add `catalog build --previous`, which reuses module inventories from a
11
+ prior catalog for entries whose locks are unchanged, so incremental
12
+ rebuilds only materialize new or changed sources.
13
+ - Add digest-pinned, per-package declaration-index shards generated from
14
+ public `.ilean` files during catalog publication. Rejected standalone
15
+ checks can lazily fetch only the relevant shard and report the module that
16
+ defines an unknown name; retained shards remain available offline and are
17
+ reused across environments with the same source and toolchain.
18
+
5
19
  ## 4.1.1 - 2026-08-21
6
20
 
7
21
  - Escape source stems that are not plain Lean identifiers when rendering
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lean-runtime
3
- Version: 4.1.1
3
+ Version: 4.2.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
@@ -1,5 +1,5 @@
1
1
  schema = "lean-runtime.discovery.catalog-source/v1"
2
- generated_at = "2026-08-13T13:49:46Z"
2
+ generated_at = "2026-08-21T16:51:41Z"
3
3
 
4
4
  [[environment]]
5
5
  id = "core-v4.32.2"
@@ -84,3 +84,11 @@ references = [
84
84
  ]
85
85
  inventory_packages = ["LeanCert", "mathlib"]
86
86
  created_at = "2026-08-10T22:05:27Z"
87
+
88
+ [[environment]]
89
+ id = "mathlib-v4.33.1"
90
+ channel = "stable"
91
+ lock = "locks/mathlib-v4.33.1.lock.json"
92
+ references = ["github:leanprover-community/mathlib4@v4.33.1"]
93
+ inventory_packages = ["mathlib"]
94
+ created_at = "2026-08-21T16:51:41Z"
@@ -0,0 +1,244 @@
1
+ {
2
+ "lock_id": "lock_66cf2e4f7ba9465fbcb9287abf7d770b58e102b03e27cc52f15d8e952a69e924",
3
+ "manifest": {
4
+ "fixedToolchain": false,
5
+ "lakeDir": ".lake",
6
+ "name": "lean_runtime_environment",
7
+ "packages": [
8
+ {
9
+ "configFile": "lakefile.lean",
10
+ "inherited": false,
11
+ "inputRev": "0df444a360eaa60ab8c11dca51a86af692955474",
12
+ "manifestFile": "lake-manifest.json",
13
+ "name": "mathlib",
14
+ "rev": "0df444a360eaa60ab8c11dca51a86af692955474",
15
+ "scope": "",
16
+ "subDir": null,
17
+ "type": "git",
18
+ "url": "https://github.com/leanprover-community/mathlib4.git"
19
+ },
20
+ {
21
+ "configFile": "lakefile.toml",
22
+ "inherited": true,
23
+ "inputRev": "main",
24
+ "manifestFile": "lake-manifest.json",
25
+ "name": "plausible",
26
+ "rev": "b7eb3304aeae834b12dda98993a37f6a41f6f0bb",
27
+ "scope": "leanprover-community",
28
+ "subDir": null,
29
+ "type": "git",
30
+ "url": "https://github.com/leanprover-community/plausible"
31
+ },
32
+ {
33
+ "configFile": "lakefile.toml",
34
+ "inherited": true,
35
+ "inputRev": "main",
36
+ "manifestFile": "lake-manifest.json",
37
+ "name": "LeanSearchClient",
38
+ "rev": "5f4d51b81cbd3f6b32b156bfad9056621a040404",
39
+ "scope": "leanprover-community",
40
+ "subDir": null,
41
+ "type": "git",
42
+ "url": "https://github.com/leanprover-community/LeanSearchClient"
43
+ },
44
+ {
45
+ "configFile": "lakefile.toml",
46
+ "inherited": true,
47
+ "inputRev": "main",
48
+ "manifestFile": "lake-manifest.json",
49
+ "name": "importGraph",
50
+ "rev": "16f02aa7642864af59f1ff0e384a015994db9118",
51
+ "scope": "leanprover-community",
52
+ "subDir": null,
53
+ "type": "git",
54
+ "url": "https://github.com/leanprover-community/import-graph"
55
+ },
56
+ {
57
+ "configFile": "lakefile.lean",
58
+ "inherited": true,
59
+ "inputRev": "main",
60
+ "manifestFile": "lake-manifest.json",
61
+ "name": "proofwidgets",
62
+ "rev": "4be2e3d5087eeb272cf5a8853b8f9dd025ef5957",
63
+ "scope": "leanprover-community",
64
+ "subDir": null,
65
+ "type": "git",
66
+ "url": "https://github.com/leanprover-community/ProofWidgets4"
67
+ },
68
+ {
69
+ "configFile": "lakefile.toml",
70
+ "inherited": true,
71
+ "inputRev": "master",
72
+ "manifestFile": "lake-manifest.json",
73
+ "name": "aesop",
74
+ "rev": "3448c0bcc5ce01b2d1546e483ec3620e32df3d0e",
75
+ "scope": "leanprover-community",
76
+ "subDir": null,
77
+ "type": "git",
78
+ "url": "https://github.com/leanprover-community/aesop"
79
+ },
80
+ {
81
+ "configFile": "lakefile.toml",
82
+ "inherited": true,
83
+ "inputRev": "master",
84
+ "manifestFile": "lake-manifest.json",
85
+ "name": "Qq",
86
+ "rev": "92c15be17b7caf78c2ad767ec40f89052d908d81",
87
+ "scope": "leanprover-community",
88
+ "subDir": null,
89
+ "type": "git",
90
+ "url": "https://github.com/leanprover-community/quote4"
91
+ },
92
+ {
93
+ "configFile": "lakefile.toml",
94
+ "inherited": true,
95
+ "inputRev": "main",
96
+ "manifestFile": "lake-manifest.json",
97
+ "name": "batteries",
98
+ "rev": "4488d40d070b9700d4d5a6aa342f0d40c31b2a2d",
99
+ "scope": "leanprover-community",
100
+ "subDir": null,
101
+ "type": "git",
102
+ "url": "https://github.com/leanprover-community/batteries"
103
+ },
104
+ {
105
+ "configFile": "lakefile.toml",
106
+ "inherited": true,
107
+ "inputRev": "v4.33.0",
108
+ "manifestFile": "lake-manifest.json",
109
+ "name": "Cli",
110
+ "rev": "6130a47896ce867c6a4a55373441e59e565bad0f",
111
+ "scope": "leanprover",
112
+ "subDir": null,
113
+ "type": "git",
114
+ "url": "https://github.com/leanprover/lean4-cli"
115
+ }
116
+ ],
117
+ "packagesDir": ".lake/packages",
118
+ "version": "1.2.0"
119
+ },
120
+ "packages": [
121
+ {
122
+ "artifact_command": [],
123
+ "inherited": true,
124
+ "name": "Cli",
125
+ "requested_revision": "v4.33.0",
126
+ "revision": "6130a47896ce867c6a4a55373441e59e565bad0f",
127
+ "root_module": null,
128
+ "source": "git",
129
+ "source_id": "source_0402fb44cd255aa6abf01e100ffbc8b0a584fb06e7d667eca759a3fea1ce936f",
130
+ "subdir": null,
131
+ "tree_hash": "34330f4c97f983d6b2dcb6d1de73941d76f0d336",
132
+ "url": "https://github.com/leanprover/lean4-cli"
133
+ },
134
+ {
135
+ "artifact_command": [],
136
+ "inherited": true,
137
+ "name": "LeanSearchClient",
138
+ "requested_revision": "main",
139
+ "revision": "5f4d51b81cbd3f6b32b156bfad9056621a040404",
140
+ "root_module": null,
141
+ "source": "git",
142
+ "source_id": "source_2b06180ed488eb4e9b3be595ae700d1bcda4937b3c74a996b6ab14966ee339c8",
143
+ "subdir": null,
144
+ "tree_hash": "6df26d76c14ef44d6b84a19df906d9116cfe3a50",
145
+ "url": "https://github.com/leanprover-community/LeanSearchClient"
146
+ },
147
+ {
148
+ "artifact_command": [],
149
+ "inherited": true,
150
+ "name": "Qq",
151
+ "requested_revision": "master",
152
+ "revision": "92c15be17b7caf78c2ad767ec40f89052d908d81",
153
+ "root_module": null,
154
+ "source": "git",
155
+ "source_id": "source_b44eb196acecfe724380f2ccd514388734c8d02a1be9d2bf3ac9ce3bb304607e",
156
+ "subdir": null,
157
+ "tree_hash": "1e857c2d945d9f5757b39cd2a2be1ed1ea94c82c",
158
+ "url": "https://github.com/leanprover-community/quote4"
159
+ },
160
+ {
161
+ "artifact_command": [],
162
+ "inherited": true,
163
+ "name": "aesop",
164
+ "requested_revision": "master",
165
+ "revision": "3448c0bcc5ce01b2d1546e483ec3620e32df3d0e",
166
+ "root_module": null,
167
+ "source": "git",
168
+ "source_id": "source_9b0a2b5654b9b0c4a3f39b7d0d3536fd5a6c0743f9a578c872f2e92336df7b66",
169
+ "subdir": null,
170
+ "tree_hash": "b2a7fa8f458d93951096c5c16da08fbfab393c85",
171
+ "url": "https://github.com/leanprover-community/aesop"
172
+ },
173
+ {
174
+ "artifact_command": [],
175
+ "inherited": true,
176
+ "name": "batteries",
177
+ "requested_revision": "main",
178
+ "revision": "4488d40d070b9700d4d5a6aa342f0d40c31b2a2d",
179
+ "root_module": null,
180
+ "source": "git",
181
+ "source_id": "source_ed59216c03fbbd94e5c2ca84e014be429ad841975d9fb49cfaf8e7eca8ba0913",
182
+ "subdir": null,
183
+ "tree_hash": "5a1de86f7997958aaffec998882c29006b688d1e",
184
+ "url": "https://github.com/leanprover-community/batteries"
185
+ },
186
+ {
187
+ "artifact_command": [],
188
+ "inherited": true,
189
+ "name": "importGraph",
190
+ "requested_revision": "main",
191
+ "revision": "16f02aa7642864af59f1ff0e384a015994db9118",
192
+ "root_module": null,
193
+ "source": "git",
194
+ "source_id": "source_601bef5a8bbe2ecd1da264920f7af7f614428f74d2206055796079f550c16ead",
195
+ "subdir": null,
196
+ "tree_hash": "0330ba38791d120e992fd635f4198dd4f845f8d1",
197
+ "url": "https://github.com/leanprover-community/import-graph"
198
+ },
199
+ {
200
+ "artifact_command": [],
201
+ "inherited": false,
202
+ "name": "mathlib",
203
+ "requested_revision": "0df444a360eaa60ab8c11dca51a86af692955474",
204
+ "revision": "0df444a360eaa60ab8c11dca51a86af692955474",
205
+ "root_module": "Mathlib",
206
+ "source": "git",
207
+ "source_id": "source_1f0e94acb82fc5dc587e3acceb80897790beeec034b05722afad1db35764a966",
208
+ "subdir": null,
209
+ "tree_hash": "f18edc0401eb2459e5241329743eb8626fdff148",
210
+ "url": "https://github.com/leanprover-community/mathlib4.git"
211
+ },
212
+ {
213
+ "artifact_command": [],
214
+ "inherited": true,
215
+ "name": "plausible",
216
+ "requested_revision": "main",
217
+ "revision": "b7eb3304aeae834b12dda98993a37f6a41f6f0bb",
218
+ "root_module": null,
219
+ "source": "git",
220
+ "source_id": "source_2b217883fa26c662bc5f83bfd2dc8a2f2bb1af2cfebbe62514584c9b0a22c874",
221
+ "subdir": null,
222
+ "tree_hash": "52fb5a4067538333f08d2c2c2ee9db16351a3508",
223
+ "url": "https://github.com/leanprover-community/plausible"
224
+ },
225
+ {
226
+ "artifact_command": [],
227
+ "inherited": true,
228
+ "name": "proofwidgets",
229
+ "requested_revision": "main",
230
+ "revision": "4be2e3d5087eeb272cf5a8853b8f9dd025ef5957",
231
+ "root_module": null,
232
+ "source": "git",
233
+ "source_id": "source_f4de1d6d00d935d1bc5ec34f827c54091009039ef322e326b50a9d4520e490d0",
234
+ "subdir": null,
235
+ "tree_hash": "6848bab13b5769926e47be1c768b9c3cad3e0d41",
236
+ "url": "https://github.com/leanprover-community/ProofWidgets4"
237
+ }
238
+ ],
239
+ "root_lakefile": "name = \"lean_runtime_environment\"\nversion = \"0.0.0\"\ndefaultTargets = [\"LeanRuntimeEnvironment\"]\n\n[[require]]\nname = \"mathlib\"\ngit = \"https://github.com/leanprover-community/mathlib4.git\"\nrev = \"0df444a360eaa60ab8c11dca51a86af692955474\"\n\n[[lean_lib]]\nname = \"LeanRuntimeEnvironment\"\n",
240
+ "root_module": "import Mathlib\n\n/- Generated by Lean Runtime. -/\n",
241
+ "schema": "lean-runtime-environment-lock/1",
242
+ "spec_digest": "spec_bd04dd6fc4ab7ee22d1e836be9c5d1788169f9e583dcb14fa3bf55a5357abbba",
243
+ "toolchain": "leanprover/lean4:v4.33.1"
244
+ }
@@ -21,6 +21,12 @@ else: # pragma: no cover - exercised by Python 3.10 CI
21
21
  import tomli as tomllib
22
22
 
23
23
  from .console import ConsoleRenderer, styler_for
24
+ from .declaration_index import DeclarationIndex, DeclarationIndexSet, DeclarationShard
25
+ from .declaration_index_build import (
26
+ build_declaration_index,
27
+ load_declaration_index_build,
28
+ )
29
+ from .declaration_index_oci import OCIDeclarationIndexPublisher
24
30
  from .discovery.api import Discovery
25
31
  from .discovery.catalog_build import build_catalog_file
26
32
  from .discovery.defaults import default_catalog
@@ -41,10 +47,12 @@ from .lake import ROOT_MODULE
41
47
  from .lockfiles import EnvironmentLock
42
48
  from .matrix import load_matrix
43
49
  from .models import ExecutionResult, PhaseTiming
50
+ from .oci import OCIRepository
44
51
  from .policies import ExecutionPolicy, format_byte_size, parse_byte_size
45
52
  from .profiling import ProfileReport
46
53
  from .project_sharing import AdoptionPlan, ProjectInitPlan, ProjectUpdatePlan
47
54
  from .projects import discover_project, project_publication_workflow
55
+ from .publisher_verification import CosignVerifier
48
56
  from .run_cli import run as _run_front_door
49
57
  from .runtime import Runtime
50
58
  from .specs import EnvironmentSpec
@@ -101,6 +109,11 @@ def _render_storage(status: StoreStatus) -> None:
101
109
  ("Sources", status.sources, status.sources_bytes),
102
110
  ("Download cache", status.oci_blobs, status.oci_blobs_bytes),
103
111
  ("Shared module CAS", status.cas_artifacts, status.cas_artifacts_bytes),
112
+ (
113
+ "Declaration indexes",
114
+ status.declaration_indexes,
115
+ status.declaration_indexes_bytes,
116
+ ),
104
117
  ("Project packages", status.project_packages, status.project_packages_bytes),
105
118
  ("Toolchains", None, status.toolchains_bytes),
106
119
  ("Executions", status.executions, status.executions_bytes),
@@ -850,6 +863,8 @@ Advanced namespaces:
850
863
  env_acquire.add_argument("lock", type=Path)
851
864
  env_acquire.add_argument("--name")
852
865
  env_acquire.add_argument("--download-only", action="store_true")
866
+ env_acquire.add_argument("--timeout", type=float, default=1800)
867
+ env_acquire.add_argument("--accelerate", action="store_true")
853
868
  env_acquire.set_defaults(command="acquire")
854
869
  env_diff = env_commands.add_parser("diff", help="compare exact environments")
855
870
  env_diff.add_argument("left")
@@ -1006,11 +1021,35 @@ Advanced namespaces:
1006
1021
  pfinal.add_argument("--tag", action="append", default=[])
1007
1022
  pfinal.add_argument("--sign", action="store_true")
1008
1023
  pfinal.set_defaults(command="finalize-program")
1024
+ declaration_index = commands.add_parser(
1025
+ "declaration-index", help="build and publish composable declaration shards"
1026
+ )
1027
+ di = declaration_index.add_subparsers(dest="declaration_index_operation", required=True)
1028
+ dib = di.add_parser("build")
1029
+ dib.add_argument("lock", type=Path)
1030
+ dib.add_argument("--output", required=True, type=Path)
1031
+ dib.add_argument("--weights", type=Path)
1032
+ dib.set_defaults(command="declaration-index-build")
1033
+ dip = di.add_parser("publish")
1034
+ dip.add_argument("lock", type=Path)
1035
+ dip.add_argument("build", type=Path)
1036
+ dip.add_argument("--library", required=True)
1037
+ dip.add_argument("--sign", action="store_true")
1038
+ dip.set_defaults(command="declaration-index-publish")
1039
+ dii = di.add_parser("inspect")
1040
+ dii.add_argument("build", type=Path)
1041
+ dii.add_argument("--resolve")
1042
+ dii.set_defaults(command="declaration-index-inspect")
1009
1043
  catalog = commands.add_parser("catalog", help="catalog maintenance")
1010
1044
  cc = catalog.add_subparsers(dest="catalog_operation", required=True)
1011
1045
  cb = cc.add_parser("build")
1012
1046
  cb.add_argument("manifest", type=Path)
1013
1047
  cb.add_argument("--output", required=True, type=Path)
1048
+ cb.add_argument(
1049
+ "--previous",
1050
+ type=Path,
1051
+ help="prior catalog whose unchanged entries skip module re-inventory",
1052
+ )
1014
1053
  cb.set_defaults(command="catalog-build")
1015
1054
  return root
1016
1055
 
@@ -1206,12 +1245,80 @@ def main(argv: list[str] | None = None) -> int:
1206
1245
  trusted_issuer=args.trusted_issuer,
1207
1246
  verification_tool=args.verification_tool,
1208
1247
  )
1248
+ if args.command == "declaration-index-build":
1249
+ lock = EnvironmentLock.load(args.lock)
1250
+ built = build_declaration_index(
1251
+ runtime,
1252
+ lock,
1253
+ args.output,
1254
+ weights_path=args.weights,
1255
+ )
1256
+ _json(built.to_dict())
1257
+ return 0
1258
+ if args.command == "declaration-index-publish":
1259
+ lock = EnvironmentLock.load(args.lock)
1260
+ built = load_declaration_index_build(args.build, expected_lock_id=lock.lock_id)
1261
+ di_repository = OCIRepository.parse(args.library)
1262
+ di_publication = OCIDeclarationIndexPublisher(di_repository).publish(
1263
+ tuple(di_item.source for di_item in built.shards), lock_id=lock.lock_id
1264
+ )
1265
+ if args.sign:
1266
+ CosignVerifier(executable=runtime.verification_executable).sign(
1267
+ di_repository, di_publication.manifest_digest
1268
+ )
1269
+ _json(di_publication.to_dict())
1270
+ return 0
1271
+ if args.command == "declaration-index-inspect":
1272
+ built = load_declaration_index_build(args.build)
1273
+ indexes = []
1274
+ for di_item in built.shards:
1275
+ di_source = di_item.source
1276
+ shard = DeclarationShard(
1277
+ di_source.shard_id,
1278
+ di_source.package,
1279
+ di_source.source_id,
1280
+ di_source.toolchain,
1281
+ di_source.subdir,
1282
+ di_source.module_roots,
1283
+ di_source.namespace_roots,
1284
+ "sha256:" + "0" * 64,
1285
+ di_source.path.stat().st_size,
1286
+ "sha256:" + "0" * 64,
1287
+ 1,
1288
+ )
1289
+ indexes.append(
1290
+ (
1291
+ shard,
1292
+ DeclarationIndex(di_source.path, expected_shard_id=di_source.shard_id),
1293
+ )
1294
+ )
1295
+ index_set = DeclarationIndexSet(built.lock_id, tuple(indexes))
1296
+ di_match = index_set.resolve(args.resolve) if args.resolve else None
1297
+ _json(
1298
+ {
1299
+ "lock_id": built.lock_id,
1300
+ "shards": len(built.shards),
1301
+ "declarations": index_set.declaration_count,
1302
+ "match": (
1303
+ {
1304
+ "name": di_match.name,
1305
+ "module": di_match.module,
1306
+ "kind": di_match.kind,
1307
+ "weight": di_match.weight,
1308
+ }
1309
+ if di_match is not None
1310
+ else None
1311
+ ),
1312
+ }
1313
+ )
1314
+ return 0
1209
1315
  if args.command == "catalog-build":
1210
1316
  os.environ.setdefault("MATHLIB_NO_CACHE_ON_UPDATE", "1")
1211
1317
  catalog_result = build_catalog_file(
1212
1318
  args.manifest,
1213
1319
  args.output,
1214
1320
  runtime=Runtime(home=args.home, libraries=()),
1321
+ previous_path=args.previous,
1215
1322
  )
1216
1323
  print(
1217
1324
  f"wrote {args.output}: {len(catalog_result.entries)} environments, "
@@ -1541,7 +1648,12 @@ def main(argv: list[str] | None = None) -> int:
1541
1648
  if args.command in {"open", "acquire"}:
1542
1649
  if args.command == "acquire" and args.download_only:
1543
1650
  runtime.availability = "required"
1544
- environment = runtime.open_exact(EnvironmentLock.load(args.lock), name=args.name)
1651
+ environment = runtime.open_exact(
1652
+ EnvironmentLock.load(args.lock),
1653
+ name=args.name,
1654
+ build_timeout=args.timeout,
1655
+ accelerate=args.accelerate,
1656
+ )
1545
1657
  _json(environment.inspect().to_dict())
1546
1658
  if args.timings:
1547
1659
  print(