lean-pkg 0.30.1__tar.gz → 0.30.3__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 (350) hide show
  1. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/CHANGELOG.md +63 -0
  2. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/CITATION.cff +8 -2
  3. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/PKG-INFO +1 -1
  4. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/README.md +1 -1
  5. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/pyproject.toml +1 -1
  6. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/__init__.py +1 -1
  7. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/cli.py +3 -3
  8. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/comparator_config.py +11 -4
  9. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/core.py +40 -1
  10. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/coverage.py +57 -12
  11. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/lean_scan.py +20 -2
  12. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/page.py +57 -5
  13. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg.egg-info/PKG-INFO +1 -1
  14. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg.egg-info/SOURCES.txt +1 -0
  15. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_core_split.py +5 -2
  16. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_coverage_accounted.py +88 -0
  17. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_docs.py +2 -0
  18. lean_pkg-0.30.3/tests/test_render_cache.py +83 -0
  19. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_smoke_configs.py +24 -0
  20. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_verify_preflight.py +57 -0
  21. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/LICENSE +0 -0
  22. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/MANIFEST.in +0 -0
  23. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/PYPI.md +0 -0
  24. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/setup.cfg +0 -0
  25. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/adapters/__init__.py +0 -0
  26. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/adapters/github.py +0 -0
  27. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/adapters/leansearch.py +0 -0
  28. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/adapters/loogle.py +0 -0
  29. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/adapters/palomar.py +0 -0
  30. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/adapters/reservoir.py +0 -0
  31. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/anchor.py +0 -0
  32. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/audit.py +0 -0
  33. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/binding_file.py +0 -0
  34. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/blueprint.py +0 -0
  35. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/build_scope.py +0 -0
  36. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/ci_github.py +0 -0
  37. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/claim_axioms.py +0 -0
  38. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/claims.py +0 -0
  39. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/claims_mark.py +0 -0
  40. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/cli_parser.py +0 -0
  41. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/command_tree.py +0 -0
  42. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/comparator_contracts.py +0 -0
  43. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/comparator_receipt.py +0 -0
  44. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/comparator_stage.py +0 -0
  45. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/comparator_types.py +0 -0
  46. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/container.py +0 -0
  47. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/controls.py +0 -0
  48. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/data/stacks/lts-2026.10.yaml +0 -0
  49. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/data/toolchain-advisories.yaml +0 -0
  50. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/data/upgrade-breaking.yaml +0 -0
  51. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/data/verify-workflow-pins.yaml +0 -0
  52. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/deps_closure.py +0 -0
  53. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/deps_fill.py +0 -0
  54. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/dup_constants.py +0 -0
  55. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/exercise.py +0 -0
  56. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/exercise_forbid.py +0 -0
  57. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/export_paths.py +0 -0
  58. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/extract.py +0 -0
  59. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/extract_decls.py +0 -0
  60. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/extract_ledger.py +0 -0
  61. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/extract_summary.py +0 -0
  62. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/extract_types.py +0 -0
  63. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/extract_write.py +0 -0
  64. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/formalization.py +0 -0
  65. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/formalization_kept.py +0 -0
  66. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/fresh_repo.py +0 -0
  67. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/gate.py +0 -0
  68. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/headline.py +0 -0
  69. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/help_topics.py +0 -0
  70. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/holes.py +0 -0
  71. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/host_routes.py +0 -0
  72. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/html_blocks.py +0 -0
  73. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/hypotheses.py +0 -0
  74. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/index.py +0 -0
  75. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/json_stdout.py +0 -0
  76. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/lake_hygiene.py +0 -0
  77. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/lean_diag.py +0 -0
  78. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/ledger.py +0 -0
  79. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/next_step.py +0 -0
  80. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/page_html.py +0 -0
  81. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/palomar.py +0 -0
  82. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/palomar_check.py +0 -0
  83. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/port_modules.py +0 -0
  84. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/prior_art.py +0 -0
  85. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/producer.py +0 -0
  86. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/producer_skew.py +0 -0
  87. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/public_safety.py +0 -0
  88. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/publish.py +0 -0
  89. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/rebase.py +0 -0
  90. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/receipt.py +0 -0
  91. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/receipt_check.py +0 -0
  92. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/receipt_ci.py +0 -0
  93. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/receipt_systemd.py +0 -0
  94. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/recommended.py +0 -0
  95. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/report.py +0 -0
  96. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/reservoir.py +0 -0
  97. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/scaffold.py +0 -0
  98. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/schemas/formalization-0.4.schema.json +0 -0
  99. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/schemas/formalization-0.4.schema.source.txt +0 -0
  100. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/scripts/ClaimAxioms.lean +0 -0
  101. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/scripts/ContractsOnly.lean +0 -0
  102. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/scripts/ControlsProbe.lean +0 -0
  103. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/scripts/DupConstants.lean +0 -0
  104. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/scripts/HypProbe.lean +0 -0
  105. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/scripts/comparator-check.sh +0 -0
  106. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/scripts/verify-comparator.sh +0 -0
  107. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/seal_bundle.py +0 -0
  108. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/search.py +0 -0
  109. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/site_check.py +0 -0
  110. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/site_profiles/easley.yaml +0 -0
  111. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/site_profiles/github-actions.yaml +0 -0
  112. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/sites.py +0 -0
  113. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/stacks.py +0 -0
  114. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/statements_module.py +0 -0
  115. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/templates/Apache-2.0.txt +0 -0
  116. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/toolchain_advisories.py +0 -0
  117. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/upgrade.py +0 -0
  118. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg/verify.py +0 -0
  119. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg.egg-info/dependency_links.txt +0 -0
  120. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg.egg-info/entry_points.txt +0 -0
  121. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg.egg-info/requires.txt +0 -0
  122. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/src/lean_pkg.egg-info/top_level.txt +0 -0
  123. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_adapters.py +0 -0
  124. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_append_note.py +0 -0
  125. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_audit_claims_coverage.py +0 -0
  126. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_audit_gh_outcomes.py +0 -0
  127. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_audit_missing_path.py +0 -0
  128. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_audit_no_github_mirror.py +0 -0
  129. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_audit_palomar.py +0 -0
  130. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_audit_receipts_paths.py +0 -0
  131. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_audit_reference_branch.py +0 -0
  132. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_binding_file.py +0 -0
  133. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_binding_file_g3.py +0 -0
  134. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_blueprint_check.py +0 -0
  135. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_bootstrap_collaborator.py +0 -0
  136. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_branch_notice.py +0 -0
  137. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_campaign_recovery_docs.py +0 -0
  138. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_check_changelog_releases.py +0 -0
  139. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_ci_attested.py +0 -0
  140. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_ci_comparator.py +0 -0
  141. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_ci_corroborate.py +0 -0
  142. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_ci_receipt_level1.py +0 -0
  143. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_claim_axioms.py +0 -0
  144. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_claims.py +0 -0
  145. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_claims_ledger.py +0 -0
  146. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_claims_mark.py +0 -0
  147. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_claims_rebase.py +0 -0
  148. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_cli.py +0 -0
  149. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_cli_consistency.py +0 -0
  150. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_cli_contract_argv.py +0 -0
  151. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_cli_contract_corpus.py +0 -0
  152. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_cli_contract_help.py +0 -0
  153. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_cli_contract_json.py +0 -0
  154. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_cli_contract_names.py +0 -0
  155. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_columns.py +0 -0
  156. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_command_docs.py +0 -0
  157. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_command_tree_stage2.py +0 -0
  158. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_commit.py +0 -0
  159. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator.py +0 -0
  160. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_attempts.py +0 -0
  161. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_config.py +0 -0
  162. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_contracts.py +0 -0
  163. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_coverage.py +0 -0
  164. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_evidence_dir.py +0 -0
  165. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_host_label.py +0 -0
  166. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_list_defaults.py +0 -0
  167. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_log_transport.py +0 -0
  168. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_mismatch_next.py +0 -0
  169. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_name_hints.py +0 -0
  170. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_no_mathlib.py +0 -0
  171. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_readiness.py +0 -0
  172. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_receipt.py +0 -0
  173. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_replace.py +0 -0
  174. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_repo_claims_file.py +0 -0
  175. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_sacct_seal.py +0 -0
  176. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_stage.py +0 -0
  177. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_tool_toolchain.py +0 -0
  178. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_types.py +0 -0
  179. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_comparator_types_deep.py +0 -0
  180. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_compressed_log_bindings.py +0 -0
  181. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_conditional_claims.py +0 -0
  182. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_conditional_closeout.py +0 -0
  183. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_conditional_outputs.py +0 -0
  184. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_consent_dedupe.py +0 -0
  185. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_controls.py +0 -0
  186. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_coverage_conclusion.py +0 -0
  187. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_coverage_extensions.py +0 -0
  188. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_coverage_offline.py +0 -0
  189. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_coverage_witness.py +0 -0
  190. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_cut_release.py +0 -0
  191. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_defaults.py +0 -0
  192. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_docs_classifier_preflight.py +0 -0
  193. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_docs_descendants.py +0 -0
  194. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_docs_old_spellings.py +0 -0
  195. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_doctor.py +0 -0
  196. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_dup_constants.py +0 -0
  197. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_evidence_formalization.py +0 -0
  198. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_exercise.py +0 -0
  199. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_exercise_course.py +0 -0
  200. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_extract_decls.py +0 -0
  201. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_extract_ledger.py +0 -0
  202. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_extract_plan.py +0 -0
  203. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_extract_summary.py +0 -0
  204. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_extract_types.py +0 -0
  205. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_fields_only.py +0 -0
  206. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_formalization.py +0 -0
  207. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_formalization_anchor.py +0 -0
  208. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_formalization_kept.py +0 -0
  209. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_formalization_refresh.py +0 -0
  210. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_formats.py +0 -0
  211. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_fresh_repo.py +0 -0
  212. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate.py +0 -0
  213. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate_binding.py +0 -0
  214. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate_binding_scope.py +0 -0
  215. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate_check.py +0 -0
  216. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate_check_next.py +0 -0
  217. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate_claims.py +0 -0
  218. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate_pins.py +0 -0
  219. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate_receipt_path.py +0 -0
  220. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate_refresh.py +0 -0
  221. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_gate_regate.py +0 -0
  222. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_headline.py +0 -0
  223. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_help_topics.py +0 -0
  224. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_hints_and_time.py +0 -0
  225. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_host_check.py +0 -0
  226. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_host_routes.py +0 -0
  227. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_hypotheses_ledger.py +0 -0
  228. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_hypotheses_probe.py +0 -0
  229. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_ignored_evidence.py +0 -0
  230. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_index_add.py +0 -0
  231. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_index_built_on.py +0 -0
  232. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_index_check.py +0 -0
  233. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_index_claims.py +0 -0
  234. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_index_docs_descendants.py +0 -0
  235. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_index_render.py +0 -0
  236. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_index_schema.py +0 -0
  237. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_init.py +0 -0
  238. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_input_hygiene.py +0 -0
  239. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_internal_claims.py +0 -0
  240. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_json.py +0 -0
  241. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_json_control_chars.py +0 -0
  242. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_json_stdout.py +0 -0
  243. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_judged_as.py +0 -0
  244. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_lake_cache_systemd.py +0 -0
  245. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_lake_hygiene.py +0 -0
  246. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_large_artifacts_recipe.py +0 -0
  247. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_lean_diag.py +0 -0
  248. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_lean_scan_extract.py +0 -0
  249. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_lease.py +0 -0
  250. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_lease_actor.py +0 -0
  251. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_lease_expiry_notice.py +0 -0
  252. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_lease_registry_stamp.py +0 -0
  253. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_ledger_exact_covers.py +0 -0
  254. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_ledger_golden.py +0 -0
  255. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_lifecycle_notes.py +0 -0
  256. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_llms.py +0 -0
  257. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_locking.py +0 -0
  258. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_manuscript_findings.py +0 -0
  259. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_mathlib_none.py +0 -0
  260. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_migrate.py +0 -0
  261. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_migrate_v3.py +0 -0
  262. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_namespace_notes.py +0 -0
  263. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_new.py +0 -0
  264. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_next.py +0 -0
  265. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_noninteractive.py +0 -0
  266. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_olean_manifest.py +0 -0
  267. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_outputs_golden.py +0 -0
  268. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_package_fields.py +0 -0
  269. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_packaging.py +0 -0
  270. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_page.py +0 -0
  271. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_page_repo_head.py +0 -0
  272. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_page_site.py +0 -0
  273. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_palomar_check.py +0 -0
  274. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_palomar_prepare.py +0 -0
  275. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_palomar_snapshot.py +0 -0
  276. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_paper.py +0 -0
  277. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_port_modules.py +0 -0
  278. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_prior_art.py +0 -0
  279. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_producer_skew.py +0 -0
  280. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_promote_audit.py +0 -0
  281. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_promote_scope.py +0 -0
  282. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_public_allow.py +0 -0
  283. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_public_safety.py +0 -0
  284. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_public_safety_gzip.py +0 -0
  285. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_public_safety_long_line_stream.py +0 -0
  286. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_public_safety_scope.py +0 -0
  287. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_publication_hold.py +0 -0
  288. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_publish.py +0 -0
  289. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_check.py +0 -0
  290. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_check_opt_in.py +0 -0
  291. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_ci.py +0 -0
  292. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_container.py +0 -0
  293. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_private_scan.py +0 -0
  294. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_producer.py +0 -0
  295. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_slurm.py +0 -0
  296. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_slurm_artifacts.py +0 -0
  297. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_slurm_contracts_preflight.py +0 -0
  298. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_slurm_fill_plan.py +0 -0
  299. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_slurm_preflight_deps.py +0 -0
  300. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_slurm_runtime_preflight.py +0 -0
  301. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_slurm_sacct_seal.py +0 -0
  302. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_slurm_template_src.py +0 -0
  303. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_subdir_package.py +0 -0
  304. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_receipt_systemd.py +0 -0
  305. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_recommended.py +0 -0
  306. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_record.py +0 -0
  307. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_record_evidence.py +0 -0
  308. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_record_transitions.py +0 -0
  309. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_refresh_descendant.py +0 -0
  310. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_register.py +0 -0
  311. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_registry_core.py +0 -0
  312. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_registry_snapshot.py +0 -0
  313. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_release_script.py +0 -0
  314. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_release_version.py +0 -0
  315. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_repo_override.py +0 -0
  316. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_report.py +0 -0
  317. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_report_log_required.py +0 -0
  318. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_reservoir_check.py +0 -0
  319. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_review_fixes_prior_art.py +0 -0
  320. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_robustness.py +0 -0
  321. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_seal_bundle.py +0 -0
  322. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_search.py +0 -0
  323. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_search_completeness.py +0 -0
  324. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_search_declarations.py +0 -0
  325. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_search_field_coverage.py +0 -0
  326. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_search_scan.py +0 -0
  327. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_search_sources.py +0 -0
  328. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_sibling_packages.py +0 -0
  329. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_signoff_sidecar.py +0 -0
  330. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_site_check.py +0 -0
  331. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_sites.py +0 -0
  332. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_skills.py +0 -0
  333. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_source_paper_ai.py +0 -0
  334. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_stack_opt_in.py +0 -0
  335. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_stacks.py +0 -0
  336. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_statements_module.py +0 -0
  337. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_status_scope.py +0 -0
  338. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_subdir_package.py +0 -0
  339. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_template_module_headers.py +0 -0
  340. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_toolchain_advisories.py +0 -0
  341. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_toolchain_floor.py +0 -0
  342. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_trust.py +0 -0
  343. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_update_publication_fields.py +0 -0
  344. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_update_relocate.py +0 -0
  345. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_upgrade.py +0 -0
  346. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_user_default.py +0 -0
  347. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_validate.py +0 -0
  348. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_verdict_first.py +0 -0
  349. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_verify_workflow_oidc.py +0 -0
  350. {lean_pkg-0.30.1 → lean_pkg-0.30.3}/tests/test_wiki.py +0 -0
