lean-runtime 4.24.0__tar.gz → 4.26.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 (202) hide show
  1. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/CHANGELOG.md +53 -0
  2. {lean_runtime-4.24.0/lean_runtime.egg-info → lean_runtime-4.26.0}/PKG-INFO +28 -9
  3. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/README.md +27 -8
  4. lean_runtime-4.26.0/docs/concepts/context-selection.md +89 -0
  5. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/docs/index.md +31 -1
  6. lean_runtime-4.26.0/docs/reference/commands.md +110 -0
  7. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/docs/reference/python-api.md +5 -0
  8. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/docs/trust.md +27 -3
  9. lean_runtime-4.26.0/docs/tutorial.md +154 -0
  10. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/docs/workflows/check-files.md +37 -8
  11. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/docs/workflows/lake-projects.md +3 -1
  12. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/cli.py +426 -117
  13. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/console.py +19 -0
  14. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/context_resolution.py +27 -1
  15. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/probe.py +24 -0
  16. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/models.py +17 -1
  17. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/projects.py +52 -0
  18. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/run_cli.py +14 -13
  19. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/runtime.py +40 -2
  20. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/schema_resources.py +1 -0
  21. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/toolchains.py +179 -64
  22. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/wire.py +5 -0
  23. {lean_runtime-4.24.0 → lean_runtime-4.26.0/lean_runtime.egg-info}/PKG-INFO +28 -9
  24. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime.egg-info/SOURCES.txt +1 -0
  25. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/pyproject.toml +1 -1
  26. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/execution-v1.schema.json +3 -2
  27. lean_runtime-4.26.0/schemas/status-v1.schema.json +65 -0
  28. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/discovery/test_engine.py +37 -0
  29. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_cli.py +204 -5
  30. lean_runtime-4.26.0/tests/test_context_resolution.py +115 -0
  31. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_events_health.py +2 -6
  32. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_models.py +21 -0
  33. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_runtime.py +65 -0
  34. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_schema_resources.py +1 -0
  35. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_schemas.py +2 -0
  36. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_toolchains.py +199 -11
  37. lean_runtime-4.24.0/docs/concepts/context-selection.md +0 -58
  38. lean_runtime-4.24.0/docs/reference/commands.md +0 -75
  39. lean_runtime-4.24.0/docs/tutorial.md +0 -118
  40. lean_runtime-4.24.0/tests/test_context_resolution.py +0 -51
  41. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/LICENSE +0 -0
  42. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/MANIFEST.in +0 -0
  43. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/environments.toml +0 -0
  44. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/core-v4.32.2.lock.json +0 -0
  45. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/leancert-v4.30.0.5.lock.json +0 -0
  46. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/leancert-v4.31.0.lock.json +0 -0
  47. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/leancert-v4.32.2.4.lock.json +0 -0
  48. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/leancert-v4.33.0.lock.json +0 -0
  49. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/mathlib-v4.30.0.lock.json +0 -0
  50. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/mathlib-v4.31.0.lock.json +0 -0
  51. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/mathlib-v4.32.2.lock.json +0 -0
  52. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/mathlib-v4.33.0.lock.json +0 -0
  53. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/catalog/locks/mathlib-v4.33.1.lock.json +0 -0
  54. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/compatibility/README.md +0 -0
  55. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/compatibility/lake-artifact-cache-4.33.0.json +0 -0
  56. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/compatibility/mathlib-4.32.2.json +0 -0
  57. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/compatibility/mathlib-4.32.2.toml +0 -0
  58. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/compatibility/mathlib-4.33.0.json +0 -0
  59. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/compatibility/mathlib-4.33.0.toml +0 -0
  60. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/docs/reference/python-advanced.md +0 -0
  61. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/docs/reference/storage.md +0 -0
  62. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/examples/mathlib.toml +0 -0
  63. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/__init__.py +0 -0
  64. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/__main__.py +0 -0
  65. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/_git.py +0 -0
  66. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/_paths.py +0 -0
  67. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/backends.py +0 -0
  68. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/bundles.py +0 -0
  69. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/capsules.py +0 -0
  70. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/comparison.py +0 -0
  71. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/decisions.py +0 -0
  72. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/declaration_index.py +0 -0
  73. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/declaration_index_build.py +0 -0
  74. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/declaration_index_oci.py +0 -0
  75. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/diagnostics.py +0 -0
  76. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/__init__.py +0 -0
  77. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/analyzer.py +0 -0
  78. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/api.py +0 -0
  79. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/candidate.py +0 -0
  80. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/catalog.py +0 -0
  81. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/catalog_build.py +0 -0
  82. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/catalog_cli.py +0 -0
  83. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/catalog_manifest.py +0 -0
  84. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/data/catalog.json +0 -0
  85. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/defaults.py +0 -0
  86. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/engine.py +0 -0
  87. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/errors.py +0 -0
  88. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/history.py +0 -0
  89. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/memo.py +0 -0
  90. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/module_inventory.py +0 -0
  91. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/planner.py +0 -0
  92. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/policy.py +0 -0
  93. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/py.typed +0 -0
  94. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/result.py +0 -0
  95. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/schema_resources.py +0 -0
  96. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/schemas/catalog-v1.schema.json +0 -0
  97. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/schemas/plan-v1.schema.json +0 -0
  98. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/discovery/schemas/result-v1.schema.json +0 -0
  99. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/environments.py +0 -0
  100. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/errors.py +0 -0
  101. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/events.py +0 -0
  102. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/facade.py +0 -0
  103. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/frontmatter.py +0 -0
  104. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/header_cache.py +0 -0
  105. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/health.py +0 -0
  106. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/identifier_resolver.py +0 -0
  107. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/import_syntax.py +0 -0
  108. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/lake.py +0 -0
  109. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/lake_cache.py +0 -0
  110. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/lockfiles.py +0 -0
  111. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/locking.py +0 -0
  112. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/matrix.py +0 -0
  113. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/oci.py +0 -0
  114. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/oci_protocol.py +0 -0
  115. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/packs.py +0 -0
  116. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/policies.py +0 -0
  117. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/profiling.py +0 -0
  118. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/programs.py +0 -0
  119. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/project_execution.py +0 -0
  120. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/project_sharing.py +0 -0
  121. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/publisher_verification.py +0 -0
  122. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/py.typed +0 -0
  123. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/references.py +0 -0
  124. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/resolver.py +0 -0
  125. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/serialization.py +0 -0
  126. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/shared_projects.py +0 -0
  127. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/specs.py +0 -0
  128. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/store.py +0 -0
  129. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/timings.py +0 -0
  130. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/toolchain_oci.py +0 -0
  131. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/toolchain_slim.py +0 -0
  132. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime/verification.py +0 -0
  133. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime.egg-info/dependency_links.txt +0 -0
  134. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime.egg-info/entry_points.txt +0 -0
  135. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime.egg-info/requires.txt +0 -0
  136. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/lean_runtime.egg-info/top_level.txt +0 -0
  137. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/mkdocs.yml +0 -0
  138. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/attestation-v1.schema.json +0 -0
  139. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/check-batch-v1.schema.json +0 -0
  140. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/cleanup-v1.schema.json +0 -0
  141. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/comparison-v1.schema.json +0 -0
  142. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/inspect-v1.schema.json +0 -0
  143. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/matrix-v1.schema.json +0 -0
  144. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/plan-v1.schema.json +0 -0
  145. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/profile-v1.schema.json +0 -0
  146. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/publication-v1.schema.json +0 -0
  147. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/schemas/verify-v1.schema.json +0 -0
  148. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/scripts/announcement_gate.py +0 -0
  149. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/scripts/catalog_update.py +0 -0
  150. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/scripts/lake_cache_gate.py +0 -0
  151. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/scripts/prepare_declaration_index.py +0 -0
  152. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/scripts/publish_declaration_index.py +0 -0
  153. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/scripts/registry_preflight.py +0 -0
  154. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/scripts/run_compatibility.py +0 -0
  155. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/scripts/run_v1_case_study.py +0 -0
  156. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/scripts/smoke_wheel.py +0 -0
  157. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/setup.cfg +0 -0
  158. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/conftest.py +0 -0
  159. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/discovery/e2e/test_real_discovery.py +0 -0
  160. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/discovery/test_analyzer.py +0 -0
  161. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/discovery/test_catalog.py +0 -0
  162. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/discovery/test_catalog_build.py +0 -0
  163. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/discovery/test_discovery_schema_resources.py +0 -0
  164. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/discovery/test_memo.py +0 -0
  165. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/discovery/test_planner.py +0 -0
  166. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/discovery/test_policy.py +0 -0
  167. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_announcement_gate.py +0 -0
  168. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_backend.py +0 -0
  169. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_bundles.py +0 -0
  170. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_capsules.py +0 -0
  171. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_console.py +0 -0
  172. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_declaration_index.py +0 -0
  173. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_diagnostics.py +0 -0
  174. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_environment_integration.py +0 -0
  175. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_facade.py +0 -0
  176. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_frontmatter.py +0 -0
  177. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_git.py +0 -0
  178. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_header_cache.py +0 -0
  179. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_identifier_resolver.py +0 -0
  180. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_interactive.py +0 -0
  181. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_lake_cache.py +0 -0
  182. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_lockfiles.py +0 -0
  183. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_locking.py +0 -0
  184. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_multifile.py +0 -0
  185. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_oci_protocol.py +0 -0
  186. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_packs.py +0 -0
  187. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_paths.py +0 -0
  188. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_prebuilt_policy.py +0 -0
  189. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_programs.py +0 -0
  190. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_project_bootstrap.py +0 -0
  191. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_project_publish.py +0 -0
  192. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_projects.py +0 -0
  193. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_references.py +0 -0
  194. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_run_cli.py +0 -0
  195. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_signatures.py +0 -0
  196. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_specs.py +0 -0
  197. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_store.py +0 -0
  198. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_toolchain_oci.py +0 -0
  199. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_toolchain_slim.py +0 -0
  200. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_v1_precision.py +0 -0
  201. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_verification_inventory.py +0 -0
  202. {lean_runtime-4.24.0 → lean_runtime-4.26.0}/tests/test_verification_probe.py +0 -0
