lean-pkg 0.29.0__tar.gz → 0.30.1__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 (349) hide show
  1. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/CHANGELOG.md +98 -0
  2. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/CITATION.cff +8 -2
  3. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/PKG-INFO +1 -1
  4. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/README.md +1 -1
  5. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/pyproject.toml +1 -1
  6. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/__init__.py +1 -1
  7. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/cli.py +6 -4
  8. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/cli_parser.py +3 -2
  9. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/comparator_types.py +6 -1
  10. lean_pkg-0.30.1/src/lean_pkg/controls.py +450 -0
  11. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/core.py +12 -0
  12. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/coverage.py +166 -35
  13. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/gate.py +21 -0
  14. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/help_topics.py +4 -0
  15. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/producer_skew.py +2 -1
  16. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/receipt.py +4 -1
  17. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/receipt_check.py +4 -2
  18. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/receipt_systemd.py +37 -1
  19. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/scaffold.py +6 -3
  20. lean_pkg-0.30.1/src/lean_pkg/scripts/ControlsProbe.lean +271 -0
  21. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/verify.py +29 -3
  22. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg.egg-info/PKG-INFO +1 -1
  23. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg.egg-info/SOURCES.txt +6 -0
  24. lean_pkg-0.30.1/tests/test_comparator_types_deep.py +59 -0
  25. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_conditional_closeout.py +4 -3
  26. lean_pkg-0.30.1/tests/test_controls.py +202 -0
  27. lean_pkg-0.30.1/tests/test_coverage_accounted.py +111 -0
  28. lean_pkg-0.30.1/tests/test_coverage_extensions.py +174 -0
  29. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_coverage_offline.py +5 -3
  30. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate_claims.py +33 -0
  31. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_hypotheses_probe.py +3 -2
  32. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_lease_actor.py +45 -0
  33. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_page.py +4 -3
  34. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_systemd.py +44 -1
  35. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_verify_preflight.py +13 -0
  36. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/LICENSE +0 -0
  37. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/MANIFEST.in +0 -0
  38. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/PYPI.md +0 -0
  39. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/setup.cfg +0 -0
  40. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/adapters/__init__.py +0 -0
  41. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/adapters/github.py +0 -0
  42. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/adapters/leansearch.py +0 -0
  43. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/adapters/loogle.py +0 -0
  44. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/adapters/palomar.py +0 -0
  45. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/adapters/reservoir.py +0 -0
  46. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/anchor.py +0 -0
  47. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/audit.py +0 -0
  48. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/binding_file.py +0 -0
  49. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/blueprint.py +0 -0
  50. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/build_scope.py +0 -0
  51. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/ci_github.py +0 -0
  52. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/claim_axioms.py +0 -0
  53. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/claims.py +0 -0
  54. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/claims_mark.py +0 -0
  55. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/command_tree.py +0 -0
  56. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/comparator_config.py +0 -0
  57. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/comparator_contracts.py +0 -0
  58. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/comparator_receipt.py +0 -0
  59. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/comparator_stage.py +0 -0
  60. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/container.py +0 -0
  61. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/data/stacks/lts-2026.10.yaml +0 -0
  62. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/data/toolchain-advisories.yaml +0 -0
  63. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/data/upgrade-breaking.yaml +0 -0
  64. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/data/verify-workflow-pins.yaml +0 -0
  65. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/deps_closure.py +0 -0
  66. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/deps_fill.py +0 -0
  67. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/dup_constants.py +0 -0
  68. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/exercise.py +0 -0
  69. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/exercise_forbid.py +0 -0
  70. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/export_paths.py +0 -0
  71. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/extract.py +0 -0
  72. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/extract_decls.py +0 -0
  73. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/extract_ledger.py +0 -0
  74. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/extract_summary.py +0 -0
  75. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/extract_types.py +0 -0
  76. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/extract_write.py +0 -0
  77. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/formalization.py +0 -0
  78. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/formalization_kept.py +0 -0
  79. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/fresh_repo.py +0 -0
  80. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/headline.py +0 -0
  81. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/holes.py +0 -0
  82. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/host_routes.py +0 -0
  83. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/html_blocks.py +0 -0
  84. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/hypotheses.py +0 -0
  85. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/index.py +0 -0
  86. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/json_stdout.py +0 -0
  87. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/lake_hygiene.py +0 -0
  88. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/lean_diag.py +0 -0
  89. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/lean_scan.py +0 -0
  90. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/ledger.py +0 -0
  91. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/next_step.py +0 -0
  92. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/page.py +0 -0
  93. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/page_html.py +0 -0
  94. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/palomar.py +0 -0
  95. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/palomar_check.py +0 -0
  96. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/port_modules.py +0 -0
  97. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/prior_art.py +0 -0
  98. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/producer.py +0 -0
  99. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/public_safety.py +0 -0
  100. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/publish.py +0 -0
  101. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/rebase.py +0 -0
  102. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/receipt_ci.py +0 -0
  103. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/recommended.py +0 -0
  104. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/report.py +0 -0
  105. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/reservoir.py +0 -0
  106. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/schemas/formalization-0.4.schema.json +0 -0
  107. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/schemas/formalization-0.4.schema.source.txt +0 -0
  108. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/scripts/ClaimAxioms.lean +0 -0
  109. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/scripts/ContractsOnly.lean +0 -0
  110. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/scripts/DupConstants.lean +0 -0
  111. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/scripts/HypProbe.lean +0 -0
  112. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/scripts/comparator-check.sh +0 -0
  113. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/scripts/verify-comparator.sh +0 -0
  114. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/seal_bundle.py +0 -0
  115. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/search.py +0 -0
  116. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/site_check.py +0 -0
  117. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/site_profiles/easley.yaml +0 -0
  118. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/site_profiles/github-actions.yaml +0 -0
  119. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/sites.py +0 -0
  120. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/stacks.py +0 -0
  121. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/statements_module.py +0 -0
  122. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/templates/Apache-2.0.txt +0 -0
  123. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/toolchain_advisories.py +0 -0
  124. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg/upgrade.py +0 -0
  125. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg.egg-info/dependency_links.txt +0 -0
  126. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg.egg-info/entry_points.txt +0 -0
  127. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg.egg-info/requires.txt +0 -0
  128. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/src/lean_pkg.egg-info/top_level.txt +0 -0
  129. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_adapters.py +0 -0
  130. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_append_note.py +0 -0
  131. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_audit_claims_coverage.py +0 -0
  132. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_audit_gh_outcomes.py +0 -0
  133. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_audit_missing_path.py +0 -0
  134. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_audit_no_github_mirror.py +0 -0
  135. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_audit_palomar.py +0 -0
  136. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_audit_receipts_paths.py +0 -0
  137. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_audit_reference_branch.py +0 -0
  138. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_binding_file.py +0 -0
  139. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_binding_file_g3.py +0 -0
  140. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_blueprint_check.py +0 -0
  141. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_bootstrap_collaborator.py +0 -0
  142. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_branch_notice.py +0 -0
  143. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_campaign_recovery_docs.py +0 -0
  144. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_check_changelog_releases.py +0 -0
  145. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_ci_attested.py +0 -0
  146. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_ci_comparator.py +0 -0
  147. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_ci_corroborate.py +0 -0
  148. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_ci_receipt_level1.py +0 -0
  149. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_claim_axioms.py +0 -0
  150. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_claims.py +0 -0
  151. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_claims_ledger.py +0 -0
  152. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_claims_mark.py +0 -0
  153. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_claims_rebase.py +0 -0
  154. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_cli.py +0 -0
  155. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_cli_consistency.py +0 -0
  156. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_cli_contract_argv.py +0 -0
  157. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_cli_contract_corpus.py +0 -0
  158. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_cli_contract_help.py +0 -0
  159. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_cli_contract_json.py +0 -0
  160. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_cli_contract_names.py +0 -0
  161. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_columns.py +0 -0
  162. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_command_docs.py +0 -0
  163. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_command_tree_stage2.py +0 -0
  164. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_commit.py +0 -0
  165. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator.py +0 -0
  166. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_attempts.py +0 -0
  167. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_config.py +0 -0
  168. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_contracts.py +0 -0
  169. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_coverage.py +0 -0
  170. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_evidence_dir.py +0 -0
  171. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_host_label.py +0 -0
  172. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_list_defaults.py +0 -0
  173. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_log_transport.py +0 -0
  174. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_mismatch_next.py +0 -0
  175. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_name_hints.py +0 -0
  176. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_no_mathlib.py +0 -0
  177. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_readiness.py +0 -0
  178. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_receipt.py +0 -0
  179. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_replace.py +0 -0
  180. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_repo_claims_file.py +0 -0
  181. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_sacct_seal.py +0 -0
  182. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_stage.py +0 -0
  183. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_tool_toolchain.py +0 -0
  184. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_comparator_types.py +0 -0
  185. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_compressed_log_bindings.py +0 -0
  186. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_conditional_claims.py +0 -0
  187. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_conditional_outputs.py +0 -0
  188. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_consent_dedupe.py +0 -0
  189. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_core_split.py +0 -0
  190. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_coverage_conclusion.py +0 -0
  191. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_coverage_witness.py +0 -0
  192. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_cut_release.py +0 -0
  193. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_defaults.py +0 -0
  194. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_docs.py +0 -0
  195. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_docs_classifier_preflight.py +0 -0
  196. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_docs_descendants.py +0 -0
  197. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_docs_old_spellings.py +0 -0
  198. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_doctor.py +0 -0
  199. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_dup_constants.py +0 -0
  200. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_evidence_formalization.py +0 -0
  201. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_exercise.py +0 -0
  202. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_exercise_course.py +0 -0
  203. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_extract_decls.py +0 -0
  204. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_extract_ledger.py +0 -0
  205. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_extract_plan.py +0 -0
  206. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_extract_summary.py +0 -0
  207. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_extract_types.py +0 -0
  208. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_fields_only.py +0 -0
  209. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_formalization.py +0 -0
  210. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_formalization_anchor.py +0 -0
  211. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_formalization_kept.py +0 -0
  212. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_formalization_refresh.py +0 -0
  213. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_formats.py +0 -0
  214. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_fresh_repo.py +0 -0
  215. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate.py +0 -0
  216. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate_binding.py +0 -0
  217. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate_binding_scope.py +0 -0
  218. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate_check.py +0 -0
  219. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate_check_next.py +0 -0
  220. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate_pins.py +0 -0
  221. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate_receipt_path.py +0 -0
  222. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate_refresh.py +0 -0
  223. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_gate_regate.py +0 -0
  224. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_headline.py +0 -0
  225. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_help_topics.py +0 -0
  226. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_hints_and_time.py +0 -0
  227. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_host_check.py +0 -0
  228. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_host_routes.py +0 -0
  229. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_hypotheses_ledger.py +0 -0
  230. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_ignored_evidence.py +0 -0
  231. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_index_add.py +0 -0
  232. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_index_built_on.py +0 -0
  233. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_index_check.py +0 -0
  234. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_index_claims.py +0 -0
  235. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_index_docs_descendants.py +0 -0
  236. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_index_render.py +0 -0
  237. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_index_schema.py +0 -0
  238. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_init.py +0 -0
  239. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_input_hygiene.py +0 -0
  240. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_internal_claims.py +0 -0
  241. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_json.py +0 -0
  242. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_json_control_chars.py +0 -0
  243. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_json_stdout.py +0 -0
  244. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_judged_as.py +0 -0
  245. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_lake_cache_systemd.py +0 -0
  246. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_lake_hygiene.py +0 -0
  247. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_large_artifacts_recipe.py +0 -0
  248. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_lean_diag.py +0 -0
  249. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_lean_scan_extract.py +0 -0
  250. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_lease.py +0 -0
  251. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_lease_expiry_notice.py +0 -0
  252. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_lease_registry_stamp.py +0 -0
  253. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_ledger_exact_covers.py +0 -0
  254. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_ledger_golden.py +0 -0
  255. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_lifecycle_notes.py +0 -0
  256. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_llms.py +0 -0
  257. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_locking.py +0 -0
  258. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_manuscript_findings.py +0 -0
  259. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_mathlib_none.py +0 -0
  260. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_migrate.py +0 -0
  261. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_migrate_v3.py +0 -0
  262. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_namespace_notes.py +0 -0
  263. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_new.py +0 -0
  264. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_next.py +0 -0
  265. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_noninteractive.py +0 -0
  266. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_olean_manifest.py +0 -0
  267. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_outputs_golden.py +0 -0
  268. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_package_fields.py +0 -0
  269. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_packaging.py +0 -0
  270. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_page_repo_head.py +0 -0
  271. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_page_site.py +0 -0
  272. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_palomar_check.py +0 -0
  273. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_palomar_prepare.py +0 -0
  274. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_palomar_snapshot.py +0 -0
  275. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_paper.py +0 -0
  276. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_port_modules.py +0 -0
  277. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_prior_art.py +0 -0
  278. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_producer_skew.py +0 -0
  279. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_promote_audit.py +0 -0
  280. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_promote_scope.py +0 -0
  281. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_public_allow.py +0 -0
  282. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_public_safety.py +0 -0
  283. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_public_safety_gzip.py +0 -0
  284. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_public_safety_long_line_stream.py +0 -0
  285. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_public_safety_scope.py +0 -0
  286. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_publication_hold.py +0 -0
  287. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_publish.py +0 -0
  288. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_check.py +0 -0
  289. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_check_opt_in.py +0 -0
  290. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_ci.py +0 -0
  291. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_container.py +0 -0
  292. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_private_scan.py +0 -0
  293. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_producer.py +0 -0
  294. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_slurm.py +0 -0
  295. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_slurm_artifacts.py +0 -0
  296. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_slurm_contracts_preflight.py +0 -0
  297. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_slurm_fill_plan.py +0 -0
  298. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_slurm_preflight_deps.py +0 -0
  299. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_slurm_runtime_preflight.py +0 -0
  300. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_slurm_sacct_seal.py +0 -0
  301. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_slurm_template_src.py +0 -0
  302. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_receipt_subdir_package.py +0 -0
  303. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_recommended.py +0 -0
  304. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_record.py +0 -0
  305. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_record_evidence.py +0 -0
  306. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_record_transitions.py +0 -0
  307. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_refresh_descendant.py +0 -0
  308. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_register.py +0 -0
  309. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_registry_core.py +0 -0
  310. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_registry_snapshot.py +0 -0
  311. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_release_script.py +0 -0
  312. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_release_version.py +0 -0
  313. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_repo_override.py +0 -0
  314. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_report.py +0 -0
  315. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_report_log_required.py +0 -0
  316. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_reservoir_check.py +0 -0
  317. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_review_fixes_prior_art.py +0 -0
  318. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_robustness.py +0 -0
  319. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_seal_bundle.py +0 -0
  320. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_search.py +0 -0
  321. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_search_completeness.py +0 -0
  322. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_search_declarations.py +0 -0
  323. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_search_field_coverage.py +0 -0
  324. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_search_scan.py +0 -0
  325. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_search_sources.py +0 -0
  326. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_sibling_packages.py +0 -0
  327. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_signoff_sidecar.py +0 -0
  328. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_site_check.py +0 -0
  329. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_sites.py +0 -0
  330. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_skills.py +0 -0
  331. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_smoke_configs.py +0 -0
  332. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_source_paper_ai.py +0 -0
  333. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_stack_opt_in.py +0 -0
  334. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_stacks.py +0 -0
  335. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_statements_module.py +0 -0
  336. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_status_scope.py +0 -0
  337. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_subdir_package.py +0 -0
  338. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_template_module_headers.py +0 -0
  339. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_toolchain_advisories.py +0 -0
  340. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_toolchain_floor.py +0 -0
  341. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_trust.py +0 -0
  342. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_update_publication_fields.py +0 -0
  343. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_update_relocate.py +0 -0
  344. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_upgrade.py +0 -0
  345. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_user_default.py +0 -0
  346. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_validate.py +0 -0
  347. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_verdict_first.py +0 -0
  348. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_verify_workflow_oidc.py +0 -0
  349. {lean_pkg-0.29.0 → lean_pkg-0.30.1}/tests/test_wiki.py +0 -0