@@ -9,6 +9,67 @@ full policy, and the criteria for 1.0.0, are in RELEASING.md, "When to tag".
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.30.3] - 2026-12-04
13
+
14
+ ### Changed
15
+
16
+ - `verify`'s preflight accepts a compared theorem that is the declaration
17
+ of an `internal` or `reusable` claim Lean generates (a structure field,
18
+ an `@[ext]` lemma) when the gate receipt committed at `HEAD` read it
19
+ from the built environment (its `claim_axioms`), as `coverage check
20
+ NAME`, `page --check` and `receipt check` have since 0.30.2 (#465). The
21
+ preflight runs before the build and read only the claims' files, so a
22
+ field report's 106 generated helper declarations stopped `verify`
23
+ unless their configuration was marked as a smoke check. The check's
24
+ line names the receipt it relied on; `coverage check --file` is
25
+ unchanged.
26
+
27
+ public-safety (make public-safety, --strict, history): 0 hit(s) (0 tree, 0 history); 0 blocking, 0 warning(s)
28
+
29
+ ## [0.30.2] - 2026-12-02
30
+
31
+ ### Changed
32
+
33
+ - `coverage check` (rule R11), `page --check` and `receipt check` accept a
34
+ compared theorem that is the declaration of an `internal` or `reusable`
35
+ claim Lean generates (a structure field, an `@[ext]` lemma) when the
36
+ gate receipt's `claim_axioms` read that declaration from the built
37
+ environment (#463). R11 read only the claim's file, where no line states
38
+ such a declaration: 106 helper theorems of a field report were refused.
39
+ The offline form (`--file`, `verify`'s preflight) has no receipt and is
40
+ unchanged.
41
+
42
+ ### Fixed
43
+
44
+ - The page's smoke-check line no longer says that the smoke theorems
45
+ "state nothing of this package" when some of them name claims of the
46
+ package (a configuration of the package's own helper claims marked as a
47
+ smoke check, 3,270 theorems in a field report): it says how many name
48
+ claims and that a smoke check credits no claim (#462). Counted by name,
49
+ so a declaration Lean generates counts too.
50
+ - `page` (and `site check`, `publish`, which render the page) no longer
51
+ takes hours on a large package (#464). One render read the same files
52
+ and scanned the same Lean text for every claim, and recomputed the
53
+ judged_as names of every claim per theorem: a 6,632-claim companion's
54
+ `page --site` was stopped after 5 h. A render now reads each file and
55
+ scans each text once (`core.render_cache`, scoped to the render) and
56
+ computes the judged_as names once: that page renders in 6 min 45 s, and
57
+ a 268-claim one in 38 s instead of 563 s. Every output is byte-identical.
58
+
59
+ ### Documentation
60
+
61
+ - docs/upgrades/0.30.1: the record of docs-only PR #458 gains its `# Docs:`
62
+ line and the sentence that it was read for this record, which were
63
+ missing at the cut (#460). A documented change to a released page:
64
+ RELEASING.md, "Released records", and a pin in the test.
65
+ - Proposal 0016 (draft): a summary README page block that links the full
66
+ page, chosen in `coverage.yaml`, for companions whose full page is too
67
+ large for a README (#461).
68
+
69
+ public-safety (make public-safety, --strict, history): 0 hit(s) (0 tree, 0 history); 0 blocking, 0 warning(s)
70
+
71
+ Zenodo version DOI: [10.5281/zenodo.24762717](https://doi.org/10.5281/zenodo.24762717)
72
+
12
73
  ## [0.30.1] - 2026-11-30
13
74
 
14
75
  ### Changed
@@ -31,6 +92,8 @@ full policy, and the criteria for 1.0.0, are in RELEASING.md, "When to tag".
31
92
 
32
93
  public-safety (make public-safety, --strict, history): 0 hit(s) (0 tree, 0 history); 0 blocking, 0 warning(s)
33
94
 
95
+ Zenodo version DOI: [10.5281/zenodo.24690284](https://doi.org/10.5281/zenodo.24690284)
96
+
34
97
  ## [0.30.0] - 2026-11-21
35
98
 
36
99
  ### Added
@@ -6,8 +6,8 @@ authors:
6
6
  - family-names: Chen
7
7
  given-names: Le
8
8
  affiliation: "Auburn University"
9
- version: "0.30.1"
10
- date-released: "2026-11-30"
9
+ version: "0.30.3"
10
+ date-released: "2026-12-04"
11
11
  license: Apache-2.0
12
12
  repository-code: "https://github.com/lean-pkg/lean-pkg"
13
13
  doi: 10.5281/zenodo.23272098
@@ -213,6 +213,12 @@ identifiers:
213
213
  - type: doi
214
214
  value: 10.5281/zenodo.24432261
215
215
  description: Version DOI for 0.30.0
216
+ - type: doi
217
+ value: 10.5281/zenodo.24690284
218
+ description: Version DOI for 0.30.1
219
+ - type: doi
220
+ value: 10.5281/zenodo.24762717
221
+ description: Version DOI for 0.30.2
216
222
  url: "https://lean-pkg.github.io/lean-pkg/"
217
223
  keywords:
218
224
  - Lean 4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lean-pkg
3
- Version: 0.30.1
3
+ Version: 0.30.3
4
4
  Summary: Lifecycle registry and trust gate for Lean 4 formalization packages: leases, receipt-bound gates, comparator (Palomar) evidence, one-way promotion.
5
5
  Author: Le Chen
6
6
  License-Expression: Apache-2.0
@@ -365,7 +365,7 @@ DOIs. To cite a state between releases, cite the repository at a commit:
365
365
  author = {Chen, Le},
366
366
  title = {lean-pkg: a registry and trust gate for Lean 4 formalization packages},
367
367
  year = {2026},
368
- version = {0.30.1},
368
+ version = {0.30.3},
369
369
  url = {https://github.com/lean-pkg/lean-pkg},
370
370
  note = {commit <sha>}
371
371
  }
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lean-pkg"
7
- version = "0.30.1"
7
+ version = "0.30.3"
8
8
  description = "Lifecycle registry and trust gate for Lean 4 formalization packages: leases, receipt-bound gates, comparator (Palomar) evidence, one-way promotion."
9
9
  # PyPI renders the long description without the repository around it, so README.md's relative links and
10
10
  # images would break there: PYPI.md is a short page whose links are all absolute (tests/test_packaging.py).
@@ -1,3 +1,3 @@
1
1
  """lean-pkg: lifecycle registry and trust gate for Lean 4 formalization packages."""
2
2
 
3
- __version__ = "0.30.1"
3
+ __version__ = "0.30.3"
@@ -147,7 +147,7 @@ from .core import ( # noqa: F401 re-exports, one release (#317)
147
147
  event_line_problems, EVENT_LINE_VERSION, event_line_version, _event_log_problem, EVENTS_ENV, EVENTS_NAME,
148
148
  events_path, events_source, EVIDENCE_EVENTS, evidence_symlinks, Fail, find_reuse, _fingerprint,
149
149
  flush_events, formalization_rel, _GATE_EVENT_KEYS, get_pkg, gh, gh_nwo, git, git_env_set, git_head,
150
- GIT_REPO_ENV, _git_show_bytes, git_show_bytes, GITHUB_URL_RE, _HEX40, HOME, _is_ancestor, is_evidence_path,
150
+ GIT_REPO_ENV, _git_show_bytes, git_show_bytes, _git_show_bytes_uncached, GITHUB_URL_RE, _HEX40, HOME, _is_ancestor, is_evidence_path,
151
151
  is_naive_ts, lake_artifact, LAKE_ARTIFACT_SUFFIXES, LEAN_LIB_RE, lean_pkg_home, LEAN_PKG_HOME_ENV,
152
152
  lean_root_namespaces, lease_actor, LEASE_CONTACT_MAX, _LEASE_EVENT_KEYS, lease_expiry,
153
153
  lease_expiry_or_none, LEASE_FIELDS, lease_invalid, lease_live, lease_live_or_none, LEASE_OPTIONAL_FIELDS,
@@ -161,7 +161,7 @@ from .core import ( # noqa: F401 re-exports, one release (#317)
161
161
  registry_home_dir, registry_lock, registry_not_found, registry_path, registry_snapshot_arg,
162
162
  registry_source, registry_behind_warning, registry_state, registry_state_of, registry_sync_counts, REGISTRY_VERSION, repo_path, report_preexisting, require_nonempty, REQUIRED_FIELDS,
163
163
  RESERVOIR_API, reservoir_listing_status, RESERVOIR_URL_RE, resolve_tree_path, _RESOLVED_SOURCE,
164
- RETRACT_EVENT, retracted_entries, _rev, RULE_HINTS, run, save_registry, scrubbed_env, sha256_bytes,
164
+ render_cache, render_memo, RETRACT_EVENT, retracted_entries, _rev, RULE_HINTS, run, save_registry, scrubbed_env, sha256_bytes,
165
165
  SNAPSHOT_ENV, SNAPSHOT_REFUSAL, split_new_errors, STATUSES, SUPPORTED_REGISTRY_VERSIONS, symlink_targets,
166
166
  tracked_at, TRACKS, _umask, under_any, UPDATABLE, UPDATED_FROM_FIELDS, UPSTREAM_TARGETS, UsageError,
167
167
  user_default_registry, utc_today, V2_PACKAGE_DEFAULTS, V3_PACKAGE_DEFAULTS, VISIBILITIES, warn_lease,
@@ -172,7 +172,7 @@ from . import core as _core
172
172
  # Names core.py rebinds at run time (a `global` statement there): a re-export above would keep the first
173
173
  # object, so lean_pkg.cli reads them from core.py on every access instead (PEP 562 module __getattr__).
174
174
  # tests/test_core_split.py keeps this tuple equal to the `global` statements in core.py.
175
- _CORE_REBOUND = ("_LOADED_PACKAGES",)
175
+ _CORE_REBOUND = ("_LOADED_PACKAGES", "_RENDER_MEMO")
176
176
 
177
177
 
178
178
  def __getattr__(name: str):
@@ -65,12 +65,18 @@ def scaffold_todo_names(cfg: dict, rel: str | None = None, sidecar: dict | None
65
65
 
66
66
 
67
67
  def _components(name: str) -> list[str] | None:
68
- """A Lean name's components, a «quoted» plain identifier unquoted (`«foo»` is `foo`); None when malformed."""
68
+ """A Lean name's components, a «quoted» plain identifier unquoted (`«foo»` is `foo`); None when malformed.
69
+ Memoized inside core.render_cache (the naming rule splits the same names for every claim)."""
70
+ parts = core.render_memo("comparator_config._components", str(name), lambda: _components_tuple(name))
71
+ return None if parts is None else list(parts)
72
+
73
+
74
+ def _components_tuple(name: str) -> tuple[str, ...] | None:
69
75
  parts = lean_scan.split_name(str(name).strip())
70
76
  if parts is None:
71
77
  return None
72
- return [p[1:-1] if p.startswith("«") and re.fullmatch(r"«[A-Za-z_][A-Za-z0-9_'!?]*»", p) else p
73
- for p in parts]
78
+ return tuple(p[1:-1] if p.startswith("«") and re.fullmatch(r"«[A-Za-z_][A-Za-z0-9_'!?]*»", p) else p
79
+ for p in parts)
74
80
 
75
81
 
76
82
  def qualified_decls(read_file, claims: list[dict]) -> set[str]:
@@ -431,12 +437,13 @@ def do_config_from_claims(reg: dict, name: str, out: str, dry_run: bool, namespa
431
437
  existing = skipped = 0
432
438
  added: list[dict] = []
433
439
  sources: list[dict] = []
440
+ mapped = mapped_names(claims) # once, not per claim: it reads every claim
434
441
  for c in claims:
435
442
  decl, cid = str(c.get("decl") or ""), str(c.get("id") or "")
436
443
  if c.get("kind") not in CLAIM_KINDS or c.get("status") == "superseded" or not decl:
437
444
  skipped += 1
438
445
  continue
439
- if claim_covered(configured, c, qualified, mapped_names(claims)) or f"{ns}.{decl}" in configured \
446
+ if claim_covered(configured, c, qualified, mapped) or f"{ns}.{decl}" in configured \
440
447
  or cid in todo_claims:
441
448
  existing += 1
442
449
  continue
@@ -1587,10 +1587,49 @@ def sha256_bytes(b: bytes) -> str:
1587
1587
  return hashlib.sha256(b).hexdigest()
1588
1588
 
1589
1589
 
1590
+ # One render's memo (render_cache): None outside a render, so a long-lived process (the test suite, a
1591
+ # library caller) keeps nothing between renders. A field report: a 6,632-claim companion's page --site did
1592
+ # not finish in 5 h, recomputing the same pure results; with them memoized, about 9 minutes.
1593
+ _RENDER_MEMO: dict | None = None
1594
+
1595
+
1596
+ @contextlib.contextmanager
1597
+ def render_cache():
1598
+ """Memoize, for one page render, the reads and scans it repeats: git_show_bytes, lean_scan._mask and
1599
+ lean_scan.declarations, comparator_config._components. Each is a function of its arguments while the
1600
+ render runs (it commits nothing, so HEAD stays put). Nested scopes share the outermost memo."""
1601
+ global _RENDER_MEMO
1602
+ outer = _RENDER_MEMO
1603
+ if outer is None:
1604
+ _RENDER_MEMO = {}
1605
+ try:
1606
+ yield
1607
+ finally:
1608
+ if outer is None:
1609
+ _RENDER_MEMO = None
1610
+
1611
+
1612
+ def render_memo(kind: str, key, compute):
1613
+ """compute() once per (kind, key) inside render_cache; outside it, every call computes. The caller
1614
+ must return an immutable value or copy a mutable one."""
1615
+ memo = _RENDER_MEMO
1616
+ if memo is None:
1617
+ return compute()
1618
+ table = memo.setdefault(kind, {})
1619
+ if key not in table:
1620
+ table[key] = compute()
1621
+ return table[key]
1622
+
1623
+
1590
1624
  def git_show_bytes(repo: pathlib.Path, rel: str, rev: str = "HEAD") -> bytes | None:
1591
1625
  """Bytes of <rev>:<rel>, or None when the path is not tracked there. `rel` is relative to the
1592
1626
  package directory `repo`, which may be a subdirectory of its git repository: a bare `rel` is read
1593
- as `./rel` (git resolves a bare `<rev>:<path>` from the repository root, #21.2)."""
1627
+ as `./rel` (git resolves a bare `<rev>:<path>` from the repository root, #21.2). Memoized inside
1628
+ render_cache."""
1629
+ return render_memo("git_show_bytes", (str(repo), str(rel), str(rev)), lambda: _git_show_bytes_uncached(repo, rel, rev))
1630
+
1631
+
1632
+ def _git_show_bytes_uncached(repo: pathlib.Path, rel: str, rev: str) -> bytes | None:
1594
1633
  spec = rel if rel.startswith(("./", "../")) else f"./{rel}"
1595
1634
  p = subprocess.run(["git", "-C", str(repo), "show", f"{rev}:{spec}"],
1596
1635
  capture_output=True, env=scrubbed_env())
@@ -971,13 +971,14 @@ def check_against(doc: dict, claims: dict[str, dict], claims_rel: str, repo: pat
971
971
 
972
972
 
973
973
  def theorem_mapping_problems(doc: dict, claims: dict[str, dict], configs: list[dict], smoke, read_file,
974
- source: str) -> list[str]:
974
+ source: str, built: frozenset[str] | set[str] = frozenset()) -> list[str]:
975
975
  """R10/R11: every theorem of `configs` ({path, theorem_names} each) is the declaration of a claim some row
976
976
  names, or of a claim claims.yaml marks internal or reusable (ACCOUNTED_STATUSES: a supporting lemma the
977
977
  package declares as such needs no row), unless its configuration is a declared smoke check (its path in
978
978
  `smoke`), whose theorems must then name no claim a row names. `read_file(rel)` reads the claims' Lean files
979
- (a decl counts only when its file declares it: comparator_config.qualified_decls); `source` says where the
980
- configurations came from."""
979
+ (a decl counts only when its file declares it: comparator_config.qualified_decls, or when it is in `built`,
980
+ the decls the gate receipt's claim_axioms read from the built environment: built_decls); `source` says
981
+ where the configurations came from."""
981
982
  from . import comparator_config as cc
982
983
  errors: list[str] = []
983
984
  named = [(i, cid) for i, r in enumerate(doc["rows"]) for cid in r.get("claims") or [] if cid in claims]
@@ -987,6 +988,8 @@ def theorem_mapping_problems(doc: dict, claims: dict[str, dict], configs: list[d
987
988
  accounted = row_claims + [c for _cid, c in others if c.get("status") in ACCOUNTED_STATUSES]
988
989
  unaccounted = [(cid, c) for cid, c in others if c.get("status") not in ACCOUNTED_STATUSES]
989
990
  qualified = cc.qualified_decls(read_file, row_claims + [c for _cid, c in others])
991
+ # a declaration Lean generates (a structure field, an @[ext] lemma) is in no file's text, but the build has it
992
+ qualified |= {d for c in claims.values() for d in [str(c.get("decl") or "")] if d and d in built}
990
993
  decls = [(str(c.get("decl") or ""), str(c.get("decl") or "") in qualified) for c in accounted]
991
994
  mapped = cc.mapped_names(list(claims.values())) # a judged_as name judges its own claim only (#CM)
992
995
  for c in configs:
@@ -1019,6 +1022,27 @@ def theorem_mapping_problems(doc: dict, claims: dict[str, dict], configs: list[d
1019
1022
  return errors
1020
1023
 
1021
1024
 
1025
+ def built_decls(repo: pathlib.Path, lower: dict | None) -> frozenset[str]:
1026
+ """The claim decls the gate (lower-tier) receipt's claim_axioms read from the built environment: every
1027
+ decl of claims.yaml at the receipt's commit that is not in its `missing` list. The probe that writes the
1028
+ key must cover every claim of that claims.yaml (claim_axioms.judge refuses a log that skips one), so a decl
1029
+ counts only when the summary's `checked` agrees with that count. Empty when the receipt has no claim_axioms,
1030
+ names no commit, or anything does not add up: R11 then reads the claims' files alone, as before."""
1031
+ from . import claim_axioms
1032
+ ca = (lower or {}).get("claim_axioms")
1033
+ commit = str((lower or {}).get("commit") or "")
1034
+ if not isinstance(ca, dict) or not core._HEX40.fullmatch(commit):
1035
+ return frozenset()
1036
+ missing, checked = ca.get("missing"), ca.get("checked")
1037
+ if not isinstance(missing, list) or not isinstance(checked, int) or isinstance(checked, bool):
1038
+ return frozenset()
1039
+ required, problems = claim_axioms.required_claims(core.git_show_bytes(repo, "claims.yaml", commit))
1040
+ found = [d for d in required if d not in set(map(str, missing))]
1041
+ if problems or not required or checked != len(found):
1042
+ return frozenset()
1043
+ return frozenset(found)
1044
+
1045
+
1022
1046
  def scope_problems(pkg: dict, doc: dict, claims: dict[str, dict], repo: pathlib.Path) -> list[str]:
1023
1047
  """The lab's lean-scope-page rules that apply to a rendered page (docs/page.md#from-lean-scope-page):
1024
1048
  R8/R9, every claim a row names has its `file` committed at HEAD (the page links the declaration
@@ -1047,8 +1071,10 @@ def scope_problems(pkg: dict, doc: dict, claims: dict[str, dict], repo: pathlib.
1047
1071
  return errors
1048
1072
  smoke = cc.smoke_configs(repo, str(comp.get("commit") or "") if core._HEX40.fullmatch(
1049
1073
  str(comp.get("commit") or "")) else None, "HEAD")
1074
+ gate_rel = (pkg.get("gate") or {}).get("receipt")
1075
+ lower, _raw = receipt_at_head(repo, gate_rel) if gate_rel else (None, None)
1050
1076
  errors += theorem_mapping_problems(doc, claims, configs, smoke, claims_mod._reader(repo, "HEAD"),
1051
- "recorded comparator receipt")
1077
+ "recorded comparator receipt", built_decls(repo, lower))
1052
1078
  for c in configs:
1053
1079
  where = c.get("path") or "?"
1054
1080
  if where in smoke:
@@ -1117,13 +1143,16 @@ UNPOSTED_PROBLEM = ("manuscript.version: unposted: theorem numbers of a private
1117
1143
 
1118
1144
  def offline_check(text: str, where: str, *, claims_text: str | None = None, claims_where: str = "claims.yaml",
1119
1145
  configs: dict[str, bytes] | None = None, sidecar: dict | None = None, read_file=None,
1120
- profiles: dict | None = None, allow_private: bool = False, draft: bool = False) -> dict:
1146
+ profiles: dict | None = None, allow_private: bool = False, draft: bool = False,
1147
+ built: frozenset[str] = frozenset(), built_from: str = "") -> dict:
1121
1148
  """Every check of `coverage check` that needs no registry record and no receipt, on the coverage file's
1122
1149
  text: the coverage/1 schema and its length limits, the manuscript version, lean_pkg_version; with the
1123
1150
  claims file's text, its claims/1 schema, each row's claim ids (present, not superseded) and a warning for
1124
1151
  each reusable claim no row names; with comparator configurations ({path: bytes}), R10/R11 (each theorem
1125
1152
  the declaration of a claim a row names or of an internal or reusable claim; `sidecar` marks smoke
1126
- configurations; `read_file(rel)` reads the claims' Lean files, skipped when one is unreadable). draft (verify's preflight): placeholder text and an
1153
+ configurations; `read_file(rel)` reads the claims' Lean files, skipped when one is unreadable; `built`, the
1154
+ decls an earlier gate receipt's claim_axioms read from the built environment (built_decls), described by
1155
+ `built_from`). draft (verify's preflight): placeholder text and an
1127
1156
  unposted manuscript are warnings, not problems (`coverage check` and `page` still refuse them).
1128
1157
  {doc, errors, warnings, checks[{check, status pass|fail|warn|skipped, detail}], skipped[]}."""
1129
1158
  from . import claims as claims_mod
@@ -1221,15 +1250,16 @@ def offline_check(text: str, where: str, *, claims_text: str | None = None, clai
1221
1250
  else:
1222
1251
  _add("reusable claims", "pass", "every reusable claim is named by a row")
1223
1252
  _offline_comparator(_add, doc if valid else None, claims, configs, sidecar, read_file,
1224
- why_not if not valid else None, claims_text is None)
1253
+ why_not if not valid else None, claims_text is None, built, built_from)
1225
1254
  for check, why in OFFLINE_SKIPPED:
1226
1255
  _add(check, "skipped", why)
1227
1256
  return out
1228
1257
 
1229
1258
 
1230
1259
  def _offline_comparator(_add, doc, claims, configs, sidecar, read_file, invalid: str | None,
1231
- no_claims: bool) -> None:
1260
+ no_claims: bool, built: frozenset[str] = frozenset(), built_from: str = "") -> None:
1232
1261
  """The R10/R11 entry of offline_check."""
1262
+ from . import comparator_config as cc
1233
1263
  from . import holes
1234
1264
  check = "comparator theorems"
1235
1265
  if configs is None:
@@ -1263,10 +1293,15 @@ def _offline_comparator(_add, doc, claims, configs, sidecar, read_file, invalid:
1263
1293
  + ", ".join(unreadable[:5]) + "): a decl counts only when its file declares it")
1264
1294
  return
1265
1295
  p = theorem_mapping_problems(doc, claims, parsed, holes.smoke_paths(sidecar), read_file,
1266
- "comparator configuration")
1296
+ "comparator configuration", built)
1267
1297
  n = sum(len(c["theorem_names"]) for c in parsed)
1298
+ # the decls R11 counted only because the earlier build had them: no file's text declares them
1299
+ generated = {str(c.get("decl") or "") for c in claims.values()} & set(built)
1300
+ generated -= cc.qualified_decls(read_file, list(claims.values()))
1268
1301
  _add(check, "fail" if p else "pass", f"each of {n} theorem(s) in {len(parsed)} configuration(s) is the "
1269
- f"declaration of a claim a row names or of an internal or reusable claim (R11)", p)
1302
+ f"declaration of a claim a row names or of an internal or reusable claim (R11)"
1303
+ + (f"; {len(generated)} generated declaration(s) counted because {built_from} read them from the "
1304
+ f"built environment (claim_axioms)" if generated else ""), p)
1270
1305
 
1271
1306
 
1272
1307
  def _offline_reader(root: pathlib.Path):
@@ -1366,7 +1401,8 @@ def do_coverage_check_file(file: str, claims_path: str | None, comparator_paths:
1366
1401
  def preflight_at_head(name: str, pkg: dict, repo: pathlib.Path) -> dict:
1367
1402
  """verify's step 0 (#325): at HEAD, the claims/1 check `claims check --file` runs on the claims file
1368
1403
  (refused: its errors), and, when coverage.yaml is committed, offline_check in draft mode against that
1369
- claims file and the comparator configurations committed at HEAD. Reads only HEAD, never the working tree.
1404
+ claims file and the comparator configurations committed at HEAD; R11 also counts the generated declarations
1405
+ the gate receipt committed at HEAD read from its build (built_decls). Reads only HEAD, never the working tree.
1370
1406
  {ok, claims {file, present, claims, errors[]}, coverage {file, present, ...offline_check} , lines[]}."""
1371
1407
  from . import claims as claims_mod
1372
1408
  from . import comparator_config as cc
@@ -1405,9 +1441,18 @@ def preflight_at_head(name: str, pkg: dict, repo: pathlib.Path) -> dict:
1405
1441
  verdict = f"{where}: coverage: INVALID (1 problem(s); offline)"
1406
1442
  res["lines"] = lines + [verdict, f" {e}", verdict]
1407
1443
  return res
1444
+ # R11's generated declarations (a structure field, an @[ext] lemma) are in no file's text: before the build,
1445
+ # the gate receipt committed at HEAD is the only evidence that they exist (built_decls; the new gate receipt,
1446
+ # which `coverage check`, `page --check` and `receipt check` read after the run, must show them again)
1447
+ gate_rel = (pkg.get("gate") or {}).get("receipt")
1448
+ lower, _raw = receipt_at_head(repo, gate_rel) if gate_rel else (None, None)
1449
+ built = built_decls(repo, lower)
1450
+ built_from = (f"the gate receipt {gate_rel} (commit {str((lower or {}).get('commit'))[:12]})"
1451
+ if built else "")
1408
1452
  rep = offline_check(craw.decode("utf-8", errors="replace"), where, claims_text=claims_text,
1409
1453
  claims_where=f"{rel} at {c12}", configs=cc._configs_at(repo, "HEAD"), sidecar=sidecar,
1410
- read_file=claims_mod._reader(repo, "HEAD"), profiles=profiles, draft=True)
1454
+ read_file=claims_mod._reader(repo, "HEAD"), profiles=profiles, draft=True,
1455
+ built=built, built_from=built_from)
1411
1456
  res["coverage"].update(present=True, errors=rep["errors"], warnings=rep["warnings"], checks=rep["checks"],
1412
1457
  skipped=rep["skipped"])
1413
1458
  payload = offline_payload(rep, name, where, rel if claims_text is not None else None,
@@ -84,7 +84,19 @@ def is_name(name) -> bool:
84
84
  # masking: comments and strings become spaces (newlines kept), docstrings are remembered
85
85
 
86
86
  def _mask(text: str) -> tuple[str, list[tuple[int, int, str]]]:
87
- """(text with comments, docstrings and string literals blanked, [(start, end, docstring text)])."""
87
+ """(text with comments, docstrings and string literals blanked, [(start, end, docstring text)]).
88
+ Memoized inside core.render_cache (one page render scans the same Challenge file for every claim)."""
89
+ from . import core
90
+ masked, docs = core.render_memo("lean_scan._mask", text, lambda: _mask_tuple(text))
91
+ return masked, list(docs)
92
+
93
+
94
+ def _mask_tuple(text: str) -> tuple[str, tuple[tuple[int, int, str], ...]]:
95
+ masked, docs = _mask_text(text)
96
+ return masked, tuple(docs)
97
+
98
+
99
+ def _mask_text(text: str) -> tuple[str, list[tuple[int, int, str]]]:
88
100
  out = list(text)
89
101
  docs: list[tuple[int, int, str]] = []
90
102
  n, i = len(text), 0
@@ -243,7 +255,13 @@ def declarations(text: str) -> list[tuple[int, str, str, str | None, str, str]]:
243
255
  """(line, keyword, qualified name, docstring or None, stripped source line, name as written) for every
244
256
  declaration. `class inductive` and `class abbrev` report keyword `class`; an anonymous instance is left
245
257
  out; a `_root_.` name is not prefixed with the namespace. Scopes are kept one name component at a
246
- time, as Lean keeps them; a keyword on a line inside a syntax quotation declares nothing."""
258
+ time, as Lean keeps them; a keyword on a line inside a syntax quotation declares nothing. Memoized inside
259
+ core.render_cache."""
260
+ from . import core
261
+ return list(core.render_memo("lean_scan.declarations", text, lambda: tuple(_declarations(text))))
262
+
263
+
264
+ def _declarations(text: str) -> list[tuple[int, str, str, str | None, str, str]]:
247
265
  masked, docs = _mask(text)
248
266
  lines = text.splitlines()
249
267
  starts, off = [], 0
@@ -455,6 +455,7 @@ def _context(pkg: dict, repo, allow_private: bool, override: dict | None = None)
455
455
  "led": ledger_mod.ledger_for(pkg, "promote"), "gate": gate, "evidence": ev_rows, "lower": lower,
456
456
  "comp": comp, "backed": backed, "sites": profiles, "cite": citation(pkg, repo), "license": license_file(pkg, repo),
457
457
  "https": https, "prefix": prefix, "bound": bound, "configs": configs, "qualified": qualified,
458
+ "mapped": cc.mapped_names(list(claims.values())), # once per render: it reads every claim
458
459
  "smoke": smoke,
459
460
  "anchor": anchor, "preview": view if preview else None, "invalid": view if invalid else None,
460
461
  "repo_view": view,
@@ -524,6 +525,39 @@ def _smoke_line(cfgs: list[dict], smoke: dict) -> str:
524
525
  f"({_md(smoke[c['path']])})" for c in cfgs)
525
526
 
526
527
 
528
+ def _smoke_claim_names(cfgs: list[dict], claims: list[dict]) -> tuple[int, int]:
529
+ """(theorems of the smoke configurations that name a claim, all of them). A theorem names a claim when it is
530
+ the claim's `judged_as`, its `decl`, or `<Prefix>.<decl>`: the naming rule of `comparator_config.covers`, by
531
+ name only, so a declaration Lean generates (a structure field) counts too. The page only describes them;
532
+ nothing is credited."""
533
+ from . import comparator_config as cc
534
+ judged = {j for c in claims for j in [cc.judged_name(c)] if j}
535
+ by_last: dict[str, set[tuple[str, ...]]] = {}
536
+ for c in claims:
537
+ want = cc._components(str(c.get("decl") or ""))
538
+ if want:
539
+ by_last.setdefault(want[-1], set()).add(tuple(want))
540
+ names = {t for c in cfgs for t in _names(c.get("theorem_names"))}
541
+ hits = 0
542
+ for t in names:
543
+ have = cc._components(t)
544
+ if t in judged or (have and any(len(have) >= len(w) and tuple(have[-len(w):]) == w
545
+ for w in by_last.get(have[-1], ()))):
546
+ hits += 1
547
+ return hits, len(names)
548
+
549
+
550
+ def _smoke_sentence(cfgs: list[dict], claims: list[dict]) -> str:
551
+ """What the smoke-check line says about its theorems. 'It states nothing of this package' is true only when
552
+ none of them names a claim; a package may mark its own helper claims' configuration as a smoke check."""
553
+ hits, total = _smoke_claim_names(cfgs, claims)
554
+ lead = "Each passed the comparison like the others, to show the comparator set-up works"
555
+ if not hits:
556
+ return f"{lead}; it states nothing of this package and verifies no result on this page."
557
+ return (f"{lead}. {hits} of these {total} theorem(s) name claims of this package (`claims.yaml`); a smoke "
558
+ f"check credits no claim and verifies no result on this page.")
559
+
560
+
527
561
  def _hole_text(c: dict) -> str:
528
562
  from .holes import receipt_judged
529
563
  holes = _names(c.get("definition_names"))
@@ -564,8 +598,7 @@ def _lean_statement(ctx: dict, cid: str) -> dict:
564
598
  if cfg.get("path") in ctx.get("smoke", {}): # a smoke check states no result
565
599
  continue
566
600
  for t in cfg.get("theorem_names") or []:
567
- if isinstance(t, str) and cc.claim_covered({t}, c, ctx["qualified"],
568
- cc.mapped_names(list(ctx["claims"].values()))):
601
+ if isinstance(t, str) and cc.claim_covered({t}, c, ctx["qualified"], ctx["mapped"]):
569
602
  rel = module_path(cfg.get("challenge_module"))
570
603
  src = read(rel)
571
604
  text = lean_scan.statement(src, t) if src else None
@@ -1163,9 +1196,8 @@ def _body_rest(ctx: dict, target: str, md: list[str], counts: dict | None, n_ver
1163
1196
  f"{', '.join(f'`{a}`' for a in permitted) or 'none'}; definitions compared by name only: "
1164
1197
  f"{_holes_line(configs)}.")
1165
1198
  if smoke_cfgs:
1166
- md.append(f"- Smoke checks (not results): {_smoke_line(smoke_cfgs, smoke)}. Each passed the comparison "
1167
- f"like the others, to show the comparator set-up works; it states nothing of this package "
1168
- f"and verifies no result on this page.")
1199
+ md.append(f"- Smoke checks (not results): {_smoke_line(smoke_cfgs, smoke)}. "
1200
+ f"{_smoke_sentence(smoke_cfgs, list(ctx['claims'].values()))}")
1169
1201
  md += _stack_lines(doc, repo, warnings)
1170
1202
  md.append("")
1171
1203
  ev_rows = ctx["evidence"]
@@ -1385,6 +1417,14 @@ def _scan(pkg: dict, repo, outputs: dict[str, str]) -> None:
1385
1417
  def render_all(pkg: dict, repo, allow_private: bool = False, advisories: bool = True,
1386
1418
  override: dict | None = None, corroborator: Corroborator | None = None
1387
1419
  ) -> tuple[dict[str, str], dict, list[str]]:
1420
+ """See _render_all; it runs inside one core.render_cache (shared with an enclosing one)."""
1421
+ with core.render_cache():
1422
+ return _render_all(pkg, repo, allow_private, advisories, override, corroborator)
1423
+
1424
+
1425
+ def _render_all(pkg: dict, repo, allow_private: bool = False, advisories: bool = True,
1426
+ override: dict | None = None, corroborator: Corroborator | None = None
1427
+ ) -> tuple[dict[str, str], dict, list[str]]:
1388
1428
  """({'readme': block, 'verification.md', 'coverage.md', 'html'}: every output, each with a final
1389
1429
  newline; the facts for --json; warnings). One context feeds them all; all are scanned together.
1390
1430
  advisories=False leaves the toolchain advisory lines out: the baseline `--check` compares against.
@@ -1605,6 +1645,18 @@ def do_page(reg: dict, name: str, *, write: bool, check: bool, out: str | None,
1605
1645
  repo_arg: str | None = None, strict_preview: bool = False, corroborate: bool = False,
1606
1646
  fetch=None, attested: bool = False,
1607
1647
  trusted_root: str | None = None) -> tuple[list[str], dict, list[str], int]:
1648
+ """The page command: its renders and checks share one core.render_cache."""
1649
+ with core.render_cache():
1650
+ return _do_page(reg, name, write=write, check=check, out=out, allow_private=allow_private, agent=agent,
1651
+ site=site, html=html, repo_arg=repo_arg, strict_preview=strict_preview,
1652
+ corroborate=corroborate, fetch=fetch, attested=attested, trusted_root=trusted_root)
1653
+
1654
+
1655
+ def _do_page(reg: dict, name: str, *, write: bool, check: bool, out: str | None, allow_private: bool,
1656
+ agent: str | None, site: str | None = None, html: str | None = None,
1657
+ repo_arg: str | None = None, strict_preview: bool = False, corroborate: bool = False,
1658
+ fetch=None, attested: bool = False,
1659
+ trusted_root: str | None = None) -> tuple[list[str], dict, list[str], int]:
1608
1660
  if sum(map(bool, (write, check, out))) > 1:
1609
1661
  raise core.UsageError("--write, --check and --out are mutually exclusive")
1610
1662
  from .receipt_check import attested_usage
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lean-pkg
3
- Version: 0.30.1
3
+ Version: 0.30.3
4
4
  Summary: Lifecycle registry and trust gate for Lean 4 formalization packages: leases, receipt-bound gates, comparator (Palomar) evidence, one-way promotion.
5
5
  Author: Le Chen
6
6
  License-Expression: Apache-2.0
@@ -307,6 +307,7 @@ tests/test_registry_core.py
307
307
  tests/test_registry_snapshot.py
308
308
  tests/test_release_script.py
309
309
  tests/test_release_version.py
310
+ tests/test_render_cache.py
310
311
  tests/test_repo_override.py
311
312
  tests/test_report.py
312
313
  tests/test_report_log_required.py
@@ -110,8 +110,11 @@ def test_a_name_core_rebinds_is_read_through_from_cli(env):
110
110
  # read each one from core.py (its __getattr__), or lean_pkg.cli would keep the first object
111
111
  rebinds = {name for node in ast.walk(ast.parse((SRC / "core.py").read_text()))
112
112
  if isinstance(node, ast.Global) for name in node.names}
113
- assert rebinds == set(cli._CORE_REBOUND) == {"_LOADED_PACKAGES"}
114
- assert "_LOADED_PACKAGES" not in vars(cli) # not a re-export: read through
113
+ assert rebinds == set(cli._CORE_REBOUND) == {"_LOADED_PACKAGES", "_RENDER_MEMO"}
114
+ assert "_LOADED_PACKAGES" not in vars(cli) and "_RENDER_MEMO" not in vars(cli) # read through
115
+ with core.render_cache(): # rebinds core._RENDER_MEMO to a fresh memo
116
+ assert cli._RENDER_MEMO is core._RENDER_MEMO is not None
117
+ assert cli._RENDER_MEMO is None
115
118
  reg = cli.load_registry(env.registry) # rebinds core._LOADED_PACKAGES to reg["packages"]
116
119
  assert core._LOADED_PACKAGES is reg["packages"]
117
120
  assert cli._LOADED_PACKAGES is core._LOADED_PACKAGES