@@ -2,6 +2,59 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.26.0 - 2026-08-26
6
+
7
+ - Stop `status` claiming a download is required for core-only files. A lock
8
+ without packages runs straight on the toolchain and never materializes an
9
+ environment in the store, so readiness and cost are now judged by the
10
+ toolchain alone: `status` reports `environment ready locally` and
11
+ `Download none` once the toolchain is installed, and `status --probe`
12
+ prices it as zero instead of `unknown`. Previously the store directory that
13
+ `check` never creates kept the row at `not local · Download required`.
14
+
15
+ ## 4.25.0 - 2026-08-26
16
+
17
+ - Pin the Elan build that automatic bootstrap installs. Bootstrap now
18
+ downloads the `v4.2.3` release archive for the host platform directly from
19
+ the Elan releases, verifies its SHA-256, and runs its `elan-init`, instead of
20
+ running the installer script that always fetched `releases/latest`. Two
21
+ machines on the same Lean Runtime version therefore get the same Elan.
22
+ - Retry `elan toolchain install` up to two more times when Elan reports a
23
+ transient download failure (dropped connection, TLS handshake error,
24
+ timeout), announcing each retry as a `toolchain.install_retry` event. Unknown
25
+ toolchains and disk errors still fail immediately.
26
+ - State the model up front: `lean-runtime --help`, the docs index, and the
27
+ command reference now open with the four nouns (context, environment, lock,
28
+ verdict) and the rule that discovery proposes an environment while only Lean
29
+ accepts it.
30
+ - Make `status` a dry run of `check`. A standalone file reports its context
31
+ source and confidence (`proposed` for discovery, `exact` for a project, lock,
32
+ or stored environment), the candidates in the order `check` would try them,
33
+ whether each environment and toolchain is already local, and whether a
34
+ download is needed; `status --probe` prices the first download.
35
+ - Report Lean's answer as a first-class `verdict` (`accepted`, `rejected`, or
36
+ `not_run`) in execution results, `--json` output (`data.verdict`), and the
37
+ `--matrix` table, and attribute every human-readable verdict to the exact
38
+ environment it was produced in.
39
+ - Wrap `status --json` in a `lean-runtime.status/v1` envelope like every other
40
+ machine-readable command. Scripts that read the bare object must now read
41
+ `data`.
42
+ - Apply one mutation rule everywhere: `toolchain optimize --prune-original`,
43
+ `env publish`, `toolchain publish`, `program publish`, and
44
+ `declaration-index publish` now describe the change and require `--yes` or an
45
+ interactive confirmation, exiting with code `2` non-interactively otherwise.
46
+ - Separate the vocabulary of *context* (where the decision comes from) and
47
+ *environment* (what was chosen) across help text and documentation;
48
+ `check --help` and `status --help` now describe the model, `--using` takes
49
+ an `ENVIRONMENT`, and the generated `AGENTS.md` opens with the same model
50
+ plus the `status` dry run and the `--yes` rule.
51
+ - Improve Windows checks by reusing Elan from `PATH`, recognizing native
52
+ `.exe` toolchain binaries, and running core-only discovery directly against
53
+ its exact Lean toolchain when no platform environment artifact is needed.
54
+ - Treat files outside every declared `lakefile.toml` target as standalone even
55
+ when they sit below a pinned project, add `check --standalone` as an explicit
56
+ override, and explain ignored parent projects in `status`.
57
+
5
58
  ## 4.24.0 - 2026-08-26