@@ -9,6 +9,102 @@ 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.1] - 2026-11-30
13
+
14
+ ### Changed
15
+
16
+ - `receipt systemd` refuses a `Result=oom-kill` unit naming its memory peak
17
+ and its `MemoryMax` (in GiB; it named only `MemoryMax`, in bytes) and how
18
+ to raise the cap, `lean-pkg verify NAME --memory-max SIZE` or `receipt
19
+ systemd --run --memory-max SIZE`, with a suggested size of 1.5 times the
20
+ larger of the two (#459). The memory WARN is no longer printed for an
21
+ OOM-killed unit: it said a larger build "is OOM-killed" about a build
22
+ that already was.
23
+
24
+ ### Documentation
25
+
26
+ - docs/stacks/lts-2026.10: the release-gate run of RELEASING.md step 3a
27
+ for 0.30.0 (#458): the five declared entries on one host, with timings,
28
+ peak memory, receipt SHA-256s and the digest check. No failing entry;
29
+ the failures recorded are pre-existing package data (binding opt-in,
30
+ REUSE data, an unbacked Easley acknowledgement).
31
+
32
+ public-safety (make public-safety, --strict, history): 0 hit(s) (0 tree, 0 history); 0 blocking, 0 warning(s)
33
+
34
+ ## [0.30.0] - 2026-11-21
35
+
36
+ ### Added
37
+
38
+ - Extension keys in `coverage.yaml`, proposal 0015 (#457): `coverage/1`
39
+ accepts keys named `x-...` at the top level and on rows (paper and
40
+ library). They are for tools that build something else from the file,
41
+ such as a book appendix. lean-pkg checks their shape: the name, a value
42
+ that is a scalar or a list or mapping of scalars nested at most two
43
+ levels, at most 4000 bytes as JSON, and at most 16 on one object. It
44
+ never reads, judges or shows them: no placeholder or length rule applies,
45
+ and the page never prints them. `coverage check` names each one after its
46
+ verdict, with where it appears, so a misspelled one is visible, and
47
+ `--json` gains `extension_keys`. `formalization anchor --write` and
48
+ `claims rebase` keep them. An `x-` key anywhere else, and every other
49
+ unknown key, is still refused. An older lean-pkg refuses a file that uses
50
+ one.
51
+ - Declared controls, first stage of proposal 0014 (#453): a package may commit
52
+ `lean-pkg-controls.yaml` (`controls/1`) listing `must-fail`, `refutes` and
53
+ `compiles` controls. The verify scripts (`receipt slurm --template` and the
54
+ `verify.sh` that `lean-pkg new` writes) run each control alone, after the
55
+ hypotheses section, through lean-pkg's `ControlsProbe.lean`, which
56
+ elaborates the file as `lean FILE` does, and seal a `controls/1` section in
57
+ the verify log: per control the exit, the first error message, setup
58
+ errors, `expect`, negation and axioms of the listed theorems, and where each
59
+ target occurs. `lean-pkg verify`'s preflight refuses a declaration the job
60
+ could not read. The gate does not read the section yet (the next stage).
61
+ See docs/formats.md, "Declared controls".
62
+
63
+ - `gate` (not `gate --check`) and `update` take their `--agent` from
64
+ `$LEAN_PKG_AGENT` when none is given (#449): an agent working under its
65
+ own lease no longer has every first `gate` or `update` refused until it
66
+ passes `--agent HOLDER`. The value is checked against a live lease exactly
67
+ as a typed `--agent` is, so it never gets past another agent's lease; a
68
+ typed `--agent` wins, and an empty value counts as unset. See
69
+ `lean-pkg help environment`.
70
+ - The writing `gate` ends with `next: lean-pkg claims sync NAME` (with its
71
+ `--agent`) when the package tracks a claims file at the gated commit and
72
+ the registry's claims cache was read neither there nor at `HEAD` (#450):
73
+ after a gate, `claims_synced_commit` stayed null until a separate
74
+ `claims sync`, which nothing said. `gate --json` gains `next_command`
75
+ (that command, or `null`). Printed, never run.
76
+ - `receipt systemd --run` warns when the unit's `MemoryPeak` exceeds 80%
77
+ of its `MemoryMax`, naming `--memory-max` and a cap of 1.5 times the peak
78
+ (#452): a 32-module package peaked at 7.3 GiB under the 8G default, and a
79
+ slightly larger build would have been OOM-killed with no receipt. The
80
+ receipt is written as before; `--json` gains `memory_warning`.
81
+ `lean-pkg verify --memory-max BYTES` passes the cap to its `receipt
82
+ systemd` step.
83
+
84
+ ### Changed
85
+
86
+ - `coverage check` (rule R11) accounts for a compared theorem that no row
87
+ names when it is the declaration of a claim `claims.yaml` marks `internal`
88
+ or `reusable` (#455): a package whose comparator compares hundreds of
89
+ supporting lemmas no longer needs a row for each, or fails on them. A
90
+ theorem that is the declaration of no claim still fails, and one that is
91
+ the declaration of an `experimental` or `superseded` claim now fails with
92
+ that claim and its status named. The offline form reads those claims'
93
+ Lean files too; `receipt check`'s coverage line says so. Smoke checks are
94
+ unchanged.
95
+
96
+ ### Fixed
97
+
98
+ - `comparator config --challenge-from-type` (the type driver) prints a deep
99
+ statement whole (#454). Lean's `pp.deepTerms` is false by default, so a
100
+ statement nested deeper than 50 printed with an elided `⋯`, which the
101
+ round-trip check refused; the driver now sets `pp.deepTerms true` and a
102
+ large `pp.maxSteps`.
103
+
104
+ public-safety (make public-safety, --strict, history): 0 hit(s) (0 tree, 0 history); 0 blocking, 0 warning(s)
105
+
106
+ Zenodo version DOI: [10.5281/zenodo.24432261](https://doi.org/10.5281/zenodo.24432261)
107
+
12
108
  ## [0.29.0] - 2026-11-09
13
109
 
14
110
  ### Added
@@ -50,6 +146,8 @@ full policy, and the criteria for 1.0.0, are in RELEASING.md, "When to tag".
50
146
 
51
147
  public-safety (make public-safety, --strict, history): 0 hit(s) (0 tree, 0 history); 0 blocking, 0 warning(s)
52
148
 
149
+ Zenodo version DOI: [10.5281/zenodo.24095258](https://doi.org/10.5281/zenodo.24095258)
150
+
53
151
  ## [0.28.0] - 2026-11-09
54
152
 
55
153
  ### Added
@@ -6,8 +6,8 @@ authors:
6
6
  - family-names: Chen
7
7
  given-names: Le
8
8
  affiliation: "Auburn University"
9
- version: "0.29.0"
10
- date-released: "2026-11-09"
9
+ version: "0.30.1"
10
+ date-released: "2026-11-30"
11
11
  license: Apache-2.0
12
12
  repository-code: "https://github.com/lean-pkg/lean-pkg"
13
13
  doi: 10.5281/zenodo.23272098
@@ -207,6 +207,12 @@ identifiers:
207
207
  - type: doi
208
208
  value: 10.5281/zenodo.24085127
209
209
  description: Version DOI for 0.28.0
210
+ - type: doi
211
+ value: 10.5281/zenodo.24095258
212
+ description: Version DOI for 0.29.0
213
+ - type: doi
214
+ value: 10.5281/zenodo.24432261
215
+ description: Version DOI for 0.30.0
210
216
  url: "https://lean-pkg.github.io/lean-pkg/"
211
217
  keywords:
212
218
  - Lean 4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lean-pkg
3
- Version: 0.29.0
3
+ Version: 0.30.1
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.29.0},
368
+ version = {0.30.1},
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.29.0"
7
+ version = "0.30.1"
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.29.0"
3
+ __version__ = "0.30.1"
@@ -135,6 +135,7 @@ if __name__ == "__main__":
135
135
  # Code in core.py and in the command modules reads core's globals: rebinding or monkeypatching one of these
136
136
  # names here is not seen there (tests patch both: conftest.patch_core).
137
137
  from .core import event_producer, _event_producer, install_detect # noqa: F401 proposal 0013 (core)
138
+ from .core import AGENT_ENV, default_agent # noqa: F401 the --agent default of gate and update
138
139
  from .core import ( # noqa: F401 re-exports, one release (#317)
139
140
  _ACTOR, ancestor_attribute_changes, append_event, BOARD_HEADER, bound_tree, branch_notice, branch_state,
140
141
  BULK_FIELDS, check_event_logs_appendable, checker_paths, CLAIMS_COMMIT_FIRST, COMPARATOR_CONFIG_FIELDS,
@@ -191,7 +192,7 @@ from .gate import ( # noqa: F401 re-exports, one release (#317)
191
192
  COMPARATOR_CONFIG_RE, copy_comparator, dirty_guard, dirty_tracked, do_comparator, _do_comparator, do_gate,
192
193
  _do_gate, do_gate_check, _do_gate_check, do_gate_refresh, docs_admission, docs_admission_line,
193
194
  docs_only_descendant, escaping_symlinks, evidence_dest_problem, evidence_only_descendant, _file_sha256,
194
- formalization_derived_only, gate_next_command, gunzip_digest, gzip_deterministic, head_comparator_configs,
195
+ formalization_derived_only, claims_sync_next, gate_next_command, gunzip_digest, gzip_deterministic, head_comparator_configs,
195
196
  load_json_object, locate_evidence_arg, manifest_mathlib, _move_record_hint, NO_MATHLIB, outside_path_deps,
196
197
  package_binding, package_descendant,
197
198
  path_dep_tree_problems, pin_changes_text, pins_kept_lines, plan_comparator_copy, plan_report_log_copy,
@@ -3183,11 +3184,11 @@ lease claim (old spellings: claim, lease NAME) CAS lease; refuses if another ag
3183
3184
  ex: lean-pkg lease claim my-lean --workspace w3 --agent vera --reason "chapter 2"
3184
3185
  lease release (old spelling: release) holder-only unless --force --reason (released_by: --agent, else force). ex: lean-pkg lease release my-lean --agent vera | repo export NAME DIR (old spelling: release NAME --fresh-repo DIR) [--remote URL] [--keep-receipts] [--source-commit SHA] [--author 'NAME <EMAIL>'] [--allow-author-email] [--dry-run] (no lease involved): commit identity (author = committer) from --author, else user.name/user.email of the source repo's LOCAL git config, never the global identity (none: refused "no identity for the export commit: pass --author ..."); an email that is not a GitHub noreply address (ID+LOGIN@users.noreply.github.com) refused unless --allow-author-email; plan line `commit identity: ...`, JSON identity {author, committer, source, noreply} -> git archive of the gate-bound commit (package dir; drops .lean-pkg-private-patterns, internal paths, .lean-receipts/ unless --keep-receipts, listed) -> public-safety scan of the tree, the commit message and the identity (blocking hit: refused, nothing written; warnings listed) -> carries ONLY the allow: lines that scan used into a committed .lean-pkg-public-allow, merged with one in the tree (unused ones dropped and counted, never printed; none used: no file), plan line `public allow: N allow line(s) ... carried`, JSON public_allow {file, carried, lines[], unused, present}; a carried allow line a private block pattern matches refuses, naming its line number -> new repo at DIR, ONE commit "fresh-history export of <sha12>; receipts and gate must be re-run on this commit" (+ source commit, export date), origin = --remote -> relocated as update --path DIR --reason "fresh-history release" (gate/comparator cleared, verified-private -> gate-pending, dated note keeps old receipt paths + source sha; --remote sets repo); refuses public/upstreamed/archived, a non-empty DIR; --dry-run: plan + next commands (gate, comparator-receipt --prepare, publish), writes nothing | repo export NAME DIR --from-tree SRCDIR (not with --source-commit): exports the WORKING TREE at SRCDIR (hand-cleaned, not a commit; in a checkout `git ls-files --cached --others --exclude-standard`, else every file but .git/ .lake/), same drops + scan (+ the commit message), message "fresh-history export of working tree <basename>; ..." + "source commit: none (hand-cleaned tree)" + "source package commit for provenance: <gate-bound sha|none>" | repo adopt NAME DIR (old spelling: release NAME --adopt-repo DIR) [--remote URL] [--allow-history] [--dry-run]: adopt an existing repo as the public history, no export, no new commit; refuses >1 commit on all refs (unless --allow-history), DIR not its top dir, the package's own source repo, modified tracked files, an origin other than --remote, blocking public-safety hits in its tree or full history; then the same relocation (reason "adopted-repository release"; note names the adopted commit + previous gate-bound sha)
3185
3186
  lease renew (old spelling: renew) holder-only restart of a LIVE lease (event claim-refreshed); a lapsed lease is refused: claim again. --ttl HOURS: 1..8760 (above: exit 2, nothing written). --contact TEXT sets/replaces lease.contact, omitted keeps it; --no-contact clears it (event contact_cleared: true when one was removed; with --contact: exit 2). leases [--agent A] [--expiring H]: held leases, soonest first, last column CONTACT (blank when unset; JSON contact|null); in a registry git clone a last line `(as of registry SHA7, committed AGE ago)` (on the `no leases` line itself when empty), JSON registry_state (as status; null outside a git clone) and the registry-clone-behind WARN on stderr; doctor warns on leases lapsing within 2h or expired-unswept. Unparseable lease fields: shown INVALID, writes refused; `release NAME --force --reason TEXT` clears.
3186
- gate validate receipt; gate-pending -> verified-private; --receipt/--comparator PATH: a path that exists as given (cwd-relative or absolute) is used as given; a relative one missing from the cwd but present under the package checkout (or --check --repo DIR) is resolved there with a stderr note, a `· receipt R resolved against the package checkout: P` line and JSON resolved_paths[] {what, arg, path, base} (the same relative path, never another matching receipt; also comparator NAME); otherwise refused naming the caller cwd, the checkout, both paths tried and the fix (absolute path, run from the checkout, or --repo DIR with --check). --check takes no lease and checks none: --check --agent A runs the check with one stderr note ("lean-pkg: note: gate --check takes no lease and checks none; --agent A is used by the writing gate (see next:)"); --check --refresh-formalization is a usage error (exit 2: it writes). --check reads the lease from the local registry clone, never fetched: JSON registry_state (as in status; null outside a git clone) and, when the clone is behind its last-fetched origin/BRANCH, one stderr `lean-pkg: WARN: registry clone is N commit(s) behind origin/BRANCH as last fetched (lease state may be stale): git -C DIR pull --ff-only, or lean-pkg doctor --fetch` before the checks. A passing --check (ok, and a status the writing gate takes: gate-pending, public, or any with --regate) ends with "next: lean-pkg gate NAME --receipt R [--comparator C] [--regate [--reason T]] [--refuse-private] [--refuse-dirty] --agent A": the evidence flags as given (shell-quoted), --agent A when given, else the placeholder AGENT; JSON next_command (that string; null when the check fails or the status needs another step first, which a check line names). With --check --repo DIR away from the registered local_path it adds "(the writing gate binds the registered local_path P, not --repo: run it there, or move the record with `lean-pkg update NAME --path DIR --reason TEXT`)". identical re-gate = no-op "already gated". A receipt whose lean_toolchain is on lean-pkg's toolchain advisories list (known Lean kernel/runtime soundness bugs, src/lean_pkg/data/toolchain-advisories.yaml): one stderr line "WARN: toolchain advisory ID: TOOLCHAIN has a known Lean soundness bug, fixed in vX.Y.Z; LINK ..." per entry and JSON toolchain_advisories[] {id, toolchain, summary, fixed_in, links[], date_added} ([] when none; the same in gate --check, receipt check and palomar check, there after the verdict line), never a refusal. gate/regate record the receipt's lean_toolchain and mathlib_rev[:10] into lean_toolchain/mathlib_pin when each agrees with lean-toolchain / lake-manifest.json at the receipt commit (a prefix match is unchanged; one "pins updated" line; event and JSON pins {field: {from, to}}); a receipt whose lean_toolchain or mathlib_rev (prefix-equal) disagrees with lean-toolchain / the mathlib rev in lake-manifest.json committed at its commit is refused; with no readable mathlib entry the rev is not checked and the pin is kept: "NAME: pins kept: receipt mathlib_rev X does not match lake-manifest.json at <c12> (unreadable)", JSON pins_kept {field: {receipt, manifest}}; --check reports both, nothing written. --check also prints stderr `WARN: palomar: not submittable at <c12>: ...` when the package aims at Palomar (upstream_target palomar or a palomar entry, not scratch/archived/upstreamed: audit's predicate) and `palomar check` finds error gaps at the receipt commit (JSON palomar_check {ready, commit, errors, warns, codes, command, skipped}; skipped is null for an aiming package and "not aiming at Palomar" otherwise, with other fields still filled; null without a readable checkout), never a refusal; report_sha256 must equal the SHA-256 of <c12>-<job slug>-verify.redacted.log wherever found (beside the receipt, .lean-receipts/, tracked at HEAD), else refused; a <name>.gz copy (receipt --compress-log) is stream-decompressed and its UNCOMPRESSED bytes must hash to report_sha256 (never the .gz hash), the .gz to report_compressed.sha256 and the length equal report_compressed.bytes when recorded, output past that refused (gzip-bomb guard); none found (or a copy unreadable) is refused too: "report log missing: <name> ...", naming where it looked and the path to restore it to (docs/receipts.md "Restoring preserved evidence"); the same check runs wherever a recorded lower-tier receipt is judged (ledger/promote, next, comparator, palomar, index check); JSON report_log {checked, log, where[], copy[]}; the sealed log beside --receipt is copied beside the canonical .lean-receipts/<c12>-<job>.json when no copy is there, so it verifies on its own. Every check of both copies runs before either is written (a refusal writes nothing); a symlinked .lean-receipts or destination file is refused. --regate [--reason T]: re-gate verified-private (or public) in one step, status unchanged, event regated {previous_commit, commit, job_id, reason[, non_descendant]}; the commit must descend from the gated one unless --reason; plain gate on verified-private is refused naming --regate; --check --regate writes nothing. claims.yaml tracked at the receipt commit (never the working tree) must pass the claims/1 schema and every claim's decl must occur in its file at that commit (claims sync's check), else refused, nothing copied (JSON claims_schema {checked, commit, file, ok, claims, errors[], declarations {checked, ok, problems[]}}). Judged on the receipt commit's tree, refused (sources not bound): a committed symlink with an absolute or `..` target, or one resolving into .lean-receipts/ or to the formalization.yaml pointer; a lake-manifest.json `path` package whose dir leaves the package dir, or is (or passes through) a symlink, a submodule gitlink or an untracked dir (.lake/), or contains a gitlink. A tracked in-package path dependency is fine. Progress files (PROGRESS.md, state file, ledgers) live outside the package dir: any other change inside it needs a new receipt, and so does a .gitattributes/.gitmodules/.lfsconfig changed at the repo root or between it and a subdirectory package, unless the package opted in: lean-pkg-binding.yaml (schema: lean-pkg-binding/1, docs_descendants: true, optional build_inputs) committed in the package dir and read at the receipt commit C only (never the working tree, HEAD or a commit between; strict: an unknown or repeated key, an anchor/alias/tag, a non-literal true/false, a symlink/gitlink/dir or > 64 KiB does not opt in and is named; a copy under .lean-receipts/, at the repo root above a subdir package or in a nested package is not this package's), or, with no file at C, the record (update --accept-docs-descendants --reason R; docs_descendants: true); a record docs_descendants: false vetoes a committed true, and once the file exists at C it decides (a record true is then ignored): then HEAD may also be a docs-only descendant of the receipt commit C, where no build input under the package dir changed (*.lean, lakefile.*, lake-manifest.json, lean-toolchain at any depth, the build_inputs globs of the file and the record, files the receipt's checker names; always refused: a symlink or gitlink added/changed/removed, a changed file a committed symlink points to, .gitattributes, .gitmodules, .lfsconfig, claims.yaml, lean-pkg-binding.yaml at any depth, and for a subdirectory package a .gitattributes/.gitmodules/.lfsconfig at the repo root or in any directory between it and the package dir; formalization.yaml keeps its derived-keys rule). The gated commit stays C; text "✓ HEAD <c12> is a docs-only descendant of <c12> (N non-build file(s): ...; opted in at <c12> by lean-pkg-binding.yaml)" (or "...; opted in by the registry record)"); gate/regate/comparator events and --json (and --check) add descendant_of C, docs_paths[] (<= 50) and opt_in {source: committed|registry, commit: C, path: lean-pkg-binding.yaml|null}; an evidence-only admission adds none. The registry route is deprecated (removed no earlier than 1.0.0): when it admitted HEAD, gate, gate --check and comparator (attach, --check) print one stderr line "WARN: deprecated: NAME: the docs-only rule admitted HEAD through the registry record's docs_descendants: true, with no lean-pkg-binding.yaml at <c12>; replacement: `lean-pkg update NAME --write-binding-file`, then commit ..." and add JSON deprecations[] {id registry-docs-descendants, message, replacement, earliest_removal, removal_rule} (never in the event); publish (read-only checklist) does so, plus a WARN item, whenever the opt-in exists only in the record; page --write too, which prints the move to lean-pkg-binding.yaml as deferred advice (--json deferred[] apart from outputs[]; the file only with --write-binding-file, into the working tree, never staged; docs/page.md); no file and no record opt-in, or the file at C: no such line or key. A refusal under the opt-in says "docs-only rule (<source>)". Without the opt-in a refusal the docs rule would have admitted adds the hint (commit lean-pkg-binding.yaml, or `update NAME --accept-docs-descendants`); a refusal also names a file at C that does not opt in, the record's veto, and "lean-pkg-binding.yaml was added after <c12>; the opt-in is read at the bound commit only". Readers without a registry read the same file at C: `receipt check --repo DIR --commit C` (the outside referee) applies it by default (a row "PASS opt-in: lean-pkg-binding.yaml at <c12> opts in to docs-only descendants (build_inputs: N glob(s))", or SKIP naming a false/invalid file, one added after C, or --evidence-only; rule line "docs-only: the author's opt-in, lean-pkg-binding.yaml committed at <c12>"; JSON docs_descendants, evidence_only, opt_in {source: committed|referee|null, commit, path, build_inputs, file, problems}); --evidence-only ignores it; --docs-descendants is the referee's choice for a package without the file (a committed false/invalid file overrides it); both flags: exit 2; and index add / index check without a registry read it at the entry's pin (with a registry, the record precedence above).
3187
+ gate validate receipt; gate-pending -> verified-private; --receipt/--comparator PATH: a path that exists as given (cwd-relative or absolute) is used as given; a relative one missing from the cwd but present under the package checkout (or --check --repo DIR) is resolved there with a stderr note, a `· receipt R resolved against the package checkout: P` line and JSON resolved_paths[] {what, arg, path, base} (the same relative path, never another matching receipt; also comparator NAME); otherwise refused naming the caller cwd, the checkout, both paths tried and the fix (absolute path, run from the checkout, or --repo DIR with --check). --check takes no lease and checks none: --check --agent A runs the check with one stderr note ("lean-pkg: note: gate --check takes no lease and checks none; --agent A is used by the writing gate (see next:)"); --check --refresh-formalization is a usage error (exit 2: it writes). --check reads the lease from the local registry clone, never fetched: JSON registry_state (as in status; null outside a git clone) and, when the clone is behind its last-fetched origin/BRANCH, one stderr `lean-pkg: WARN: registry clone is N commit(s) behind origin/BRANCH as last fetched (lease state may be stale): git -C DIR pull --ff-only, or lean-pkg doctor --fetch` before the checks. A passing --check (ok, and a status the writing gate takes: gate-pending, public, or any with --regate) ends with "next: lean-pkg gate NAME --receipt R [--comparator C] [--regate [--reason T]] [--refuse-private] [--refuse-dirty] --agent A": the evidence flags as given (shell-quoted), --agent A when given, else the placeholder AGENT; the writing gate's own next: is `lean-pkg claims sync NAME [--agent A]` (JSON next_command) when claims.yaml is tracked at the gated commit and claims_synced_commit is neither that commit nor HEAD, printed, never run; JSON next_command (that string; null when the check fails or the status needs another step first, which a check line names). With --check --repo DIR away from the registered local_path it adds "(the writing gate binds the registered local_path P, not --repo: run it there, or move the record with `lean-pkg update NAME --path DIR --reason TEXT`)". identical re-gate = no-op "already gated". A receipt whose lean_toolchain is on lean-pkg's toolchain advisories list (known Lean kernel/runtime soundness bugs, src/lean_pkg/data/toolchain-advisories.yaml): one stderr line "WARN: toolchain advisory ID: TOOLCHAIN has a known Lean soundness bug, fixed in vX.Y.Z; LINK ..." per entry and JSON toolchain_advisories[] {id, toolchain, summary, fixed_in, links[], date_added} ([] when none; the same in gate --check, receipt check and palomar check, there after the verdict line), never a refusal. gate/regate record the receipt's lean_toolchain and mathlib_rev[:10] into lean_toolchain/mathlib_pin when each agrees with lean-toolchain / lake-manifest.json at the receipt commit (a prefix match is unchanged; one "pins updated" line; event and JSON pins {field: {from, to}}); a receipt whose lean_toolchain or mathlib_rev (prefix-equal) disagrees with lean-toolchain / the mathlib rev in lake-manifest.json committed at its commit is refused; with no readable mathlib entry the rev is not checked and the pin is kept: "NAME: pins kept: receipt mathlib_rev X does not match lake-manifest.json at <c12> (unreadable)", JSON pins_kept {field: {receipt, manifest}}; --check reports both, nothing written. --check also prints stderr `WARN: palomar: not submittable at <c12>: ...` when the package aims at Palomar (upstream_target palomar or a palomar entry, not scratch/archived/upstreamed: audit's predicate) and `palomar check` finds error gaps at the receipt commit (JSON palomar_check {ready, commit, errors, warns, codes, command, skipped}; skipped is null for an aiming package and "not aiming at Palomar" otherwise, with other fields still filled; null without a readable checkout), never a refusal; report_sha256 must equal the SHA-256 of <c12>-<job slug>-verify.redacted.log wherever found (beside the receipt, .lean-receipts/, tracked at HEAD), else refused; a <name>.gz copy (receipt --compress-log) is stream-decompressed and its UNCOMPRESSED bytes must hash to report_sha256 (never the .gz hash), the .gz to report_compressed.sha256 and the length equal report_compressed.bytes when recorded, output past that refused (gzip-bomb guard); none found (or a copy unreadable) is refused too: "report log missing: <name> ...", naming where it looked and the path to restore it to (docs/receipts.md "Restoring preserved evidence"); the same check runs wherever a recorded lower-tier receipt is judged (ledger/promote, next, comparator, palomar, index check); JSON report_log {checked, log, where[], copy[]}; the sealed log beside --receipt is copied beside the canonical .lean-receipts/<c12>-<job>.json when no copy is there, so it verifies on its own. Every check of both copies runs before either is written (a refusal writes nothing); a symlinked .lean-receipts or destination file is refused. --regate [--reason T]: re-gate verified-private (or public) in one step, status unchanged, event regated {previous_commit, commit, job_id, reason[, non_descendant]}; the commit must descend from the gated one unless --reason; plain gate on verified-private is refused naming --regate; --check --regate writes nothing. claims.yaml tracked at the receipt commit (never the working tree) must pass the claims/1 schema and every claim's decl must occur in its file at that commit (claims sync's check), else refused, nothing copied (JSON claims_schema {checked, commit, file, ok, claims, errors[], declarations {checked, ok, problems[]}}). Judged on the receipt commit's tree, refused (sources not bound): a committed symlink with an absolute or `..` target, or one resolving into .lean-receipts/ or to the formalization.yaml pointer; a lake-manifest.json `path` package whose dir leaves the package dir, or is (or passes through) a symlink, a submodule gitlink or an untracked dir (.lake/), or contains a gitlink. A tracked in-package path dependency is fine. Progress files (PROGRESS.md, state file, ledgers) live outside the package dir: any other change inside it needs a new receipt, and so does a .gitattributes/.gitmodules/.lfsconfig changed at the repo root or between it and a subdirectory package, unless the package opted in: lean-pkg-binding.yaml (schema: lean-pkg-binding/1, docs_descendants: true, optional build_inputs) committed in the package dir and read at the receipt commit C only (never the working tree, HEAD or a commit between; strict: an unknown or repeated key, an anchor/alias/tag, a non-literal true/false, a symlink/gitlink/dir or > 64 KiB does not opt in and is named; a copy under .lean-receipts/, at the repo root above a subdir package or in a nested package is not this package's), or, with no file at C, the record (update --accept-docs-descendants --reason R; docs_descendants: true); a record docs_descendants: false vetoes a committed true, and once the file exists at C it decides (a record true is then ignored): then HEAD may also be a docs-only descendant of the receipt commit C, where no build input under the package dir changed (*.lean, lakefile.*, lake-manifest.json, lean-toolchain at any depth, the build_inputs globs of the file and the record, files the receipt's checker names; always refused: a symlink or gitlink added/changed/removed, a changed file a committed symlink points to, .gitattributes, .gitmodules, .lfsconfig, claims.yaml, lean-pkg-binding.yaml at any depth, and for a subdirectory package a .gitattributes/.gitmodules/.lfsconfig at the repo root or in any directory between it and the package dir; formalization.yaml keeps its derived-keys rule). The gated commit stays C; text "✓ HEAD <c12> is a docs-only descendant of <c12> (N non-build file(s): ...; opted in at <c12> by lean-pkg-binding.yaml)" (or "...; opted in by the registry record)"); gate/regate/comparator events and --json (and --check) add descendant_of C, docs_paths[] (<= 50) and opt_in {source: committed|registry, commit: C, path: lean-pkg-binding.yaml|null}; an evidence-only admission adds none. The registry route is deprecated (removed no earlier than 1.0.0): when it admitted HEAD, gate, gate --check and comparator (attach, --check) print one stderr line "WARN: deprecated: NAME: the docs-only rule admitted HEAD through the registry record's docs_descendants: true, with no lean-pkg-binding.yaml at <c12>; replacement: `lean-pkg update NAME --write-binding-file`, then commit ..." and add JSON deprecations[] {id registry-docs-descendants, message, replacement, earliest_removal, removal_rule} (never in the event); publish (read-only checklist) does so, plus a WARN item, whenever the opt-in exists only in the record; page --write too, which prints the move to lean-pkg-binding.yaml as deferred advice (--json deferred[] apart from outputs[]; the file only with --write-binding-file, into the working tree, never staged; docs/page.md); no file and no record opt-in, or the file at C: no such line or key. A refusal under the opt-in says "docs-only rule (<source>)". Without the opt-in a refusal the docs rule would have admitted adds the hint (commit lean-pkg-binding.yaml, or `update NAME --accept-docs-descendants`); a refusal also names a file at C that does not opt in, the record's veto, and "lean-pkg-binding.yaml was added after <c12>; the opt-in is read at the bound commit only". Readers without a registry read the same file at C: `receipt check --repo DIR --commit C` (the outside referee) applies it by default (a row "PASS opt-in: lean-pkg-binding.yaml at <c12> opts in to docs-only descendants (build_inputs: N glob(s))", or SKIP naming a false/invalid file, one added after C, or --evidence-only; rule line "docs-only: the author's opt-in, lean-pkg-binding.yaml committed at <c12>"; JSON docs_descendants, evidence_only, opt_in {source: committed|referee|null, commit, path, build_inputs, file, problems}); --evidence-only ignores it; --docs-descendants is the referee's choice for a package without the file (a committed false/invalid file overrides it); both flags: exit 2; and index add / index check without a registry read it at the entry's pin (with a registry, the record precedence above).
3187
3188
  flags: --receipt PATH (required), --comparator PATH (optional), --refuse-private (private paths in a receipt: refuse, exit 1,
3188
3189
  nothing copied; default a stderr WARN "receipt field F contains a ... (kept: ...; --refuse-private refuses such a receipt)" + JSON private_strings[{field, kind}]), --refuse-dirty (modified tracked files; default WARN + JSON dirty[]), --refresh-formalization [--agent A] (then regenerate formalization.yaml + pointer in one step, JSON "formalization": {...}; lease + schema checked BEFORE the gate; identical re-gate with a current file: refused, nothing written; no pointer recorded yet: the derived-only formalization.yaml exception applies to the path it will own), --check (read-only, any status: every gate validation vs HEAD, both tiers with --comparator; ✓ lines or gate's refusal; claims.yaml at the receipt commit: ✓ schema ok / ✗ first error (exit 1) / · not tracked; no write, no event; exit 0/1; JSON event gate-checked, checks[], claims_schema; comparator --check prints the same binding ✓ lines), --check --repo DIR (validate against the checkout DIR, not the registered local_path, this call only: never saved; stderr note; JSON repo_override {path, registered_path, remote_match}, null without it; DIR must be a git work tree and, when it has remotes, one must be the package's repo (a local-path repo /p also matches Host:/p, ssh://Host/p, file:///p; DIR = the registered local_path needs no remote), else the caller vouches; a writing gate refuses --repo, exit 2: it binds the registered checkout (drop --repo to gate it), move that with update --path). Success (and promote --yes) ends with a results-ledger: line (JSON rl_reminder, rl_hint): lean-pkg keeps no results ledger, the outcome is in `status NAME` and `claims ledger NAME`; add it to the project's own results ledger if it keeps one (docs/lifecycle.md#results-ledger)
3189
3190
  ex: lean-pkg gate my-lean --receipt /tmp/receipt.json --comparator /tmp/comparator.json | receipt slurm --job J --log PATH --receipt-commit SHA [--stdout JOB.out] [--stderr JOB.err] [--checker TEXT] [--repo DIR] [--redact REGEX]... [--sacct-file F] [--out PATH] [--append-readme] (no registry): writes the lower-tier receipt from a finished Slurm job; refuses (exit 1, nothing written) unless sacct's main job line is COMPLETED 0:0, the stdout's verify-log-sha256 = sha256(raw log) and pre-manifest-sha256 = post-manifest-sha256 = sha256(lake-manifest.json at SHA) (no --stdout: the log's own `verify-log-sha256:` line = sha256 of the log minus that line), stderr is empty, lean_toolchain/mathlib_rev from SHA agree with any log line, sorry 0 and axioms from the log (sorry-count:/axioms: lines, else 'sorry' warnings/#print axioms output; a sorry-count: below the log's own 'sorry' warnings, or an axioms: line omitting an axiom its #print axioms output reports, is refused; universe suffixes .{u} ignored), a checker (--checker or checker:), a log commit: line equal to SHA (none: refused without --stdout; with --stdout a WARN "the verify log has no commit: line; it is bound to the commit only through lake-manifest.json", JSON log_commit_bound false, also in the written receipt, and a `- WARN:` line in the README entry), fields read from the RAW log (a redaction that removes or alters a sorry warning, #print axioms output, a build-completion line or a key: line other than checker: is refused; checker is published redacted), no committed symlink at SHA into .lean-receipts/, and no public-safety blocking hit is left after redacting /tmp/<account>-job, /scratch/<user>/ and --redact (blocking also this machine's user and host names and a bare /home/<x>, /Users/<x>); --append-readme: a symlinked or non-UTF-8 README.md refuses before writing; job_id slurm-<J>; writes .lean-receipts/<c12>-slurm-<J>.json + <c12>-slurm-<J>-verify.redacted.log (report_sha256; --compress-log: <...>.log.gz instead, deterministic gzip, report_sha256 still of the uncompressed log, additive report_compressed {format gzip, sha256 of .gz, bytes}, restore gzip -dc X.log.gz > X.log; without it a log over 90 MiB WARNs naming the flag; log_commit_bound true/false; with --stdout also job_stdout_sha256 + manifest_sha256; additive keys gate ignores: it never reads log_commit_bound), prints the README entry (with --stdout a `- Seal:` line naming both; --append-readme: appended to .lean-receipts/README.md) and `gate NAME --check --receipt PATH`; --json {ok, receipt, log, report_sha256, job_id, sealed[] {role, path, sha256, receipt_key} (the exact files bound; systemd's `properties` is the raw unsealed capture), checks[], refusals[], ...}; --template (no other flag, no registry): print a minimal sbatch wrapper emitting every line the receipt reads (stdout seal lines, empty stderr, checker:/sorry-count:/axioms: in the log; exact-runtime preflight before any tool runs: LC_ALL=C LANG=C PYTHONUTF8=1 (#SBATCH --export line + export; stderr stays strict, never filtered) and a `type -P` probe of the host tools (+EXTRA_TOOLS) and, under $RUN, the first word of VERIFY_CMD/AXIOMS_CMD/LEAN_PATH_CMD (+lean beside lake, +RUN_TOOLS): a missing one fails the job before the work, log line runtime-preflight: ok (...); optional artifact seal ARTIFACTS_DIR=<dir relative to the job's tree, or to $WORK with ARTIFACTS_BASE=work>: after the audit the job copies every regular file under it to ARTIFACTS_OUT (default $OUT_DIR/artifacts-<J>, never overwritten) with artifacts.sha256, sorted `<path> <size> <sha256>` lines (a symlink, special file or newline name fails the job), and prints `artifacts-manifest-sha256 <hex>` on stdout before post-manifest-sha256); --check --log PATH [--stdout] [--stderr] [--receipt-commit SHA] [--job J --sacct-file F]: preflight a job's files, every problem named, no sacct, nothing written, exit 0/1, --json {ok, log_commit_bound (true/false; null without --receipt-commit), checks[], problems[]}; --contracts-preflight [--repo DIR] (before sbatch, a mode of its own; not with --job/--log/--receipt-commit or another mode): the same contracts-only diagnostic on every comparator configuration of the checkout, its modules built there; refuses (exit 1) when one differs, a configured module is not built or the diagnostic cannot run; writes nothing; --json {ok, contracts_preflight, written: [], checks[], refusals[], report}; --preflight-deps (--deps-tar T | --deps-dir D) [--receipt-commit SHA, default HEAD] [--entries GLOB]... (before sbatch, reads only, builds and writes nothing, exit 0/1): the import closure of the entry files committed at SHA (default Verify/**/*.lean, Audit/**/*.lean, OwnedAudit/**/*.lean, **/AxiomCheck*.lean, **/TypeCheck*.lean, **/Examples*.lean, **/OwnedAudit*.lean), followed through the package's modules and the dependency sources in the cache, must have every external module's .olean and .ilean (regular files) in exactly one manifest package (import Mathlib = Mathlib.olean and everything Mathlib.lean imports, transitively; toolchain roots Init/Std/Lean/Lake aside), every manifest git package present at its rev (.git/HEAD); --json {ok, preflight_deps, commit, entries[], required_external_modules, missing_count, missing[] {module, package, files, required_by}, checks[], problems[]}; + --fill-plan DONOR [--plan-out FILE] [--base-list FILE] (read-only; steps 1-4 of docs/receipts.md "Filling missing dependency artifacts from a pinned donor"): every missing module (no 500 cap), each with every regular file DONOR holds under its path in the package's .lake/build or build (lib/lean, lib, ir: <path>.<any extension>) with size and sha256; refuses (exit 1, refusals[] {code, reason}) on base-problem (a preflight problem other than missing files: not fillable), donor-cache, donor-toolchain (DONOR/lean-toolchain not the commit's byte for byte), donor-manifest (a manifest package not at its rev, the preflight's pin check), donor-source-edits (git status --porcelain --untracked-files=no non-empty, an index entry marked assume-unchanged or skip-worktree, an untracked or ignored *.lean/lakefile/lean-toolchain/lake-manifest.json outside .lake/, no .git directory or unreadable; GIT_OPTIONAL_LOCKS=0, the checkout's core.fsmonitor off), olean-header (a candidate .olean's first 80 bytes (46 for format 1) differ from the base's, which must agree), donor-lacks-module (no .olean/.ilean in DONOR either), base-overlap (an addition is a base member, a --base-list name, or under a non-directory member), package-build (under the package's own .lake/build or a root namespace), plan-out (exists, inside DONOR/the base/.lake, unwritable); --plan-out FILE, only when ok: FILE = additions one per line (relative to the directory holding .lake, for tar -T) + FILE.provenance.json (schema lean-pkg-fill-provenance/1: commit, lean_toolchain, manifest_revs, base, donor, donor_checks, plan, additions, created_utc; collector provenance, never a job seal), never overwritten; the archive is written by the user and the preflight rerun on it confirms the fill; --json {ok, preflight_deps, fill_plan, commit, entries[], required_external_modules, missing_count, missing[], base, donor, donor_checks[] {check, ok, detail}, plan[] {module, package, lacking, required_by, fillable, files[] {path, size, sha256}, bytes}, not_fillable[], refusals[], totals {missing_modules, fillable_modules, files, bytes}, plan_out, checks[], problems[]}; --artifacts DIR [--artifacts-manifest NAME] (needs --stdout; also with --check): sha256(DIR/NAME, default artifacts.sha256) must equal the stdout's one artifacts-manifest-sha256 line, and every file under DIR is rehashed in 1 MiB chunks against it (missing, extra, changed files, symlinks, special files, path traversal, duplicate or unsorted entries refuse; previously copied files are adopted only by this rehash, never by another attempt's hashes); the receipt gains artifacts_manifest_sha256 (additive, gate ignores it) and the manifest is written beside it as <c12>-slurm-<J>-artifacts.sha256 (sealed[] role artifacts.sha256), JSON artifacts {ok, dir, files, bytes, manifest, manifest_sha256}; without --artifacts nothing changes; --seal-sacct [--user NAME] (optional, additive; not with --check/--template/--preflight-deps; --job a number J or J_T; --out only inside <repo>/.lean-receipts/): seal the job's sacct record as `receipt comparator --seal-sacct` does: live sacct runs `SLURM_TIME_FORMAT=%Y-%m-%dT%H:%M:%S%z sacct -j J --format=JobID,State,ExitCode,Start,End,Elapsed,TotalCPU,User,NodeList -P` (or --sacct-file F, that output with its header); refuses unless Start..End (zoned) contain the log's generated-at: line (none: refused) and User = this account (live) or --user (not checked otherwise; node: not checked, the receipt names none); writes <c12>-slurm-<J>-sacct.txt (JobID|State|ExitCode|Start|End|Elapsed, UTC; no user or node names) and the additive slurm_sacct {schema slurm-sacct-seal/1, job, file, sha256, state, exit_code, start, end, elapsed, checks, source} into the receipt, a `- Seal: sacct record ...` README line, sealed[] role sacct.txt (receipt_key slurm_sacct.sha256), JSON slurm_sacct (its sacct object without user/node names); gate, gate --check, receipt check and every core.validate_receipt caller then refuse the receipt unless that record is committed at HEAD and still hashes and parses to the block ("sacct seal record missing or changed: ..." / "sacct seal: ..."); a receipt without the block is judged as before | receipt systemd (alias local) --unit U --log PATH --receipt-commit SHA [--properties-file F | --run [--memory-max 8G] [--memory-swap-max 0] [--cpu-quota 400%] [--runtime-max 4h] [--setenv K=V]... [--require-tools A,B,...]... [--contracts-preflight] [--properties-out PATH] -- CMD...] + the same --stdout/--stderr/--checker/--repo/--redact/--out/--append-readme/--json: the same receipt from a finished systemd --user service unit; the unit state comes from --run (lean-pkg runs CMD bounded via systemd-run --user -p RemainAfterExit=yes, WorkingDirectory=--repo, so the finished unit stays loaded: properties are captured to <log>.unit.properties before it is stopped and reset; --require-tools: each named executable resolved with type -P in the unit's PATH before the unit is created (paths and sha256 to stderr and --json run_tools; a missing one refuses, nothing run; --contracts-preflight: the contracts-only diagnostic (comparator check --contracts-only) on every comparator configuration before the unit is created: a configuration that differs, a configured module not built (the refusal names the lake build) or a diagnostic that cannot run refuses, nothing run or written; --json contracts_preflight {ok, report}; never in the receipt); the checkout must be at SHA with no tracked change and no untracked file (less .lean-receipts/, .lake/ and the run's own files; ignored files are not bound) under the package dir before and after), --properties-file (saved `systemctl --user show U -p ...` + a Hostname= line) or live `systemctl --user show U`; refuses unless LoadState=loaded, Id=U, terminal (failed/inactive or active+exited), Result=success (oom-kill, timeout, signal named), ExecMainCode exited with ExecMainStatus 0, NRestarts 0, plus every receipt slurm seal/field/redaction check (optional stdout invocation-id = InvocationID); job_id systemd-user:<U>:<InvocationID>@<host label> (label h-<12 hex of sha256(lower-cased host name)>; the name itself is never written); also writes <c12>-<slug>-unit.properties (additive unit_properties_sha256); built-in redaction <repo>, <HOME>, /run/user/<UID>/; --run interrupted (SIGINT/SIGTERM/SIGHUP) while waiting: the unit is not stopped, its temporary LAKE_CACHE_DIR is kept while the unit may still run (removed when it is gone or finished), exit 128+N, and the recovery command `lean-pkg receipt systemd --unit U --log ... --receipt-commit ...` (no --run) is printed with a WARN that recovery skips the source-unchanged-during-the-run check | receipt ci --log PATH [--receipt-commit SHA, default GITHUB_SHA] [--attest: the job attests (verify.yml, S4): ci.attestation = <c12>-gha-R-A.sigstore.json, the Sigstore bundle the next step (actions/attest-build-provenance) signs over the receipt and its log; refused without an OIDC token] + the same --checker/--repo/--redact/--out/--compress-log/--append-readme/--json (no --stdout: the log carries its own verify-log-sha256: seal; proposal 0008 S2; inside a GitHub Actions job, the last step of lean-pkg's reusable .github/workflows/verify.yml; no registry, no token): the same receipt with job_id gha-<GITHUB_RUN_ID>-<GITHUB_RUN_ATTEMPT> and the additive ci block built from the runner's variables (job_workflow = the OIDC token's job_workflow_ref claim when the job has id-token: write, else null; the token is never printed or written); refuses (exit 1, nothing written) outside GitHub Actions (GITHUB_ACTIONS != true), on a self-hosted runner (naming receipt local), a missing GITHUB_SERVER_URL/GITHUB_REPOSITORY/GITHUB_REPOSITORY_ID/GITHUB_RUN_ID/GITHUB_RUN_ATTEMPT/GITHUB_JOB/GITHUB_EVENT_NAME/GITHUB_SHA/GITHUB_WORKFLOW_REF/GITHUB_WORKFLOW_SHA/RUNNER_ENVIRONMENT/RUNNER_OS/RUNNER_ARCH, an event other than push/workflow_dispatch, a server other than https://github.com, --receipt-commit != GITHUB_SHA, the workflow file missing at GITHUB_WORKFLOW_SHA (shallow clone named), a failed OIDC token request, a block failing level 1, plus every receipt slurm seal/field/redaction check; built-in redaction <repo>, <GITHUB_WORKSPACE>, <RUNNER_TEMP>, <RUNNER_TOOL_CACHE>, <HOME> (also /home/runner), /run/user/<UID>/; after writing prints exactly one `::notice title=lean-pkg-receipt::receipt_sha256=<hex> report_sha256=<hex>` (stderr under --json) and appends to GITHUB_STEP_SUMMARY; --json adds ci, producer; --collect RUN [--attempt N] [--repo DIR] [--json] (on your machine; never commits or pushes): gh run download of artifact lean-pkg-receipt-RUN-N (your gh login; no --attempt: the run's only lean-pkg-receipt-RUN-* artifact), the receipt checked as gate --check does against the checkout (validator incl. ci level 1, report_sha256 against the log), receipt + log copied into .lean-receipts/, and the Sigstore bundle ci.attestation names (refused when the artifact lacks it or its subjects are not exactly the receipt and the log); refuses (exit 1, nothing copied) on no gh, no artifact, several artifacts without --attempt, not exactly one <c12>-gha-R-A.json, ci.run_id != RUN or run_attempt != N, a receipt the gate refuses, other bytes at the destination, a symlinked .lean-receipts/; --json {ok, run_id, attempt, receipt, log, copied[] {path, sha256}, checks[], next, refusals[]}; --template (no other flag): print the caller workflow (on push + workflow_dispatch, permissions contents: read + id-token: write, uses: lean-pkg/lean-pkg/.github/workflows/verify.yml@<40-hex: the installed lean-pkg's commit when pip recorded one, else a placeholder>), --json {ok, template, pinned}
3190
- verify NAME [--work-dir DIR] [--unit U] [--script verify.sh] [--judges N] [--agent A] [--reason T] [--dry-run]: the newcomer's one step to verified-private on this machine. Refuses first (nothing run) an unknown package, a checkout that is not a clean commit (untracked files other than this commit's receipts), no committed verify script, no comparator config, status scratch/archived/upstreamed, --registry-snapshot. Then step 0, the preflight (#325; read-only, also under --dry-run): the claims/1 check of `claims check --file` on the claims file committed at HEAD, and, when coverage.yaml is committed, the offline coverage check against the files and comparator configs committed at HEAD (placeholders and an unposted manuscript only warn there); a refusal stops verify with that message, nothing run, nothing written; the working tree is never read; and port-modules' import scan at HEAD: a module-headed file importing a non-module file of the package is a warning naming the files and `lean-pkg palomar port-modules NAME --dry-run`, never a refusal (skipped silently when the tree is unreadable). Then, each printed and run as its own invocation, at HEAD X: (1) `receipt comparator --repo CHECKOUT` (COMPARATOR_RECEIPT_NO_MATHLIB=1 when verify.sh declares `mathlib-rev: none` and the manifest has no Mathlib), (2) `receipt systemd --unit NAME-verify --receipt-commit X --log W/verify.log ... --run -- bash verify.sh W/verify.log` (W outside the checkout: $XDG_STATE_HOME/lean-pkg/verify/NAME/<c12>-<stamp>), (3) an active package: `update NAME --status gate-pending --reason ...`, (4) `gate NAME --receipt LOWER --comparator COMP` (--regate for verified-private/public). Comparator first: it refuses untracked files, the lower tier allows .lean-receipts/; nothing is committed between them, so both bind X. A receipt of X already present is reused. Writes only what those commands write, commits nothing in the checkout; HEAD an evidence-only descendant of the gated commit: `already verified`, nothing run. coverage.yaml at HEAD with `stack: S`: lean-toolchain and the lake-manifest.json Mathlib commit checked against stack S, then the comparator receipt's tool digests; `on stack S (supported until D)` or a warning per difference, a stack past its window or undeclared here warns too; never refuses (proposal 0004). --json {ok, name, commit, checkout, dry_run, status_before, status, work_dir, steps[{step, command, rc, skipped?, output?}] (first {step "0/3 preflight", rc, output {ok, claims, coverage, module_imports[{file, line, module, target}], warnings[]}}), receipts{lower, comparator}, gate, next[], stack (null without the key: {name, declared, matches, supported_until, window, toolchain, mathlib, comparator_tools, lean_pkg, mismatches[], warnings[]}), already?, error?}
3191
+ verify NAME [--work-dir DIR] [--unit U] [--script verify.sh] [--judges N] [--memory-max BYTES] [--agent A] [--reason T] [--dry-run]: the newcomer's one step to verified-private on this machine. Refuses first (nothing run) an unknown package, a checkout that is not a clean commit (untracked files other than this commit's receipts), no committed verify script, no comparator config, status scratch/archived/upstreamed, --registry-snapshot. Then step 0, the preflight (#325; read-only, also under --dry-run): the claims/1 check of `claims check --file` on the claims file committed at HEAD, and, when coverage.yaml is committed, the offline coverage check against the files and comparator configs committed at HEAD (placeholders and an unposted manuscript only warn there); a refusal stops verify with that message, nothing run, nothing written; the working tree is never read; and port-modules' import scan at HEAD: a module-headed file importing a non-module file of the package is a warning naming the files and `lean-pkg palomar port-modules NAME --dry-run`, never a refusal (skipped silently when the tree is unreadable). Then, each printed and run as its own invocation, at HEAD X: (1) `receipt comparator --repo CHECKOUT` (COMPARATOR_RECEIPT_NO_MATHLIB=1 when verify.sh declares `mathlib-rev: none` and the manifest has no Mathlib), (2) `receipt systemd --unit NAME-verify --receipt-commit X --log W/verify.log ... --run -- bash verify.sh W/verify.log` (W outside the checkout: $XDG_STATE_HOME/lean-pkg/verify/NAME/<c12>-<stamp>), (3) an active package: `update NAME --status gate-pending --reason ...`, (4) `gate NAME --receipt LOWER --comparator COMP` (--regate for verified-private/public). Comparator first: it refuses untracked files, the lower tier allows .lean-receipts/; nothing is committed between them, so both bind X. A receipt of X already present is reused. Writes only what those commands write, commits nothing in the checkout; HEAD an evidence-only descendant of the gated commit: `already verified`, nothing run. coverage.yaml at HEAD with `stack: S`: lean-toolchain and the lake-manifest.json Mathlib commit checked against stack S, then the comparator receipt's tool digests; `on stack S (supported until D)` or a warning per difference, a stack past its window or undeclared here warns too; never refuses (proposal 0004). --json {ok, name, commit, checkout, dry_run, status_before, status, work_dir, steps[{step, command, rc, skipped?, output?}] (first {step "0/3 preflight", rc, output {ok, claims, coverage, module_imports[{file, line, module, target}], warnings[]}}), receipts{lower, comparator}, gate, next[], stack (null without the key: {name, declared, matches, supported_until, window, toolchain, mathlib, comparator_tools, lean_pkg, mismatches[], warnings[]}), already?, error?}
3191
3192
  comparator attach NAME --receipt PATH (old spelling: comparator NAME --receipt PATH) attach comparator evidence to a verified-private/public package;
3192
3193
  no status change; event comparator-attached; identical re-attach = no-op; another receipt for the same commit: --replace keeps the old one as <c12>-comparator.replaced-<stamp>.json, event comparator-replaced {replaced}. It is required by promote.
3193
3194
  The receipt is written by `lean-pkg receipt comparator` (the comparator-receipt program: the same code and flags) on a host its policy allows (a GitHub-hosted runner, checked first: GITHUB_ACTIONS=true and RUNNER_ENVIRONMENT=github-hosted, recorded as host_policy "GitHub Actions run R attempt A", job_id gha-R-A and the ci block of receipt ci less verify_log_sha256, refusing (exit 1, nothing written) on a runner variable missing or malformed, an event other than push/workflow_dispatch, a server other than github.com, the workflow file missing at GITHUB_WORKFLOW_SHA or GITHUB_SHA != the checkout's HEAD; GITHUB_ACTIONS without RUNNER_ENVIRONMENT, or a self-hosted runner, is not recognized and the other rules apply; proposal 0008 S5, verify.yml with comparator: true runs it after the AppArmor userns sysctl and comparator host-check --routes; a Slurm job, a host in
@@ -3229,7 +3230,7 @@ formalization NAME [--write] [--no-registry] [--out PATH] [--force [--reason TEX
3229
3230
  comparator_config, declaration, file; definition holes carry judged_as, from lean-pkg-signoff.json or the deprecated inline key, null when unsigned; with a headline configuration (--headline-config PATH, else registry headline_config, else comparator.headline.json when tracked; Palomar's six keys only, else refused) its theorems only, when every name is covered (the --coverage rule) by a config with the same challenge/solution modules in the gate-bound comparator receipt validated at HEAD and every hole is signed in lean-pkg-signoff.json by such a config, else refused naming them; no receipt validating at HEAD: not applied, stderr warning, the default; --write records --headline-config; JSON headline {config, source, applied, reason, receipt, theorems} or null), alignment (claims.yaml). Every other
3230
3231
  key is KEPT from the file; first render seeds authors from consent[] owner/author, else "[PLACEHOLDER] ..." + stderr warning (never
3231
3232
  invented: no paper titles). --write: idempotent; lease + update checked BEFORE writing (foreign lease: --force --reason); a file differing only in derived keys is refreshed (JSON refreshed_derived), one whose kept keys differ needs --force (named; JSON kept_overwritten);
3232
- --write also sets the registry pointer (a registry write); --write --no-registry: the file only, registry untouched (no lock/--commit). --repo DIR: read that checkout instead of local_path for this call (never saved; not with --write, exit 2; the checkout rules and stderr note of page --repo): claims, comparator configs, the kept keys and the receipts at DIR's committed HEAD, never its working tree; the registry's gate receipt feeds status.sorry_count/axioms/evidence only when it validates at that HEAD, else they are omitted with a warning; JSON repo_override {path, registered_path, remote_match, head, source committed-head, receipt_facts {receipt, included, reason}}, null without it. Validated against the vendored v0.4 schema (jsonschema, else structural). audit: formalization-missing/-drift. docs/formalization.md | coverage check NAME [--file PATH] [--allow-private-manuscript] read-only; exit 0/1. coverage.yaml (schema coverage/1, package dir, committed at HEAD; --file: a working copy) is the paper-centric map: manuscript {title, version: "arXiv:IDvN" | {repo https, commit 40hex, sha256 64hex} | "unposted" (refused without --allow-private-manuscript)}, summary (one line), rows[{paper {number, title, label?}, class same-assumptions|inputs-supplied|outside, claims[] (ids in claims.yaml at HEAD; none for outside; superseded refused), inputs[] (required for inputs-supplied, refused for same-assumptions; each a one-line string or {hypothesis, text} (exact keys; hypothesis a name in the hypotheses of a claim the row names, each once; checked in both forms)), note?, conclusion? full|weaker|special-case (proposal 0010: how the Lean conclusion relates to the paper's, independently of class, which names the hypotheses; absent = full), conclusion_scope? (one line, what the Lean proves relative to the paper's result: required for weaker and special-case, refused when conclusion is absent or full; both keys refused on an outside row and on a library row; an older lean-pkg refuses them), witness? (proposal 0011: the claims.yaml witness of one of the row's claims, its headline; refused on an outside row; allowed on a library row; the page shows Hypotheses can be met with the ledger's state checked, not yet checked or wrong type)}], nothing_excluded {reason} (only when no outside row; one of the two is required), compute[{cluster: easley, jobs: [slurm-J]}] (each job a Slurm receipt committed under .lean-receipts/; cluster github-actions: jobs gha-<run_id>-<run_attempt>, each a lower-tier or comparator receipt with that job_id whose ci block passes level 1; a gha- receipt without the block, or with a failing one, is named in the refusal), lean_pkg_version {version, doi} (checked against lean-pkg's own CITATION.cff when readable), stack lts-YYYY.04|10 (optional, both kinds: the LTS stack the package opts into, name shape checked here; doctor NAME, verify and page check the pins against it, never failing a check). The lean-scope-page rules that apply: no placeholder text (FILL-ME, TODO, TBD, FIXME, XXX), every named claim's file committed at HEAD, every theorem of the recorded comparator receipt the decl of a claim some row names (a configuration lean-pkg-signoff.json marks smoke {reason}, at the receipt's commit or HEAD, is exempt, its theorems the decl of no row's claim; a smoke theorem credits no claim anywhere and the page lists it as a smoke check, never a result), every configuration there with definition_names carrying judged_as.reviewer. Strict: exact key sets, closed enums, duplicate keys refused. --json {ok, name, file, rows, counts, conclusions ({full, weaker, special-case} over the rows with a Lean counterpart; null for a library or an invalid file), manuscript, private_manuscript, errors[], warnings[]}. Unlisted assumptions (proposal 0003, open question 7): a warning, never an error, for each assumption a theorem mapped by a same-assumptions or inputs-supplied row takes that is not listed (a binder headed by a Prop def of the package, per the hyp-decl lines of the gate receipt's sealed log, named neither by the claim's hypotheses nor by a {hypothesis, text} input of the row); no warning without that log or its hyp-probe/1 section; receipt check's coverage item carries the first one and stays PASS. Offline form (#328): coverage check --file PATH [--claims PATH] [--comparator PATH ...] [--allow-private-manuscript], no NAME: no registry, no receipt; runs the schema and length limits, manuscript version, lean_pkg_version, the claims file's claims/1 schema and the coverage package equal to its package, row claim ids (present, not superseded), a warning per reusable claim no row names, each --comparator theorem the decl of a claim a row names (lean-pkg-signoff.json smoke beside the coverage file exempts; skipped when a named claim's Lean file is not readable under the coverage file's directory); lists as skipped what needs the registry, HEAD or a receipt (compute receipts, claim files at HEAD, definition sign-off, e-print baseline) or a missing input; verdict first and last; --claims/--comparator with NAME, or neither NAME nor --file: exit 2; --json adds offline true, claims_file, comparator[], checks[{check, status pass|fail|warn|skipped, detail}], skipped[]. docs/page.md | page NAME [--write [--write-binding-file] | --check | --out PATH] [--site DIR] [--html PATH] [--repo DIR] [--strict-preview] [--corroborate] [--attested [--trusted-root FILE]] [--allow-private-manuscript] [--agent A] the README verification section, rendered between <!-- lean-pkg:page:begin --> and <!-- lean-pkg:page:end --> in the package README.md from coverage.yaml, claims.yaml, the claims ledger (promote stage: a row is "verified" only when the ledger closes every claim it names; a verified row with conclusion weaker or special-case says "Verified: a weaker statement." or "Verified: a special case.", never the bare "Verified.", every such row carries a "Conclusion." line with its conclusion_scope, and the header's verified count says how many of the verified prove a weaker statement or a special case; a row without the key or with full renders as before), the receipts committed under .lean-receipts/ (allow-listed fields only: commit, toolchain, Mathlib rev, sorry count, axioms, theorem/permitted-axiom/definition names, date, SHA-256, slurm-J job ids; never hosts, paths, users), lean-toolchain, lake-manifest.json, CITATION.cff (authors required), registry repo/status/license_spdx/doi. Sections: status capsule, paper-Lean map, Not formalized, trust boundary, reproduce, evidence, citation, license, acknowledgments (always the lean-pkg credit with the concept DOI; the Easley sentence only when coverage.yaml compute names easley jobs backed by committed Slurm receipts; a site's sentence needs its jobs backed AND their corroboration level >= its scheduler's sentence_level: offline every job is level 1, Slurm's level, so the GitHub Actions sentence (level 2, a corroborated run) is rendered only under --corroborate and a README carrying it fails --check and the publish --dry-run page line without it). --corroborate: ask the public GitHub REST API (api.github.com only, https, a timeout; GH_TOKEN or GITHUB_TOKEN only raises the rate limit, never printed or written) about every listed gha- job, as receipt check --corroborate does, against the registry's repository (by numeric id); the GitHub Actions sentence renders, {runs} filled with [run R attempt A](https://github.com/OWNER/REPO/actions/runs/R/attempts/A) links, only when every job reaches level 2; a failure (404, 403/429, network error, redirect off api.github.com) fails closed, is a warning naming why, and leaves the sentence out; JSON sites.github-actions gains corroboration {job: rows[]} and runs[]. --attested [--trusted-root FILE]: level 3 for every listed gha- job (receipt check --attested's checks: the committed Sigstore bundle verified by gh attestation verify); the sentence renders at level 3 too, so it survives the run's records expiring; sites.<name>.level/levels reach 3 (both flags: level 3 needs both answers). Deterministic; every rendered string passes the public-safety scanner + the package's .lean-pkg-private-patterns (a blocking hit refuses). Default: print the block. --write: replace only the marked block (append when absent; prose outside untouched; never commits; a foreign live lease refuses without --agent HOLDER); not a registry write (no lock/--commit). --check: exit 1 when README.md is missing, the block is missing or stale, the lean-pkg credit is missing, or the Easley sentence appears without backing; writes nothing. --site DIR: also write DIR/verification.md (the full page, one H1) and DIR/coverage.md (every row: claims, decls, each claim's ledger status, inputs, note) for MkDocs; --html PATH: one static HTML file of both (no script, no external asset, inline CSS, every text escaped, links only https/#anchor); the same bytes whatever DIR; atomic writes, symlink targets refused; with --check they are compared instead (missing/stale: exit 1), and every hand-written *.md under DIR (outside _*, .*, site/, node_modules/, vendor/ directories) is read: a <details>/<div>/<section>/<aside>/<article>/<blockquote> block holding Markdown (a table row, fence, list item, heading, quote, or inline emphasis, code or link) without a markdown attribute (markdown="1" or bare markdown) is a problem (exit 1), since GitHub Pages (kramdown) and MkDocs (md_in_html) publish it as literal text; fenced code is never read. User text is escaped in every output (&<> as entities, Markdown markup backslash-escaped). --repo DIR: read that checkout instead of local_path for this call (CI; not with --write), at its committed HEAD: when the registry's gate receipt does not validate there (bound to HEAD or an evidence-only descendant), the links and Lean statements are read at HEAD, no receipt fact is shown, a 'Preview of commit' note names both commits, and repo_override gains head, anchor_commit, receipt_facts {receipt, commit, included, binds_head, reason}; a receipt that binds HEAD but does not validate is a failed check ('The recorded build check does not validate', never called drift by --check). --check --repo on a preview: its differences from the receipt-bound README block and --site/--html files are warnings (exit 0, JSON preview true, current null); real problems (block missing, markers, credit, unbacked site sentence, an invalid receipt binding HEAD) still exit 1; --strict-preview (only with --check --repo, else exit 2) makes the differences fail. publish --dry-run carries the same check as one checklist line (JSON `page`). --json {ok, name, readme, markdown, written, unchanged, current, preview, problems[], warnings[], site_files[{path, status written|unchanged|current|missing|stale|refused}], html_blocks[{path, line, tag, sample}] (only with --check --site: the blocks above), outputs[] (with --write/--out/--site/--html: the files this run wrote for the documentation commit, README.md relative to the package directory), deferred[] (--write on a gated package whose docs-only opt-in is only in the record: the lean-pkg-binding.yaml migration {id binding-file, path, state deferred|written|unchanged|refused, written, command `lean-pkg update NAME --write-binding-file`, when, advice}, never part of that commit; the file is written only with --write-binding-file), repo_override, rows, counts, verified_rows, verified_conclusions ({weaker, special-case}: the verified rows of each; only when a row carries conclusion), ledger_status, ledger_digest, private_manuscript, manuscript, paper_status (the record's paper.status or null), manuscript_note ("published-unanchored" when manuscript.version is unposted and paper.status published: the page then cites the paper as published with its exact source not publicly anchored, never "an unposted draft"; else null), easley {backed, jobs} (the legacy key, easley only), sites {NAME: {backed, jobs, level (lowest corroboration level of its jobs; null when none listed), levels {job: level}, sentence}}, receipts}. docs/page.md | formalization anchor NAME --arxiv <id>v<N> (--from-file E-PRINT | --fetch) [--compare-tex LOCAL.tex [--accept-diff REASON]] [--main-tex PATH] [--write] [--agent A] pin the companion to one arXiv version: the version is required (unversioned: exit 2); network only with --fetch (https, 60 s, 64 MiB); the e-print (tar.gz|gz|tar; PDF-only refused; absolute/../link/device members refuse it) is read in memory and recorded in data/source-baselines/arXiv-<id>v<N>.json (source-baseline/1, deterministic: e-print sha256, .tex/.bib/.bbl/.sty sha256, main_tex, compare, retrieved_at/arxiv_api only when fetched); without --write a dry run; --write refuses unless tied (coverage.yaml already that version, a bound {sha256} equal to an e-print file, or --compare-tex identical / --accept-diff REASON, recorded), then sets coverage.yaml manuscript.version + eprint_sha256 and the formalization.yaml sources[].id; never the registry or a commit; a move from another version prints rebase_command (claims rebase). | formalization kept [--repo DIR] [--file REL] [--at REV] [--against REV2] read-only, no registry: the kept view (formalization.DERIVED_PATHS and the renderer's acknowledgements lines removed; YAML 1.1 safe, timestamps kept as strings) as canonical JSON (sort_keys, separators ',' ':', ensure_ascii false, UTF-8, no trailing newline) + its sha256, for a release-input audit; --at REV: the committed file; --against REV2: changed_kept_keys, exit 1 when any; --json {schema formalization-kept/1, kept_view, canonical, sha256, commit, derived_paths, against {rev, commit, sha256}, changed_kept_keys, same}. docs/formalization.md#the-kept-view
3233
+ --write also sets the registry pointer (a registry write); --write --no-registry: the file only, registry untouched (no lock/--commit). --repo DIR: read that checkout instead of local_path for this call (never saved; not with --write, exit 2; the checkout rules and stderr note of page --repo): claims, comparator configs, the kept keys and the receipts at DIR's committed HEAD, never its working tree; the registry's gate receipt feeds status.sorry_count/axioms/evidence only when it validates at that HEAD, else they are omitted with a warning; JSON repo_override {path, registered_path, remote_match, head, source committed-head, receipt_facts {receipt, included, reason}}, null without it. Validated against the vendored v0.4 schema (jsonschema, else structural). audit: formalization-missing/-drift. docs/formalization.md | coverage check NAME [--file PATH] [--allow-private-manuscript] read-only; exit 0/1. coverage.yaml (schema coverage/1, package dir, committed at HEAD; --file: a working copy) is the paper-centric map: manuscript {title, version: "arXiv:IDvN" | {repo https, commit 40hex, sha256 64hex} | "unposted" (refused without --allow-private-manuscript)}, summary (one line), rows[{paper {number, title, label?}, class same-assumptions|inputs-supplied|outside, claims[] (ids in claims.yaml at HEAD; none for outside; superseded refused), inputs[] (required for inputs-supplied, refused for same-assumptions; each a one-line string or {hypothesis, text} (exact keys; hypothesis a name in the hypotheses of a claim the row names, each once; checked in both forms)), note?, conclusion? full|weaker|special-case (proposal 0010: how the Lean conclusion relates to the paper's, independently of class, which names the hypotheses; absent = full), conclusion_scope? (one line, what the Lean proves relative to the paper's result: required for weaker and special-case, refused when conclusion is absent or full; both keys refused on an outside row and on a library row; an older lean-pkg refuses them), witness? (proposal 0011: the claims.yaml witness of one of the row's claims, its headline; refused on an outside row; allowed on a library row; the page shows Hypotheses can be met with the ledger's state checked, not yet checked or wrong type)}], nothing_excluded {reason} (only when no outside row; one of the two is required), compute[{cluster: easley, jobs: [slurm-J]}] (each job a Slurm receipt committed under .lean-receipts/; cluster github-actions: jobs gha-<run_id>-<run_attempt>, each a lower-tier or comparator receipt with that job_id whose ci block passes level 1; a gha- receipt without the block, or with a failing one, is named in the refusal), lean_pkg_version {version, doi} (checked against lean-pkg's own CITATION.cff when readable), stack lts-YYYY.04|10 (optional, both kinds: the LTS stack the package opts into, name shape checked here; doctor NAME, verify and page check the pins against it, never failing a check). The lean-scope-page rules that apply: no placeholder text (FILL-ME, TODO, TBD, FIXME, XXX), every named claim's file committed at HEAD, every theorem of the recorded comparator receipt the decl of a claim some row names (a configuration lean-pkg-signoff.json marks smoke {reason}, at the receipt's commit or HEAD, is exempt, its theorems the decl of no row's claim; a smoke theorem credits no claim anywhere and the page lists it as a smoke check, never a result), every configuration there with definition_names carrying judged_as.reviewer. Strict: exact key sets, closed enums, duplicate keys refused; x- extension keys (proposal 0015) only at the top level and on rows, shape-checked (name x-[a-z0-9][a-z0-9_-]*, <=64 chars; a scalar or a list/mapping of them nested <=2 levels, <=4000 bytes as JSON; <=16 per object) and never read, judged or shown; a line after the verdict names each with its row count. --json {ok, name, file, rows, counts, conclusions ({full, weaker, special-case} over the rows with a Lean counterpart; null for a library or an invalid file), manuscript, private_manuscript, errors[], warnings[], extension_keys[] (<root>.x-..., rows[N].x-...)}. Unlisted assumptions (proposal 0003, open question 7): a warning, never an error, for each assumption a theorem mapped by a same-assumptions or inputs-supplied row takes that is not listed (a binder headed by a Prop def of the package, per the hyp-decl lines of the gate receipt's sealed log, named neither by the claim's hypotheses nor by a {hypothesis, text} input of the row); no warning without that log or its hyp-probe/1 section; receipt check's coverage item carries the first one and stays PASS. Offline form (#328): coverage check --file PATH [--claims PATH] [--comparator PATH ...] [--allow-private-manuscript], no NAME: no registry, no receipt; runs the schema and length limits, manuscript version, lean_pkg_version, the claims file's claims/1 schema and the coverage package equal to its package, row claim ids (present, not superseded), a warning per reusable claim no row names, each --comparator theorem the decl of a claim a row names (lean-pkg-signoff.json smoke beside the coverage file exempts; skipped when a named claim's Lean file is not readable under the coverage file's directory); lists as skipped what needs the registry, HEAD or a receipt (compute receipts, claim files at HEAD, definition sign-off, e-print baseline) or a missing input; verdict first and last; --claims/--comparator with NAME, or neither NAME nor --file: exit 2; --json adds offline true, claims_file, comparator[], checks[{check, status pass|fail|warn|skipped, detail}], skipped[]. docs/page.md | page NAME [--write [--write-binding-file] | --check | --out PATH] [--site DIR] [--html PATH] [--repo DIR] [--strict-preview] [--corroborate] [--attested [--trusted-root FILE]] [--allow-private-manuscript] [--agent A] the README verification section, rendered between <!-- lean-pkg:page:begin --> and <!-- lean-pkg:page:end --> in the package README.md from coverage.yaml, claims.yaml, the claims ledger (promote stage: a row is "verified" only when the ledger closes every claim it names; a verified row with conclusion weaker or special-case says "Verified: a weaker statement." or "Verified: a special case.", never the bare "Verified.", every such row carries a "Conclusion." line with its conclusion_scope, and the header's verified count says how many of the verified prove a weaker statement or a special case; a row without the key or with full renders as before), the receipts committed under .lean-receipts/ (allow-listed fields only: commit, toolchain, Mathlib rev, sorry count, axioms, theorem/permitted-axiom/definition names, date, SHA-256, slurm-J job ids; never hosts, paths, users), lean-toolchain, lake-manifest.json, CITATION.cff (authors required), registry repo/status/license_spdx/doi. Sections: status capsule, paper-Lean map, Not formalized, trust boundary, reproduce, evidence, citation, license, acknowledgments (always the lean-pkg credit with the concept DOI; the Easley sentence only when coverage.yaml compute names easley jobs backed by committed Slurm receipts; a site's sentence needs its jobs backed AND their corroboration level >= its scheduler's sentence_level: offline every job is level 1, Slurm's level, so the GitHub Actions sentence (level 2, a corroborated run) is rendered only under --corroborate and a README carrying it fails --check and the publish --dry-run page line without it). --corroborate: ask the public GitHub REST API (api.github.com only, https, a timeout; GH_TOKEN or GITHUB_TOKEN only raises the rate limit, never printed or written) about every listed gha- job, as receipt check --corroborate does, against the registry's repository (by numeric id); the GitHub Actions sentence renders, {runs} filled with [run R attempt A](https://github.com/OWNER/REPO/actions/runs/R/attempts/A) links, only when every job reaches level 2; a failure (404, 403/429, network error, redirect off api.github.com) fails closed, is a warning naming why, and leaves the sentence out; JSON sites.github-actions gains corroboration {job: rows[]} and runs[]. --attested [--trusted-root FILE]: level 3 for every listed gha- job (receipt check --attested's checks: the committed Sigstore bundle verified by gh attestation verify); the sentence renders at level 3 too, so it survives the run's records expiring; sites.<name>.level/levels reach 3 (both flags: level 3 needs both answers). Deterministic; every rendered string passes the public-safety scanner + the package's .lean-pkg-private-patterns (a blocking hit refuses). Default: print the block. --write: replace only the marked block (append when absent; prose outside untouched; never commits; a foreign live lease refuses without --agent HOLDER); not a registry write (no lock/--commit). --check: exit 1 when README.md is missing, the block is missing or stale, the lean-pkg credit is missing, or the Easley sentence appears without backing; writes nothing. --site DIR: also write DIR/verification.md (the full page, one H1) and DIR/coverage.md (every row: claims, decls, each claim's ledger status, inputs, note) for MkDocs; --html PATH: one static HTML file of both (no script, no external asset, inline CSS, every text escaped, links only https/#anchor); the same bytes whatever DIR; atomic writes, symlink targets refused; with --check they are compared instead (missing/stale: exit 1), and every hand-written *.md under DIR (outside _*, .*, site/, node_modules/, vendor/ directories) is read: a <details>/<div>/<section>/<aside>/<article>/<blockquote> block holding Markdown (a table row, fence, list item, heading, quote, or inline emphasis, code or link) without a markdown attribute (markdown="1" or bare markdown) is a problem (exit 1), since GitHub Pages (kramdown) and MkDocs (md_in_html) publish it as literal text; fenced code is never read. User text is escaped in every output (&<> as entities, Markdown markup backslash-escaped). --repo DIR: read that checkout instead of local_path for this call (CI; not with --write), at its committed HEAD: when the registry's gate receipt does not validate there (bound to HEAD or an evidence-only descendant), the links and Lean statements are read at HEAD, no receipt fact is shown, a 'Preview of commit' note names both commits, and repo_override gains head, anchor_commit, receipt_facts {receipt, commit, included, binds_head, reason}; a receipt that binds HEAD but does not validate is a failed check ('The recorded build check does not validate', never called drift by --check). --check --repo on a preview: its differences from the receipt-bound README block and --site/--html files are warnings (exit 0, JSON preview true, current null); real problems (block missing, markers, credit, unbacked site sentence, an invalid receipt binding HEAD) still exit 1; --strict-preview (only with --check --repo, else exit 2) makes the differences fail. publish --dry-run carries the same check as one checklist line (JSON `page`). --json {ok, name, readme, markdown, written, unchanged, current, preview, problems[], warnings[], site_files[{path, status written|unchanged|current|missing|stale|refused}], html_blocks[{path, line, tag, sample}] (only with --check --site: the blocks above), outputs[] (with --write/--out/--site/--html: the files this run wrote for the documentation commit, README.md relative to the package directory), deferred[] (--write on a gated package whose docs-only opt-in is only in the record: the lean-pkg-binding.yaml migration {id binding-file, path, state deferred|written|unchanged|refused, written, command `lean-pkg update NAME --write-binding-file`, when, advice}, never part of that commit; the file is written only with --write-binding-file), repo_override, rows, counts, verified_rows, verified_conclusions ({weaker, special-case}: the verified rows of each; only when a row carries conclusion), ledger_status, ledger_digest, private_manuscript, manuscript, paper_status (the record's paper.status or null), manuscript_note ("published-unanchored" when manuscript.version is unposted and paper.status published: the page then cites the paper as published with its exact source not publicly anchored, never "an unposted draft"; else null), easley {backed, jobs} (the legacy key, easley only), sites {NAME: {backed, jobs, level (lowest corroboration level of its jobs; null when none listed), levels {job: level}, sentence}}, receipts}. docs/page.md | formalization anchor NAME --arxiv <id>v<N> (--from-file E-PRINT | --fetch) [--compare-tex LOCAL.tex [--accept-diff REASON]] [--main-tex PATH] [--write] [--agent A] pin the companion to one arXiv version: the version is required (unversioned: exit 2); network only with --fetch (https, 60 s, 64 MiB); the e-print (tar.gz|gz|tar; PDF-only refused; absolute/../link/device members refuse it) is read in memory and recorded in data/source-baselines/arXiv-<id>v<N>.json (source-baseline/1, deterministic: e-print sha256, .tex/.bib/.bbl/.sty sha256, main_tex, compare, retrieved_at/arxiv_api only when fetched); without --write a dry run; --write refuses unless tied (coverage.yaml already that version, a bound {sha256} equal to an e-print file, or --compare-tex identical / --accept-diff REASON, recorded), then sets coverage.yaml manuscript.version + eprint_sha256 and the formalization.yaml sources[].id; never the registry or a commit; a move from another version prints rebase_command (claims rebase). | formalization kept [--repo DIR] [--file REL] [--at REV] [--against REV2] read-only, no registry: the kept view (formalization.DERIVED_PATHS and the renderer's acknowledgements lines removed; YAML 1.1 safe, timestamps kept as strings) as canonical JSON (sort_keys, separators ',' ':', ensure_ascii false, UTF-8, no trailing newline) + its sha256, for a release-input audit; --at REV: the committed file; --against REV2: changed_kept_keys, exit 1 when any; --json {schema formalization-kept/1, kept_view, canonical, sha256, commit, derived_paths, against {rev, commit, sha256}, changed_kept_keys, same}. docs/formalization.md#the-kept-view
3233
3234
  search TERM [--package NAME] [--offline] [--sources a,b,c] [--loogle] [--loogle-query PATTERN] [--require-complete] [--cache-dir DIR] [--record [--repo DIR]] [--json] prior-art search. Routed by shape: a Lean pattern (→ -> ∀ fun : ( ? _ ⊢ " math operators, Nat.x dotted names) is `signature` and goes to Loogle; prose is `natural-language` and Loogle is skipped ("natural-language query; Loogle takes declaration patterns ..."); --loogle forces it; --json: top-level and per-source route. Loogle parses Lean, not prose: a term mixing the two fails there ("query not understood: Unknown identifier ...; Loogle takes Lean names, terms and patterns ... --loogle-query"); keep the prose as TERM and pass the Lean part as --loogle-query PATTERN (Loogle gets PATTERN whatever the route, every other source the term; --json loogle_query; usage error when --sources leaves out loogle). --require-complete: exit 1 when complete is false (a source skipped, failed in part, capped or incomplete); the output is printed in full first, --json gets ok false + error "search incomplete (--require-complete): skipped: ...; <why>", stderr the same line; without it an incomplete search still exits 0. Cache: Palomar snapshots and the Reservoir index are cached under $XDG_CACHE_HOME/lean-pkg (default ~/.cache/lean-pkg) and refreshed by any online search, --record or not (the registry is never written without --record); each block's cache_writes[] and --json cache {root: --cache-dir|XDG_CACHE_HOME|default, writes[] (paths relative to the cache root)} say what was written, and the text adds "cache: wrote ... under ..."; --cache-dir DIR uses DIR as the lean-pkg cache for that search only (or set XDG_CACHE_HOME for a whole session).
3234
3235
  order: registry, index, loogle, leansearch, reservoir, palomar, github; each "ok" or "skipped: <reason>" (never zero hits).
3235
3236
  local score: exact alias or package name 3, keyword 2, every term word 1; registry hits: packages (name, notes, owner_project, repo; hit_kind package) and claims (a conditional claim, one that lists hypotheses or an index claim whose derived status is conditional, reads `(<status> (conditional), trust ...)` and its --json hit gains conditional: true; no key otherwise); a package without synced claims is searched by declaration in its checkout at HEAD (tracked *.lean names + docstrings; hit_kind "declaration (unclaimed)", trust none, file PATH:LINE, after claim hits), and a "registry coverage: N of M packages have no synced claims: D searched by declaration only, K not searched (no checkout: ...)" line precedes consulted: (a package the registry could not search makes the registry block incomplete: its reason counts them, truncated_sources gains registry, complete is false, --require-complete exits 1, and the record never says "Not found in" the registry) (--json coverage {claims, declaration_only, not_searched[], not_searched_reasons[] {package, code no-path|no-checkout|no-git-head|scan-error, remedy (read-only, no host path), detail (scan-error only, else null: "git grep exit N: <fixed cause>" or "git grep killed by signal N ...", never git's stderr), the coverage line names it: "scan error: NAME (git grep exit 128: ...)"}, declaration_hits_omitted}; coverage is computed per run from the registry file (read once, written atomically) and the checkouts at HEAD, with no shared cache, so two runs differ only when a checkout, its HEAD or a git grep outcome differs); any skipped source adds "incomplete: searched N of M sources; skipped: ..." before consulted: (--json complete, searched, skipped_sources[]); a source that answered only in part (GitHub code or repository search failed) stays ok with partial[] in its block, is listed in truncated_sources and named on the incomplete: line; a part that returned its result limit (GitHub 30) is listed in capped[] (cap_limit) and truncated_sources ("github: code search returned its 30-result limit"). exit 0 even with zero hits; 2 on usage errors.
@@ -3607,6 +3608,7 @@ def cmd_leases(args) -> int:
3607
3608
 
3608
3609
 
3609
3610
  def cmd_update(args) -> int:
3611
+ args.agent = default_agent(args.agent) # --agent, else $LEAN_PKG_AGENT
3610
3612
  reg_path, events_p = registry_path(args), events_path(args)
3611
3613
  sets = {}
3612
3614
  for field in ("automation", "notes", "upstream_target", "reaudit_after",
@@ -388,7 +388,7 @@ def build_parser():
388
388
  s.add_argument("--reason", default="", help="required for --status and --force")
389
389
  s.add_argument("--redetect", action="store_true",
390
390
  help="re-read lean_toolchain and mathlib_pin from the repo")
391
- s.add_argument("--agent", default=None, help="lease holder, if one is live")
391
+ s.add_argument("--agent", default=None, help="lease holder, if one is live (default: $LEAN_PKG_AGENT)")
392
392
  s.add_argument("--force", action="store_true",
393
393
  help="override a live lease held by another agent; needs --reason")
394
394
  s.add_argument("--path", default=None, metavar="HOME-RELATIVE",
@@ -510,7 +510,8 @@ def build_parser():
510
510
  s.add_argument("--agent", default=None,
511
511
  help="the agent acting (recorded as the event's actor); another agent's live lease then "
512
512
  "refuses; with --refresh-formalization: the live lease holder (the file write needs it); "
513
- "with --check: not used (a stderr note), carried into the printed next: command")
513
+ "with --check: not used (a stderr note), carried into the printed next: command; "
514
+ "default: $LEAN_PKG_AGENT (not with --check)")
514
515
  s.add_argument("--check", action="store_true",
515
516
  help="validate only, against HEAD (with --comparator: both tiers); write nothing, record "
516
517
  "nothing (works at any status), like `comparator --check`; when it passes, prints the "
@@ -63,7 +63,10 @@ UNPARSEABLE = ("✝", "⋯") # inaccessible-name dagger, elided-proo
63
63
  DECL_RE = re.compile(r"^[^\s«».]+(\.[^\s«».]+)*$")
64
64
  LAKEFILES = ("lakefile.lean", "lakefile.toml")
65
65
 
66
- # The Lean the driver writes for each declaration; it fills in __IMPORTS__ and __NAME__.
66
+ # The Lean the driver writes for each declaration; it fills in __IMPORTS__ and __NAME__. pp.deepTerms is false
67
+ # by default (Lean 4.35: threshold 50), so a statement deeper than 50 printed with an elided `⋯`, which the
68
+ # round-trip check then refused (a field report: radius_mean_anchor_paper); deepTerms true prints it whole, and
69
+ # a large pp.maxSteps keeps a long statement from being cut by the step budget either.
67
70
  LEAN_SNIPPET = """\
68
71
  __IMPORTS__
69
72
  import Lean
@@ -72,6 +75,8 @@ set_option pp.proofs true
72
75
  set_option pp.analyze true
73
76
  set_option pp.numericTypes true
74
77
  set_option pp.funBinderTypes true
78
+ set_option pp.deepTerms true
79
+ set_option pp.maxSteps 10000000
75
80
  open Lean Elab Command in
76
81
  #eval show CommandElabM Unit from do
77
82
  let env ← getEnv