6
59
 
7
60
  - Key shared Lake package artifacts by the exact installed Lean and Lake
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lean-runtime
3
- Version: 4.24.0
3
+ Version: 4.26.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
@@ -63,6 +63,23 @@ reuse.
63
63
  [Read the documentation](https://alerad.github.io/lean-runtime/) ·
64
64
  [Explore the CLI](https://alerad.github.io/lean-runtime/reference/commands/)
65
65
 
66
+ ## The model
67
+
68
+ | Noun | Meaning |
69
+ | --- | --- |
70
+ | **context** | where a file's requirements come from: `--using`, frontmatter, the owning Lake project, or automatic discovery |
71
+ | **environment** | one exact, immutable toolchain + package set |
72
+ | **lock** | an environment written down, reusable offline anywhere |
73
+ | **verdict** | Lean's answer inside one environment: `accepted` or `rejected` |
74
+
75
+ Discovery proposes an environment. Only Lean accepts it. `lean-runtime status`
76
+ shows the proposal without running anything; `lean-runtime check` produces the
77
+ verdict and names the environment it was produced in:
78
+
79
+ ```text
80
+ ✓ Main.lean accepted in mathlib-v4.33.0 (3.21s)
81
+ ```
82
+
66
83
  ## Start where you are
67
84
 
68
85
  Create a project:
@@ -107,7 +124,7 @@ Record the environment only when the result must be reproduced elsewhere:
107
124
  lean-runtime check Main.lean --write-lock environment.lock.json
108
125
  ```
109
126
 
110
- A file can instead carry an explicit context in strict comment frontmatter:
127
+ A file can instead name its environment in strict comment frontmatter:
111
128
 
112
129
  ```lean
113
130
  -- /// lean-runtime
@@ -118,7 +135,7 @@ import Mathlib
118
135
  example : 2 + 2 = 4 := by norm_num
119
136
  ```
120
137
 
121
- When inference needs an override, there is one spelling:
138
+ When discovery needs an override, there is one spelling:
122
139
 
123
140
  ```bash
124
141
  lean-runtime check Main.lean --using mathlib@v4.33.0
@@ -145,7 +162,7 @@ watch FILE re-check on save
145
162
  build [TARGET] build the current project
146
163
  update preview and apply a safe project update
147
164
  publish configure verified project publication
148
- status [PATH] explain the selected project or environment
165
+ status [PATH] dry run of check: where the environment comes from, what it costs
149
166
  verify SUBJECT verify an exact artifact
150
167
  doctor diagnose and offer safe repairs
151
168
  clean preview and reclaim unused storage
@@ -153,9 +170,10 @@ replay CAPTURE replay an execution capture
153
170
  completion SHELL generate shell completion
154
171
  ```
155
172
 
156
- Project commands use the current directory when no path is supplied. Guided
157
- mutations show their plan and ask before changing anything; automation passes
158
- `--yes`, and inspection-only calls pass `--dry-run`.
173
+ Project commands use the current directory when no path is supplied. Every
174
+ command that changes a project, deletes local content, or publishes to a remote
175
+ shows its plan and asks before changing anything; automation passes `--yes`,
176
+ and inspection-only calls pass `--dry-run`.
159
177
 
160
178
  Persistent registry, availability, store, and publisher-trust policy belongs
161
179
  in `~/.config/lean-runtime/config.toml`; the nearest project's
@@ -223,8 +241,9 @@ interfaces for infrastructure code.
223
241
  - User project metadata and user Elan state are not silently rewritten.
224
242
  - The local execution backend enforces supported resource limits but is not a
225
243
  network sandbox; unsupported isolation requests fail explicitly.
226
- - Logical Lean rejections exit 1; invalid/infrastructure invocations exit 2;
227
- publication failures retain their documented classified exit statuses.
244
+ - A Lean rejection is a normal verdict and exits 1. Invalid or infrastructure
245
+ invocations exit 2 and carry no verdict. Publication failures retain their
246
+ documented classified exit statuses.
228
247
 
229
248
  Documentation lives at
230
249
  [alerad.github.io/lean-runtime](https://alerad.github.io/lean-runtime/).
@@ -27,6 +27,23 @@ reuse.
27
27
  [Read the documentation](https://alerad.github.io/lean-runtime/) ·
28
28
  [Explore the CLI](https://alerad.github.io/lean-runtime/reference/commands/)
29
29
 
30
+ ## The model
31
+
32
+ | Noun | Meaning |
33
+ | --- | --- |
34
+ | **context** | where a file's requirements come from: `--using`, frontmatter, the owning Lake project, or automatic discovery |
35
+ | **environment** | one exact, immutable toolchain + package set |
36
+ | **lock** | an environment written down, reusable offline anywhere |
37
+ | **verdict** | Lean's answer inside one environment: `accepted` or `rejected` |
38
+
39
+ Discovery proposes an environment. Only Lean accepts it. `lean-runtime status`
40
+ shows the proposal without running anything; `lean-runtime check` produces the
41
+ verdict and names the environment it was produced in:
42
+
43
+ ```text
44
+ ✓ Main.lean accepted in mathlib-v4.33.0 (3.21s)
45
+ ```
46
+
30
47
  ## Start where you are
31
48
 
32
49
  Create a project:
@@ -71,7 +88,7 @@ Record the environment only when the result must be reproduced elsewhere:
71
88
  lean-runtime check Main.lean --write-lock environment.lock.json
72
89
  ```
73
90
 
74
- A file can instead carry an explicit context in strict comment frontmatter:
91
+ A file can instead name its environment in strict comment frontmatter:
75
92
 
76
93
  ```lean
77
94
  -- /// lean-runtime
@@ -82,7 +99,7 @@ import Mathlib
82
99
  example : 2 + 2 = 4 := by norm_num
83
100
  ```
84
101
 
85
- When inference needs an override, there is one spelling:
102
+ When discovery needs an override, there is one spelling:
86
103
 
87
104
  ```bash
88
105
  lean-runtime check Main.lean --using mathlib@v4.33.0
@@ -109,7 +126,7 @@ watch FILE re-check on save
109
126
  build [TARGET] build the current project
110
127
  update preview and apply a safe project update
111
128
  publish configure verified project publication
112
- status [PATH] explain the selected project or environment
129
+ status [PATH] dry run of check: where the environment comes from, what it costs
113
130
  verify SUBJECT verify an exact artifact
114
131
  doctor diagnose and offer safe repairs
115
132
  clean preview and reclaim unused storage
@@ -117,9 +134,10 @@ replay CAPTURE replay an execution capture
117
134
  completion SHELL generate shell completion
118
135
  ```
119
136
 
120
- Project commands use the current directory when no path is supplied. Guided
121
- mutations show their plan and ask before changing anything; automation passes
122
- `--yes`, and inspection-only calls pass `--dry-run`.
137
+ Project commands use the current directory when no path is supplied. Every
138
+ command that changes a project, deletes local content, or publishes to a remote
139
+ shows its plan and asks before changing anything; automation passes `--yes`,
140
+ and inspection-only calls pass `--dry-run`.
123
141
 
124
142
  Persistent registry, availability, store, and publisher-trust policy belongs
125
143
  in `~/.config/lean-runtime/config.toml`; the nearest project's
@@ -187,8 +205,9 @@ interfaces for infrastructure code.
187
205
  - User project metadata and user Elan state are not silently rewritten.
188
206
  - The local execution backend enforces supported resource limits but is not a
189
207
  network sandbox; unsupported isolation requests fail explicitly.
190
- - Logical Lean rejections exit 1; invalid/infrastructure invocations exit 2;
191
- publication failures retain their documented classified exit statuses.
208
+ - A Lean rejection is a normal verdict and exits 1. Invalid or infrastructure
209
+ invocations exit 2 and carry no verdict. Publication failures retain their
210
+ documented classified exit statuses.
192
211
 
193
212
  Documentation lives at
194
213
  [alerad.github.io/lean-runtime](https://alerad.github.io/lean-runtime/).
@@ -0,0 +1,89 @@
1
+ # Context selection
2
+
3
+ Every check runs inside one exact **environment**. The **context** is where that
4
+ environment comes from. Selecting a context and Lean accepting the source are
5
+ separate decisions: discovery proposes an environment, and only Lean accepts it.
6
+
7
+ For ordinary standalone checks, let Lean Runtime discover the environment.
8
+ Explicit selection is an override for reproducibility, compatibility testing,
9
+ or a request that specifically names a release.
10
+
11
+ ## Precedence
12
+
13
+ For a Lean file, Lean Runtime considers context sources in this order:
14
+
15
+ 1. An explicit command-line or Python API selection
16
+ 2. Lean Runtime frontmatter in the file
17
+ 3. The nearest pinned Lake project that owns the file
18
+ 4. Automatic catalog discovery
19
+
20
+ If none can produce an environment, the operation fails before Lean runs.
21
+
22
+ The first three sources are **exact**: they name one environment outright. The
23
+ fourth is only a **proposal** until Lean accepts the file inside a candidate.
24
+ `status` reports which of the two it is.
25
+
26
+ ## Explicit selection
27
+
28
+ ```console
29
+ lean-runtime check Main.lean --using mathlib@v4.33.0
30
+ ```
31
+
32
+ `--using` can identify a project directory, a lock file, a stored environment, a
33
+ toolchain, or a package release. Explicit input does not need discovery.
34
+
35
+ ## Frontmatter
36
+
37
+ ```lean
38
+ -- /// lean-runtime
39
+ -- toolchain = "leanprover/lean4:v4.33.0"
40
+ -- ///
41
+ example : 1 + 1 = 2 := by decide
42
+ ```
43
+
44
+ Frontmatter travels with the source while remaining valid Lean comments.
45
+
46
+ ## Pinned project context
47
+
48
+ A file declared beneath a target in a `lakefile.toml` project uses the nearest
49
+ project with a pinned toolchain. A file that is merely stored under that project,
50
+ but outside every declared target root, proceeds to automatic discovery. For an
51
+ imperative `lakefile.lean`, where ownership cannot be established without running
52
+ project code, Lean Runtime conservatively preserves ancestry-based selection.
53
+ Lean Runtime does not replace project version decisions during a normal project check.
54
+
55
+ To explicitly ignore every ancestor project, use:
56
+
57
+ ```console
58
+ lean-runtime check Main.lean --standalone
59
+ ```
60
+
61
+ `--standalone` cannot be combined with `--using` because they are competing
62
+ context-selection instructions.
63
+
64
+ ## Automatic discovery
65
+
66
+ Discovery begins with declared source imports. The bundled catalog associates exact environments with module inventories. Plausible candidates are ordered under a bounded policy and checked in turn.
67
+
68
+ Static analysis proposes candidates. It does not prove compatibility. A candidate is accepted only if Lean accepts the source inside that exact environment.
69
+
70
+ Candidate count, compiler time, wall time, remote acquisition, offline mode, and source-build permission can bound the search. Reaching a bound can produce an inconclusive discovery result rather than a claim that no compatible environment exists.
71
+
72
+ ## Inspect the decision
73
+
74
+ ```console
75
+ lean-runtime status Main.lean
76
+ lean-runtime status Main.lean --probe
77
+ lean-runtime status Main.lean --json
78
+ ```
79
+
80
+ `status` is a dry run of `check`. For a standalone file it reports the context
81
+ source, its confidence (`proposed` for discovery, `exact` for a project, lock, or
82
+ stored environment), the imports used as evidence, the candidate environments in
83
+ the order `check` would try them, whether each environment and toolchain is
84
+ already local, and — with `--probe` — the size of the first download. It also
85
+ names an ancestor project that was ignored because no declared target owns the
86
+ file. `status` never runs Lean and never acquires anything.
87
+
88
+ A successful `check` reports the verdict together with the environment that
89
+ produced it, and its `--json` provenance records the exact identities involved.
@@ -24,7 +24,7 @@ hide:
24
24
  <div class="lr-hero-copy">
25
25
  <p class="lr-eyebrow"><span aria-hidden="true">⊢</span> Compiler-backed Lean execution</p>
26
26
  <h1>Check a Lean file in the environment it needs.</h1>
27
- <p class="lr-lead">Lean Runtime resolves an exact toolchain and dependency context, runs Lean, and records what actually ran.</p>
27
+ <p class="lr-lead">Lean Runtime resolves one exact environment — toolchain and dependencies — runs Lean inside it, and records what actually ran.</p>
28
28
  <div class="lr-actions">
29
29
  <a class="md-button md-button--primary" href="tutorial/">Run your first check</a>
30
30
  <a class="md-button" href="concepts/context-selection/">How context is selected</a>
@@ -83,6 +83,36 @@ hide:
83
83
 
84
84
 
85
85
 
86
+ <section class="lr-workflows" aria-labelledby="model-title">
87
+ <div class="lr-section-heading">
88
+ <p class="lr-kicker">The model</p>
89
+ <h2 id="model-title">Four nouns and one rule.</h2>
90
+ </div>
91
+ <div class="lr-card-grid">
92
+ <article>
93
+ <p class="lr-card-label">Context</p>
94
+ <h3>Where requirements come from</h3>
95
+ <p><code>--using</code>, frontmatter, the owning Lake project, or automatic discovery — in that order.</p>
96
+ </article>
97
+ <article>
98
+ <p class="lr-card-label">Environment</p>
99
+ <h3>One exact, immutable set</h3>
100
+ <p>A toolchain plus every package at a pinned revision. Identified by content, never by a mutable tag.</p>
101
+ </article>
102
+ <article>
103
+ <p class="lr-card-label">Lock</p>
104
+ <h3>An environment written down</h3>
105
+ <p>Reusable on any machine, including with network access disabled.</p>
106
+ </article>
107
+ <article>
108
+ <p class="lr-card-label">Verdict</p>
109
+ <h3>Lean's answer</h3>
110
+ <p><code>accepted</code> or <code>rejected</code>, always inside one named environment. A rejection is a normal result.</p>
111
+ </article>
112
+ </div>
113
+ <p class="lr-lead"><strong>Discovery proposes an environment. Only Lean accepts it.</strong> <code>status</code> shows the proposal; <code>check</code> produces the verdict.</p>
114
+ </section>
115
+
86
116
  <section class="lr-workflows" aria-labelledby="workflows-title">
87
117
  <div class="lr-section-heading">
88
118
  <p class="lr-kicker">Workflows</p>
@@ -0,0 +1,110 @@
1
+ # Commands
2
+
3
+ This page summarizes the command surface. Run `lean-runtime COMMAND --help` for the installed version's complete arguments and options.
4
+
5
+ ## The model
6
+
7
+ | Noun | Meaning |
8
+ | --- | --- |
9
+ | context | Where a file's requirements come from: `--using`, frontmatter, the owning Lake project, or automatic discovery. |
10
+ | environment | One exact, immutable toolchain + package set. |
11
+ | lock | An environment written down, reusable offline anywhere. |
12
+ | verdict | Lean's answer inside one environment: `accepted` or `rejected`. |
13
+
14
+ Discovery proposes an environment. Only Lean accepts it. `status` shows the
15
+ proposal; `check` produces the verdict.
16
+
17
+ ## Daily workflows
18
+
19
+ | Command | Purpose |
20
+ | --- | --- |
21
+ | `new NAME` | Create a Lean project. |
22
+ | `adopt [PATH]` | Register existing Lake projects and prepare shared dependency storage. |
23
+ | `check [PATH ...]` | Check a project or Lean source with a discovered or explicit environment. |
24
+ | `watch FILE` | Recheck one project file when it changes. |
25
+ | `build [TARGET ...]` | Build the current Lake project. |
26
+ | `update [PATH]` | Apply the latest cataloged Mathlib/toolchain update; non-Mathlib projects are a no-op. |
27
+ | `publish [PATH]` | Configure project publication. |
28
+
29
+ ## Inspection and maintenance
30
+
31
+ | Command | Purpose |
32
+ | --- | --- |
33
+ | `status [SUBJECT]` | Dry run of `check`: the context source, its confidence, the environments discovery would try, and whether a download is needed. `--probe` prices the first download. |
34
+ | `verify SUBJECT` | Verify a lock, environment, or artifact. |
35
+ | `doctor` | Diagnose the local installation and configuration. |
36
+ | `clean` | Preview and reclaim unused runtime storage. |
37
+ | `replay CAPTURE` | Replay an execution capture. |
38
+ | `completion SHELL` | Generate shell completion. |
39
+
40
+ ## Advanced namespaces
41
+
42
+ | Namespace | Scope |
43
+ | --- | --- |
44
+ | `env` | Exact immutable environments and locks. |
45
+ | `project` | Mutable project inspection, sharing, locks, and exports. |
46
+ | `toolchain` | Toolchain installation, inspection, optimization, and publication. |
47
+ | `storage` | Storage usage and verification; see [Storage](storage.md). |
48
+ | `program` | Ready-to-run program artifacts. |
49
+ | `catalog` | Discovery catalog maintenance. |
50
+
51
+ ## Common check options
52
+
53
+ ```console
54
+ lean-runtime check Main.lean
55
+ lean-runtime check Main.lean --json
56
+ lean-runtime check Main.lean --timings
57
+ lean-runtime check Main.lean --repeat 10
58
+ lean-runtime check Main.lean --write-lock environment.lock.json
59
+ lean-runtime check - --using leanprover/lean4:v4.33.0
60
+ ```
61
+
62
+ `-` reads Lean source from standard input and requires an explicit environment.
63
+
64
+ Automatic discovery is the normal standalone workflow. `--using` selects the
65
+ environment explicitly when a package release, lock, toolchain, stored
66
+ environment, or project is specifically required. `--offline` prevents
67
+ acquisition and therefore needs the selected content to be retained locally.
68
+
69
+ `--allow-source-build` permits standalone discovery to build an environment from source when no suitable acquired form is available.
70
+
71
+ ## Commands that change things
72
+
73
+ Commands that change a project, delete local content, or push to a remote
74
+ describe the change first and apply it only with `--yes` or an interactive
75
+ confirmation. Most also accept `--dry-run`. Non-interactive runs without
76
+ `--yes` exit with code `2` and change nothing. See
77
+ [Trust](../trust.md#which-commands-change-what) for the full list.
78
+
79
+ ## Machine output
80
+
81
+ Every command that accepts `--json` writes exactly one JSON envelope to
82
+ standard output — never an empty stream — and exits non-zero on failure:
83
+
84
+ ```json
85
+ {"schema": "lean-runtime.execution/v1", "ok": true, "data": {...}, "warnings": [], "errors": []}
86
+ ```
87
+
88
+ Schemas ship with the package (`lean_runtime.schema_path(NAME)`):
89
+ `execution`, `check-batch`, `matrix`, `profile`, `plan`, `status`, `verify`,
90
+ `comparison`, `inspect`, `cleanup`, `publication`, and `attestation`, each
91
+ suffixed `-v1.schema.json`. An execution result carries `data.verdict`
92
+ (`accepted`, `rejected`, or `not_run`) in addition to `data.ok`.
93
+
94
+ ## Build cache control
95
+
96
+ ```console
97
+ lean-runtime build
98
+ lean-runtime build --no-cache
99
+ ```
100
+
101
+ The default build may restore supported dependency artifacts before invoking Lake. `--no-cache` skips that restoration step.
102
+
103
+ ## Exit codes for check
104
+
105
+ | Code | Verdict | Meaning |
106
+ | --- | --- | --- |
107
+ | `0` | `accepted` | Lean accepted the source. |
108
+ | `1` | `rejected` | Lean ran and rejected the source. |
109
+ | `2` | none | Invocation, context, acquisition, or configuration failed, or a resource limit such as `--timeout` was hit. |
110
+ | `130` | none | Interrupted. |
@@ -53,6 +53,11 @@ result = lean.check_file("./my-project/MyProject/Basic.lean")
53
53
 
54
54
  ## Read the result
55
55
 
56
+ `result.verdict` is Lean's answer inside the environment that ran: `accepted`,
57
+ `rejected`, or `not_run` when a timeout or cancellation cut the run short and
58
+ no verdict exists. `result.ok` is true only for `accepted`. A rejection is a
59
+ normal result, not an exception.
60
+
56
61
  Failed checks expose parsed diagnostics directly:
57
62
 
58
63
  ```python
@@ -5,11 +5,15 @@ Lean Runtime records exact identities, verifies retained content, and reports th
5
5
  ## What it establishes
6
6
 
7
7
  - Exact package revisions and Git tree identities in environment locks
8
- - Toolchain identity
8
+ - Toolchain identity, and the Elan build that automatic bootstrap installs
9
+ (pinned version, SHA-256 verified)
9
10
  - Content digests for retained and transferred artifacts
10
11
  - Platform compatibility metadata
11
- - Execution provenance for completed checks
12
- - Compiler acceptance or rejection for the source that ran
12
+ - Execution provenance for completed checks, including `source_digest`, the
13
+ digest of the bytes Lean actually checked, and the environment and lock
14
+ identities it ran in
15
+ - Compiler acceptance or rejection for the source that ran, reported as a
16
+ `verdict` attributed to one exact environment
13
17
 
14
18
  ## What it does not establish
15
19
 
@@ -19,9 +23,29 @@ Lean Runtime records exact identities, verifies retained content, and reports th
19
23
  - That a Lake build script is safe to execute
20
24
  - That package code cannot access the host system
21
25
  - That integrity verification provides process isolation
26
+ - That a discovery proposal is compatible before Lean has accepted the file in it
22
27
 
23
28
  Lake packages and build scripts can execute code during acquisition or compilation. Treat unfamiliar dependencies as code you are about to run on your machine.
24
29
 
30
+ ## Which commands change what
31
+
32
+ `check`, `status`, `verify`, `doctor`, and the inspection commands read your
33
+ project and may add toolchains, environments, and caches under the runtime home
34
+ (`LEAN_RUNTIME_HOME`). They never modify your project directory.
35
+
36
+ Commands that change a project, delete local content, or push to a remote follow
37
+ one rule: they describe the change first and apply it only with `--yes` or an
38
+ interactive confirmation.
39
+
40
+ | Command | Changes |
41
+ | --- | --- |
42
+ | `new`, `adopt`, `update`, `publish`, `project share`, `project unshare` | Your project directory |
43
+ | `clean`, `doctor` repairs, `toolchain optimize --prune-original` | Local content under the runtime home |
44
+ | `env publish`, `toolchain publish`, `program publish`, `declaration-index publish` | A remote library |
45
+
46
+ In a non-interactive session these commands exit with code `2` unless `--yes`
47
+ is given, so a script can never mutate or publish by accident.
48
+
25
49
  ## Verify retained content
26
50
 
27
51
  ```console