lean-pkg 0.26.0__tar.gz → 0.27.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/CHANGELOG.md +90 -0
  2. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/CITATION.cff +5 -2
  3. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/PKG-INFO +1 -1
  4. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/README.md +1 -1
  5. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/pyproject.toml +1 -1
  6. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/__init__.py +1 -1
  7. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/cli.py +1 -1
  8. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/cli_parser.py +4 -0
  9. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/comparator_receipt.py +48 -13
  10. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/data/upgrade-breaking.yaml +1 -0
  11. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/formalization.py +6 -2
  12. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/gate.py +33 -13
  13. lean_pkg-0.27.0/src/lean_pkg/html_blocks.py +77 -0
  14. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/page.py +4 -0
  15. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/public_safety.py +22 -1
  16. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/receipt_systemd.py +37 -5
  17. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg.egg-info/PKG-INFO +1 -1
  18. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg.egg-info/SOURCES.txt +1 -0
  19. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_branch_notice.py +26 -0
  20. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_receipt.py +65 -2
  21. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_docs.py +52 -0
  22. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_index_built_on.py +1 -1
  23. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_page_site.py +66 -0
  24. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_public_safety.py +28 -0
  25. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_systemd.py +24 -0
  26. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/LICENSE +0 -0
  27. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/MANIFEST.in +0 -0
  28. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/PYPI.md +0 -0
  29. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/setup.cfg +0 -0
  30. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/adapters/__init__.py +0 -0
  31. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/adapters/github.py +0 -0
  32. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/adapters/leansearch.py +0 -0
  33. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/adapters/loogle.py +0 -0
  34. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/adapters/palomar.py +0 -0
  35. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/adapters/reservoir.py +0 -0
  36. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/anchor.py +0 -0
  37. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/audit.py +0 -0
  38. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/binding_file.py +0 -0
  39. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/blueprint.py +0 -0
  40. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/build_scope.py +0 -0
  41. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/ci_github.py +0 -0
  42. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/claim_axioms.py +0 -0
  43. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/claims.py +0 -0
  44. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/claims_mark.py +0 -0
  45. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/command_tree.py +0 -0
  46. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/comparator_config.py +0 -0
  47. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/comparator_contracts.py +0 -0
  48. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/comparator_stage.py +0 -0
  49. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/comparator_types.py +0 -0
  50. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/container.py +0 -0
  51. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/core.py +0 -0
  52. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/coverage.py +0 -0
  53. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/data/stacks/lts-2026.10.yaml +0 -0
  54. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/data/toolchain-advisories.yaml +0 -0
  55. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/data/verify-workflow-pins.yaml +0 -0
  56. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/deps_closure.py +0 -0
  57. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/deps_fill.py +0 -0
  58. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/dup_constants.py +0 -0
  59. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/exercise.py +0 -0
  60. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/exercise_forbid.py +0 -0
  61. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/export_paths.py +0 -0
  62. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/extract.py +0 -0
  63. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/extract_decls.py +0 -0
  64. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/extract_ledger.py +0 -0
  65. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/extract_summary.py +0 -0
  66. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/extract_types.py +0 -0
  67. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/extract_write.py +0 -0
  68. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/formalization_kept.py +0 -0
  69. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/fresh_repo.py +0 -0
  70. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/headline.py +0 -0
  71. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/help_topics.py +0 -0
  72. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/holes.py +0 -0
  73. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/host_routes.py +0 -0
  74. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/hypotheses.py +0 -0
  75. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/index.py +0 -0
  76. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/json_stdout.py +0 -0
  77. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/lake_hygiene.py +0 -0
  78. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/lean_diag.py +0 -0
  79. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/lean_scan.py +0 -0
  80. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/ledger.py +0 -0
  81. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/next_step.py +0 -0
  82. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/page_html.py +0 -0
  83. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/palomar.py +0 -0
  84. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/palomar_check.py +0 -0
  85. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/port_modules.py +0 -0
  86. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/prior_art.py +0 -0
  87. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/producer.py +0 -0
  88. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/producer_skew.py +0 -0
  89. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/publish.py +0 -0
  90. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/rebase.py +0 -0
  91. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/receipt.py +0 -0
  92. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/receipt_check.py +0 -0
  93. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/receipt_ci.py +0 -0
  94. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/recommended.py +0 -0
  95. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/report.py +0 -0
  96. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/reservoir.py +0 -0
  97. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/scaffold.py +0 -0
  98. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/schemas/formalization-0.4.schema.json +0 -0
  99. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/schemas/formalization-0.4.schema.source.txt +0 -0
  100. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/scripts/ClaimAxioms.lean +0 -0
  101. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/scripts/ContractsOnly.lean +0 -0
  102. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/scripts/DupConstants.lean +0 -0
  103. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/scripts/HypProbe.lean +0 -0
  104. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/scripts/comparator-check.sh +0 -0
  105. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/scripts/verify-comparator.sh +0 -0
  106. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/seal_bundle.py +0 -0
  107. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/search.py +0 -0
  108. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/site_profiles/easley.yaml +0 -0
  109. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/site_profiles/github-actions.yaml +0 -0
  110. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/sites.py +0 -0
  111. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/stacks.py +0 -0
  112. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/statements_module.py +0 -0
  113. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/templates/Apache-2.0.txt +0 -0
  114. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/toolchain_advisories.py +0 -0
  115. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/upgrade.py +0 -0
  116. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg/verify.py +0 -0
  117. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg.egg-info/dependency_links.txt +0 -0
  118. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg.egg-info/entry_points.txt +0 -0
  119. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg.egg-info/requires.txt +0 -0
  120. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/src/lean_pkg.egg-info/top_level.txt +0 -0
  121. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_adapters.py +0 -0
  122. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_append_note.py +0 -0
  123. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_audit_claims_coverage.py +0 -0
  124. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_audit_gh_outcomes.py +0 -0
  125. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_audit_missing_path.py +0 -0
  126. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_audit_no_github_mirror.py +0 -0
  127. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_audit_palomar.py +0 -0
  128. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_audit_receipts_paths.py +0 -0
  129. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_audit_reference_branch.py +0 -0
  130. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_binding_file.py +0 -0
  131. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_binding_file_g3.py +0 -0
  132. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_blueprint_check.py +0 -0
  133. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_bootstrap_collaborator.py +0 -0
  134. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_campaign_recovery_docs.py +0 -0
  135. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_check_changelog_releases.py +0 -0
  136. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_ci_attested.py +0 -0
  137. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_ci_comparator.py +0 -0
  138. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_ci_corroborate.py +0 -0
  139. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_ci_receipt_level1.py +0 -0
  140. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_claim_axioms.py +0 -0
  141. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_claims.py +0 -0
  142. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_claims_ledger.py +0 -0
  143. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_claims_mark.py +0 -0
  144. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_claims_rebase.py +0 -0
  145. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_cli.py +0 -0
  146. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_cli_consistency.py +0 -0
  147. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_cli_contract_argv.py +0 -0
  148. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_cli_contract_corpus.py +0 -0
  149. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_cli_contract_help.py +0 -0
  150. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_cli_contract_json.py +0 -0
  151. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_cli_contract_names.py +0 -0
  152. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_columns.py +0 -0
  153. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_command_docs.py +0 -0
  154. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_command_tree_stage2.py +0 -0
  155. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_commit.py +0 -0
  156. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator.py +0 -0
  157. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_attempts.py +0 -0
  158. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_config.py +0 -0
  159. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_contracts.py +0 -0
  160. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_coverage.py +0 -0
  161. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_host_label.py +0 -0
  162. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_list_defaults.py +0 -0
  163. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_log_transport.py +0 -0
  164. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_mismatch_next.py +0 -0
  165. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_name_hints.py +0 -0
  166. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_no_mathlib.py +0 -0
  167. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_readiness.py +0 -0
  168. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_replace.py +0 -0
  169. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_repo_claims_file.py +0 -0
  170. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_sacct_seal.py +0 -0
  171. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_stage.py +0 -0
  172. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_tool_toolchain.py +0 -0
  173. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_comparator_types.py +0 -0
  174. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_compressed_log_bindings.py +0 -0
  175. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_conditional_claims.py +0 -0
  176. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_conditional_closeout.py +0 -0
  177. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_conditional_outputs.py +0 -0
  178. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_consent_dedupe.py +0 -0
  179. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_core_split.py +0 -0
  180. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_coverage_conclusion.py +0 -0
  181. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_coverage_offline.py +0 -0
  182. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_cut_release.py +0 -0
  183. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_defaults.py +0 -0
  184. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_docs_classifier_preflight.py +0 -0
  185. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_docs_descendants.py +0 -0
  186. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_docs_old_spellings.py +0 -0
  187. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_doctor.py +0 -0
  188. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_dup_constants.py +0 -0
  189. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_evidence_formalization.py +0 -0
  190. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_exercise.py +0 -0
  191. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_exercise_course.py +0 -0
  192. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_extract_decls.py +0 -0
  193. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_extract_ledger.py +0 -0
  194. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_extract_plan.py +0 -0
  195. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_extract_summary.py +0 -0
  196. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_extract_types.py +0 -0
  197. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_fields_only.py +0 -0
  198. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_formalization.py +0 -0
  199. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_formalization_anchor.py +0 -0
  200. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_formalization_kept.py +0 -0
  201. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_formalization_refresh.py +0 -0
  202. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_formats.py +0 -0
  203. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_fresh_repo.py +0 -0
  204. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate.py +0 -0
  205. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate_binding.py +0 -0
  206. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate_binding_scope.py +0 -0
  207. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate_check.py +0 -0
  208. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate_check_next.py +0 -0
  209. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate_claims.py +0 -0
  210. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate_pins.py +0 -0
  211. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate_receipt_path.py +0 -0
  212. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate_refresh.py +0 -0
  213. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_gate_regate.py +0 -0
  214. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_headline.py +0 -0
  215. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_help_topics.py +0 -0
  216. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_hints_and_time.py +0 -0
  217. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_host_check.py +0 -0
  218. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_host_routes.py +0 -0
  219. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_hypotheses_ledger.py +0 -0
  220. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_hypotheses_probe.py +0 -0
  221. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_ignored_evidence.py +0 -0
  222. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_index_add.py +0 -0
  223. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_index_check.py +0 -0
  224. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_index_claims.py +0 -0
  225. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_index_docs_descendants.py +0 -0
  226. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_index_render.py +0 -0
  227. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_index_schema.py +0 -0
  228. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_init.py +0 -0
  229. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_input_hygiene.py +0 -0
  230. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_internal_claims.py +0 -0
  231. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_json.py +0 -0
  232. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_json_control_chars.py +0 -0
  233. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_json_stdout.py +0 -0
  234. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_judged_as.py +0 -0
  235. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_lake_cache_systemd.py +0 -0
  236. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_lake_hygiene.py +0 -0
  237. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_large_artifacts_recipe.py +0 -0
  238. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_lean_diag.py +0 -0
  239. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_lean_scan_extract.py +0 -0
  240. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_lease.py +0 -0
  241. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_lease_actor.py +0 -0
  242. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_lease_expiry_notice.py +0 -0
  243. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_lease_registry_stamp.py +0 -0
  244. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_ledger_exact_covers.py +0 -0
  245. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_ledger_golden.py +0 -0
  246. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_lifecycle_notes.py +0 -0
  247. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_llms.py +0 -0
  248. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_locking.py +0 -0
  249. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_manuscript_findings.py +0 -0
  250. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_mathlib_none.py +0 -0
  251. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_migrate.py +0 -0
  252. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_migrate_v3.py +0 -0
  253. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_namespace_notes.py +0 -0
  254. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_new.py +0 -0
  255. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_next.py +0 -0
  256. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_noninteractive.py +0 -0
  257. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_olean_manifest.py +0 -0
  258. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_outputs_golden.py +0 -0
  259. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_package_fields.py +0 -0
  260. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_packaging.py +0 -0
  261. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_page.py +0 -0
  262. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_page_repo_head.py +0 -0
  263. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_palomar_check.py +0 -0
  264. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_palomar_prepare.py +0 -0
  265. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_palomar_snapshot.py +0 -0
  266. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_paper.py +0 -0
  267. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_port_modules.py +0 -0
  268. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_prior_art.py +0 -0
  269. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_producer_skew.py +0 -0
  270. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_promote_audit.py +0 -0
  271. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_promote_scope.py +0 -0
  272. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_public_allow.py +0 -0
  273. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_public_safety_gzip.py +0 -0
  274. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_public_safety_long_line_stream.py +0 -0
  275. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_public_safety_scope.py +0 -0
  276. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_publication_hold.py +0 -0
  277. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_publish.py +0 -0
  278. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_check.py +0 -0
  279. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_check_opt_in.py +0 -0
  280. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_ci.py +0 -0
  281. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_container.py +0 -0
  282. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_private_scan.py +0 -0
  283. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_producer.py +0 -0
  284. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_slurm.py +0 -0
  285. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_slurm_artifacts.py +0 -0
  286. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_slurm_contracts_preflight.py +0 -0
  287. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_slurm_fill_plan.py +0 -0
  288. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_slurm_preflight_deps.py +0 -0
  289. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_slurm_runtime_preflight.py +0 -0
  290. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_slurm_sacct_seal.py +0 -0
  291. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_slurm_template_src.py +0 -0
  292. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_receipt_subdir_package.py +0 -0
  293. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_recommended.py +0 -0
  294. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_record.py +0 -0
  295. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_record_evidence.py +0 -0
  296. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_record_transitions.py +0 -0
  297. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_refresh_descendant.py +0 -0
  298. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_register.py +0 -0
  299. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_registry_core.py +0 -0
  300. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_registry_snapshot.py +0 -0
  301. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_release_script.py +0 -0
  302. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_release_version.py +0 -0
  303. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_repo_override.py +0 -0
  304. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_report.py +0 -0
  305. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_report_log_required.py +0 -0
  306. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_reservoir_check.py +0 -0
  307. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_review_fixes_prior_art.py +0 -0
  308. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_robustness.py +0 -0
  309. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_seal_bundle.py +0 -0
  310. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_search.py +0 -0
  311. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_search_completeness.py +0 -0
  312. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_search_declarations.py +0 -0
  313. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_search_field_coverage.py +0 -0
  314. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_search_scan.py +0 -0
  315. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_search_sources.py +0 -0
  316. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_sibling_packages.py +0 -0
  317. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_signoff_sidecar.py +0 -0
  318. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_sites.py +0 -0
  319. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_skills.py +0 -0
  320. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_smoke_configs.py +0 -0
  321. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_source_paper_ai.py +0 -0
  322. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_stack_opt_in.py +0 -0
  323. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_stacks.py +0 -0
  324. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_statements_module.py +0 -0
  325. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_status_scope.py +0 -0
  326. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_subdir_package.py +0 -0
  327. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_template_module_headers.py +0 -0
  328. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_toolchain_advisories.py +0 -0
  329. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_toolchain_floor.py +0 -0
  330. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_trust.py +0 -0
  331. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_update_publication_fields.py +0 -0
  332. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_update_relocate.py +0 -0
  333. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_upgrade.py +0 -0
  334. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_user_default.py +0 -0
  335. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_validate.py +0 -0
  336. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_verdict_first.py +0 -0
  337. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_verify_preflight.py +0 -0
  338. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_verify_workflow_oidc.py +0 -0
  339. {lean_pkg-0.26.0 → lean_pkg-0.27.0}/tests/test_wiki.py +0 -0
@@ -9,6 +9,94 @@ 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.27.0] - 2026-11-07
13
+
14
+ ### Added
15
+
16
+ - `receipt comparator --out PATH` (`comparator-receipt --out`) writes the
17
+ receipt to `PATH` and its per-configuration logs beside it, instead of
18
+ `.lean-receipts/` in the checkout, so a probe or rehearsal receipt stays
19
+ out of the package tree (#435). The receipt still names its logs under
20
+ `.lean-receipts/`, so copying the files there makes it a receipt the gate
21
+ reads. `PATH` must not exist; not with `--prepare` or `--estimate`. The
22
+ help now says that `--evidence-dir` moves only the stage logs and
23
+ `stages.json`
24
+ ([receipt comparator](docs/commands/receipt-comparator.md)).
25
+ - `gate --expect-branch NAME` (#438): a release branch gated before its merge
26
+ is now stated as intended. When the checkout is on `NAME`, the `WARN:
27
+ evaluating branch NAME, not the default D` becomes a note; on another
28
+ branch a `WARN` names both. Never a refusal; `gate --check` repeats the flag
29
+ in its `next:` command ([gate](docs/commands/gate.md)).
30
+
31
+ ### Changed
32
+
33
+ - `formalization render --help` says that `--write --no-registry` still
34
+ checks the lease (#436): the command writes `formalization.yaml` into the
35
+ package's checkout, so another agent's live lease refuses unless `--agent
36
+ HOLDER` (or `--force --reason`), although nothing is written to the
37
+ registry. Help text only; the check is unchanged.
38
+
39
+ - `page --check --site DIR` also reads the hand-written pages under `DIR`
40
+ (#428): an HTML block (`<details>`, `<div>`, `<section>`, ...) that holds
41
+ Markdown without a `markdown` attribute exits 1, naming the file and line,
42
+ because GitHub Pages and MkDocs publish its tables and code fences as
43
+ literal text while github.com shows them rendered. Write the tag as
44
+ `<details markdown="1">`. `page --check --site --json` gains `html_blocks[]`
45
+ ([docs/page.md](docs/page.md#hand-written-pages-beside-the-generated-ones)).
46
+ - Index: `markovprocess-pilot` re-pinned at `6e94db2aea80` (#429), the commit
47
+ that moves its MarkovProcess dependency to `2486404` (its upstream `main`,
48
+ Lean and Mathlib v4.35.0). Re-gated with lean-pkg 0.26.0 at that commit:
49
+ lower tier `receipt systemd --run` of `verify.sh`, comparator receipt
50
+ (toolchain mechanism, all 3 configurations pass). Entry replaced with `index
51
+ add --from-registry` (headline and its `judged_as`, field tags, consent and
52
+ notes kept; the `built_on` pin is `2486404`; the DOIs add release v0.1.2,
53
+ which Zenodo filed under a new concept DOI), and `index check` re-derives it
54
+ from the bytes at the pin.
55
+
56
+ ### Fixed
57
+
58
+ - `receipt comparator` (`comparator-receipt`) no longer refuses a tree that
59
+ is dirty only because of the receipts of the commit being receipted
60
+ (#433): untracked `.lean-receipts/<c12>-*` files for HEAD and the
61
+ `.lean-receipts/README.md` that `receipt systemd` writes are exempt from the
62
+ dirty-tree check, so the lower-tier receipt made for the same commit just
63
+ before no longer has to be moved aside and back (both tiers bind HEAD). A
64
+ modified tracked receipt, or a receipt for another commit, still counts.
65
+ - `receipt systemd --run` accepts systemd's own value forms (#434):
66
+ `--runtime-max` takes any finite systemd time span, such as `1h 30min`
67
+ (the form systemd prints; it was refused) or `1.5h`, and a bare
68
+ `--cpu-quota 200` is read as `200%` (it reached `systemd-run`, which
69
+ refused it). When `systemd-run` itself fails, the refusal names it and no
70
+ longer adds "the unit wrote no verify log", which read like a verify
71
+ failure.
72
+ - `public-safety` no longer turns common workflow words into private
73
+ patterns (#432). A record's or lease's `workspace` is free text, and each of
74
+ its tokens became a blocking pattern: a lease taken with the workspace
75
+ "public-allow commit" made `commit` private, and one package then reported
76
+ 172 false hits, because every receipt and log says "commit". Words such as
77
+ `commit`, `push`, `receipt`, `gate`, `lean`, `notes` or `refresh` (git, Lean
78
+ and lean-pkg vocabulary, and everyday English) are no longer derived; an
79
+ identifier in the same text, such as a machine name, still is.
80
+
81
+ ### Documentation
82
+
83
+ - Fourteen links on the documentation site returned 404 (#427): a relative
84
+ `.md` link whose text wrapped onto the next line was published unconverted,
85
+ because jekyll-relative-links matches link text on one line. The text of
86
+ each such link is now on one line, and the proposal 0003 prototype link
87
+ opens the directory on GitHub, since Pages serves no listing for it.
88
+ - Proposal 0011, non-vacuity witnesses on coverage rows, accepted 2026-11-07
89
+ (#430): proposal 0003's `witness` on any claim with a hypothesis, a row
90
+ `witness` key, and a page line saying the result's hypotheses can be met
91
+ ([docs/proposals](docs/proposals/README.md)).
92
+ - The ten wrapped links left in the released upgrade pages 0.17.0, 0.18.1,
93
+ 0.19.0 and 0.20.0 now convert on the site too (#431): only their line
94
+ breaks moved. A released record keeps its words; a test compares each
95
+ released page with its tag, and another refuses relative `.md` link text
96
+ that crosses a line (RELEASING.md, "Released records").
97
+
98
+ public-safety (make public-safety, --strict, history): 0 hit(s) (0 tree, 0 history); 0 blocking, 0 warning(s)
99
+
12
100
  ## [0.26.0] - 2026-11-06
13
101
 
14
102
  ### Added
@@ -97,6 +185,8 @@ full policy, and the criteria for 1.0.0, are in RELEASING.md, "When to tag".
97
185
 
98
186
  public-safety (make public-safety, --strict, history): 0 hit(s) (0 tree, 0 history); 0 blocking, 0 warning(s)
99
187
 
188
+ Zenodo version DOI: [10.5281/zenodo.24025862](https://doi.org/10.5281/zenodo.24025862)
189
+
100
190
  ## [0.25.0] - 2026-11-02
101
191
 
102
192
  ### Added
@@ -6,8 +6,8 @@ authors:
6
6
  - family-names: Chen
7
7
  given-names: Le
8
8
  affiliation: "Auburn University"
9
- version: "0.26.0"
10
- date-released: "2026-11-06"
9
+ version: "0.27.0"
10
+ date-released: "2026-11-07"
11
11
  license: Apache-2.0
12
12
  repository-code: "https://github.com/lean-pkg/lean-pkg"
13
13
  doi: 10.5281/zenodo.23272098
@@ -198,6 +198,9 @@ identifiers:
198
198
  - type: doi
199
199
  value: 10.5281/zenodo.23901343
200
200
  description: Version DOI for 0.25.0
201
+ - type: doi
202
+ value: 10.5281/zenodo.24025862
203
+ description: Version DOI for 0.26.0
201
204
  url: "https://lean-pkg.github.io/lean-pkg/"
202
205
  keywords:
203
206
  - Lean 4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lean-pkg
3
- Version: 0.26.0
3
+ Version: 0.27.0
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
@@ -363,7 +363,7 @@ DOIs. To cite a state between releases, cite the repository at a commit:
363
363
  author = {Chen, Le},
364
364
  title = {lean-pkg: a registry and trust gate for Lean 4 formalization packages},
365
365
  year = {2026},
366
- version = {0.26.0},
366
+ version = {0.27.0},
367
367
  url = {https://github.com/lean-pkg/lean-pkg},
368
368
  note = {commit <sha>}
369
369
  }
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lean-pkg"
7
- version = "0.26.0"
7
+ version = "0.27.0"
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.26.0"
3
+ __version__ = "0.27.0"
@@ -3228,7 +3228,7 @@ formalization NAME [--write] [--no-registry] [--out PATH] [--force [--reason TEX
3228
3228
  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
3229
3229
  key is KEPT from the file; first render seeds authors from consent[] owner/author, else "[PLACEHOLDER] ..." + stderr warning (never
3230
3230
  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);
3231
- --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)}], 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). 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}], 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
3231
+ --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)}], 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
3232
3232
  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).
3233
3233
  order: registry, index, loogle, leansearch, reservoir, palomar, github; each "ok" or "skipped: <reason>" (never zero hits).
3234
3234
  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.
@@ -499,6 +499,10 @@ def build_parser():
499
499
  s.add_argument("--refuse-dirty", action="store_true",
500
500
  help="refuse when tracked files are modified in the checkout; default is a WARN "
501
501
  "line (receipts are always checked against the bound commit)")
502
+ s.add_argument("--expect-branch", default=None, metavar="NAME",
503
+ help="the checkout is meant to be on branch NAME (a release branch gated before its "
504
+ "merge): when it is, the `evaluating branch NAME, not the default` WARN becomes a "
505
+ "note; when it is not, a WARN names both. Never a refusal; repeated in --check's next:")
502
506
  s.add_argument("--refresh-formalization", action="store_true",
503
507
  help="after the gate, regenerate the package's formalization.yaml (derived keys, "
504
508
  "including status.evidence; kept keys survive) and set its registry pointer; "
@@ -1972,7 +1972,10 @@ def run_estimate(project, configs, mechanism, check, verify, stages, commit, jud
1972
1972
 
1973
1973
 
1974
1974
  def dirty_paths(project: pathlib.Path, evidence: pathlib.Path) -> list[str]:
1975
- """Modified or untracked paths, ignoring the stage evidence directory when it lies in the project."""
1975
+ """Modified or untracked paths, ignoring the stage evidence directory when it lies in the project, and
1976
+ the untracked receipts of the commit being receipted: `.lean-receipts/<HEAD c12>-*` and
1977
+ `.lean-receipts/README.md` (a field request: the lower-tier receipt is written for the same commit just
1978
+ before, and both tiers must bind it; a tracked receipt file that is modified still counts)."""
1976
1979
  st = git(project, "status", "--porcelain", "--untracked-files=all")
1977
1980
  if st.returncode != 0:
1978
1981
  raise RunnerError(f"{project}: not a git repository ({st.stderr.strip()})")
@@ -1980,10 +1983,17 @@ def dirty_paths(project: pathlib.Path, evidence: pathlib.Path) -> list[str]:
1980
1983
  ev = evidence.resolve().relative_to(project.resolve()).as_posix()
1981
1984
  except ValueError:
1982
1985
  ev = None
1986
+ head = git(project, "rev-parse", "HEAD").stdout.strip()
1987
+ prefix = git(project, "rev-parse", "--show-prefix").stdout.strip() # porcelain paths are repo-relative
1988
+ receipts = f"{prefix}.lean-receipts/"
1989
+ same_commit = f"{receipts}{head[:12]}-" if re.fullmatch(r"[0-9a-f]{40}", head) else None
1983
1990
  out = []
1984
1991
  for line in st.stdout.splitlines():
1985
- path = line[3:].strip('"')
1986
- if ev and (path == ev or path.startswith(ev + "/")):
1992
+ code, path = line[:2], line[3:].strip('"')
1993
+ rel = path[len(prefix):] if prefix and path.startswith(prefix) else path
1994
+ if ev and (rel == ev or rel.startswith(ev + "/")):
1995
+ continue
1996
+ if code == "??" and same_commit and (path.startswith(same_commit) or path == receipts + "README.md"):
1987
1997
  continue
1988
1998
  out.append(path)
1989
1999
  return out
@@ -2027,7 +2037,8 @@ def run(project: pathlib.Path, check: pathlib.Path, host_policy: str = "",
2027
2037
  from_prepared: pathlib.Path | None = None, resume_command: str = "comparator-receipt",
2028
2038
  resume: bool = True, judges: int = 1, slot_spec: str | None = None,
2029
2039
  estimate: int | None = None, unit_size: int | None = None, sample_explicit: bool = False,
2030
- force_sample: bool = False, ci: dict | None = None, registry_args=None) -> dict:
2040
+ force_sample: bool = False, ci: dict | None = None, registry_args=None,
2041
+ out: pathlib.Path | None = None) -> dict:
2031
2042
  if not (project / "lean-toolchain").is_file():
2032
2043
  raise RunnerError(f"{project}: not a Lake project (no lean-toolchain)")
2033
2044
  evidence = evidence or project / DEFAULT_EVIDENCE
@@ -2267,9 +2278,11 @@ def run(project: pathlib.Path, check: pathlib.Path, host_policy: str = "",
2267
2278
  def receipt_stage(stage_log: pathlib.Path):
2268
2279
  result.update(write_receipt(project, configs, log_dir, commit, mechanism, toolchain, tools,
2269
2280
  host_policy, pathlib.Path(tmp), stages.summary(),
2270
- extra=result["extra"], config_extra=result["config_extra"], ci=ci))
2281
+ extra=result["extra"], config_extra=result["config_extra"], ci=ci,
2282
+ out=out))
2271
2283
  stage_log.write_text(f"wrote {result['receipt']} and {len(configs)} log(s)\n", encoding="utf-8")
2272
- return "ok", 0, f".lean-receipts/{commit[:12]}-comparator.json"
2284
+ return "ok", 0, (redact(result["receipt"]) if out is not None
2285
+ else f".lean-receipts/{commit[:12]}-comparator.json")
2273
2286
 
2274
2287
  stages.run("receipt", receipt_stage)
2275
2288
  return {"receipt": result["receipt"], "commit": commit, "configs": len(configs),
@@ -2280,7 +2293,7 @@ def write_receipt(project: pathlib.Path, configs: list[str], log_dir: pathlib.Pa
2280
2293
  mechanism: str, toolchain: str, tools: dict, host_policy: str, tmp: pathlib.Path,
2281
2294
  stage_summary: list[dict], extra: dict | None = None,
2282
2295
  config_extra: dict | None = None, dest: pathlib.Path | None = None,
2283
- ci: dict | None = None) -> dict:
2296
+ ci: dict | None = None, out: pathlib.Path | None = None) -> dict:
2284
2297
  """The receipt and its logs, all or nothing, into <project>/.lean-receipts/ -- or, for a partial
2285
2298
  (--slots) run, into dest (the stage directory, never the repository), suffixed `.partial`. `ci`
2286
2299
  (github_actions_ci): the run's block; the job id becomes gha-<run_id>-<run_attempt>, and a block that fails
@@ -2306,7 +2319,13 @@ def write_receipt(project: pathlib.Path, configs: list[str], log_dir: pathlib.Pa
2306
2319
  red = tmp / f"redacted-{name}.log" # #41: the committed log never names host paths
2307
2320
  red.write_bytes(redact_bytes(src_log.read_bytes()))
2308
2321
  src_log = red
2309
- staged.append((src_log, (dest / log_rel) if partial else (project / log_rel)))
2322
+ if partial:
2323
+ log_dst = dest / log_rel
2324
+ elif out is not None: # --out: the logs beside the receipt, under their .lean-receipts/ names
2325
+ log_dst = out.parent / pathlib.Path(log_rel).name
2326
+ else:
2327
+ log_dst = project / log_rel
2328
+ staged.append((src_log, log_dst))
2310
2329
  entries.append({
2311
2330
  "path": cfg_rel,
2312
2331
  "sha256": sha256_file(project / cfg_rel),
@@ -2355,8 +2374,8 @@ def write_receipt(project: pathlib.Path, configs: list[str], log_dir: pathlib.Pa
2355
2374
  + "; nothing written")
2356
2375
  rec_tmp = tmp / "receipt.json"
2357
2376
  rec_tmp.write_text(json.dumps(receipt, indent=2, sort_keys=True) + "\n")
2358
- rec_dir = dest if partial else project / ".lean-receipts"
2359
- rec_path = rec_dir / f"{commit[:12]}-comparator{sfx}.json"
2377
+ rec_dir = dest if partial else (out.parent if out is not None else project / ".lean-receipts")
2378
+ rec_path = rec_dir / f"{commit[:12]}-comparator{sfx}.json" if (partial or out is None) else out
2360
2379
  staged.append((rec_tmp, rec_path))
2361
2380
  # Everything passed: now, and only now, write into the repo — all or nothing.
2362
2381
  created_dir = not rec_dir.exists()
@@ -2383,7 +2402,7 @@ def write_receipt(project: pathlib.Path, configs: list[str], log_dir: pathlib.Pa
2383
2402
  rec_dir.rmdir()
2384
2403
  except OSError:
2385
2404
  pass
2386
- raise RunnerError(f"could not write evidence into .lean-receipts/ ({e}); "
2405
+ raise RunnerError(f"could not write evidence into {redact(str(rec_dir))}/ ({e}); "
2387
2406
  f"nothing written") from None
2388
2407
  return {"receipt": str(rec_path)}
2389
2408
 
@@ -2579,8 +2598,15 @@ def add_arguments(ap: argparse.ArgumentParser) -> None:
2579
2598
  ap.add_argument("--verify", default=os.environ.get(VERIFY_ENV) or None,
2580
2599
  help="verify-comparator.sh for the toolchain mechanism (env COMPARATOR_VERIFY; "
2581
2600
  "default: the vendored PalomarTemplate copy)")
2601
+ ap.add_argument("--out", default=None, metavar="PATH",
2602
+ help="write the receipt to PATH and its per-configuration logs beside it, instead of "
2603
+ "<project>/.lean-receipts/: a probe or rehearsal receipt kept out of the package tree. "
2604
+ "The receipt still names its logs .lean-receipts/<c12>-comparator-<config>.log, so "
2605
+ "copying the files into .lean-receipts/ later makes it a receipt the gate reads. PATH "
2606
+ "must not exist and its directory must; not with --prepare or --estimate")
2582
2607
  ap.add_argument("--evidence-dir", default=None, metavar="DIR",
2583
- help="where the stage logs and stages.json go, kept on failure "
2608
+ help="where the stage logs and stages.json go (only those: the receipt goes to "
2609
+ "<project>/.lean-receipts/ unless --out), kept on failure "
2584
2610
  f"(default: <project>/{DEFAULT_EVIDENCE.as_posix()}; its {STAGES_DIR}/ subdirectory); "
2585
2611
  "outside the project its path is written as <evidence> in every log and receipt")
2586
2612
  ap.add_argument("--prepare", action="store_true",
@@ -2781,6 +2807,15 @@ def run_main(args, argv: list[str], prog: str = "comparator-receipt") -> int:
2781
2807
  project = pathlib.Path(args.project).resolve()
2782
2808
  evidence = pathlib.Path(args.evidence_dir).expanduser().resolve() if args.evidence_dir else None
2783
2809
  prepared = pathlib.Path(args.from_prepared).expanduser().resolve() if args.from_prepared else None
2810
+ out = pathlib.Path(args.out).expanduser().resolve() if args.out else None
2811
+ if out is not None:
2812
+ if args.prepare or args.estimate:
2813
+ raise RunnerError("--out names where the receipt is written; --prepare and --estimate write "
2814
+ "none; nothing written")
2815
+ if out.exists() or out.is_symlink():
2816
+ raise RunnerError(f"--out {args.out}: already exists; the receipt is written fresh; nothing written")
2817
+ if not out.parent.is_dir():
2818
+ raise RunnerError(f"--out {args.out}: its directory does not exist; nothing written")
2784
2819
  # --estimate --json: stdout carries only the JSON document; the run's stage lines, judge output
2785
2820
  # and warnings go to stderr (field report: progress lines before the JSON broke json.loads)
2786
2821
  with chatter_to_stderr(bool(args.json)), \
@@ -2794,7 +2829,7 @@ def run_main(args, argv: list[str], prog: str = "comparator-receipt") -> int:
2794
2829
  resume=not args.no_resume, judges=judges, slot_spec=args.slots,
2795
2830
  estimate=(args.sample or ESTIMATE_MIN_SAMPLE) if args.estimate else None,
2796
2831
  unit_size=unit_size, sample_explicit=args.sample is not None,
2797
- force_sample=args.force_sample, ci=ci, registry_args=args)
2832
+ force_sample=args.force_sample, ci=ci, registry_args=args, out=out)
2798
2833
  except RunnerError as e:
2799
2834
  print(f"comparator-receipt: {e}", file=sys.stderr)
2800
2835
  if getattr(e, "next_command", None): # #397: once per run, after the refusal
@@ -18,3 +18,4 @@ entries:
18
18
  - {version: "0.22.0", id: "declarations-follow-lean-scopes", pr: 362, kind: "behavior", area: "search, claims ledger, coverage check, comparator config, claims mark, page"}
19
19
  - {version: "0.22.0", id: "declarations-read-in-prefixed-commands", pr: 370, kind: "behavior", area: "search, claims ledger, coverage check, comparator config, claims mark, page, lean-exercise"}
20
20
  - {version: "0.22.0", id: "search-unsearched-packages-incomplete", pr: 378, kind: "behavior", area: "search"}
21
+ - {version: "0.27.0", id: "page-check-site-html-blocks", pr: 428, kind: "behavior", area: "page"}
@@ -1015,7 +1015,9 @@ def add_parsers(sub, add_json) -> None:
1015
1015
  "refreshed, one whose kept keys differ is refused without --force")
1016
1016
  s.add_argument("--no-registry", action="store_true",
1017
1017
  help="with --write: write the file only; the registry is not updated (no pointer, no "
1018
- "event), so this is not a registry write (no lock, no --commit)")
1018
+ "event), so this is not a registry write (no lock, no --commit). The lease is still "
1019
+ "checked: the file is written into the package's checkout, so another agent's live "
1020
+ "lease refuses unless --agent HOLDER (or --force --reason TEXT)")
1019
1021
  s.add_argument("--out", default=None, metavar="PATH",
1020
1022
  help="write the render here instead; the registry is untouched")
1021
1023
  s.add_argument("--force", action="store_true",
@@ -1037,7 +1039,9 @@ def add_parsers(sub, add_json) -> None:
1037
1039
  "saved): claims, comparator configurations, the kept keys and the receipts at DIR's "
1038
1040
  "committed HEAD; the gate receipt's facts only when bound to that HEAD. DIR must be a "
1039
1041
  "git work tree, and when it has remotes one must be the package's repo; not with --write")
1040
- s.add_argument("--agent", default=None, help="lease holder, if one is live (for the registry update)")
1042
+ s.add_argument("--agent", default=None,
1043
+ help="lease holder, if one is live (for the registry update and, with --no-registry, the "
1044
+ "file write into the checkout)")
1041
1045
  add_json(s)
1042
1046
  render = s
1043
1047
  a = fsub.add_parser(
@@ -33,7 +33,7 @@ import zlib
33
33
  import yaml
34
34
 
35
35
  from .core import (
36
- _ACTOR, ancestor_attribute_changes, bound_tree, branch_notice, checker_paths, CLAIMS_COMMIT_FIRST,
36
+ _ACTOR, ancestor_attribute_changes, bound_tree, branch_notice, branch_state, checker_paths, CLAIMS_COMMIT_FIRST,
37
37
  COMPARATOR_CONFIG_FIELDS, COMPARATOR_FIELDS, COMPARATOR_LIST_FIELDS, COMPARATOR_MECHANISMS,
38
38
  comparator_pass, COMPARATOR_PASS_LINE, COMPARATOR_SCHEMAS, COMPARATOR_TOOLCHAIN_DIGESTS, COMPARATOR_TOOLS,
39
39
  DEFAULT_AXIOMS, docs_build_input, DOCS_PATHS_MAX, events_path, evidence_symlinks, Fail, formalization_rel,
@@ -572,7 +572,7 @@ def dirty_tracked(repo: pathlib.Path) -> list[str]:
572
572
  return [x[3:] for x in p.stdout.splitlines() if x.strip()]
573
573
 
574
574
 
575
- def dirty_guard(repo: pathlib.Path, name: str, refuse: bool) -> list[str]:
575
+ def dirty_guard(repo: pathlib.Path, name: str, refuse: bool, expect_branch: str | None = None) -> list[str]:
576
576
  """Evidence is judged at the bound commit, never the working tree; a dirty checkout is a WARN
577
577
  on stderr (the lab's workflow edits while gating) or, with --refuse-dirty, a refusal. A checkout
578
578
  off its default branch (or detached) is a second stderr WARN, never a refusal (#48)."""
@@ -585,6 +585,17 @@ def dirty_guard(repo: pathlib.Path, name: str, refuse: bool) -> list[str]:
585
585
  raise Fail(f"--refuse-dirty: {msg}; commit or stash them first")
586
586
  print(f"WARN: {msg} (--refuse-dirty refuses)", file=sys.stderr)
587
587
  notice = branch_notice(repo)
588
+ if expect_branch: # a field request: a release branch gated before its merge, on purpose
589
+ st = branch_state(repo)
590
+ if st["current"] == expect_branch:
591
+ if notice:
592
+ print(f"lean-pkg: note: evaluating branch {expect_branch} as intended (--expect-branch); "
593
+ f"the default is {st['default']}", file=sys.stderr)
594
+ notice = None
595
+ else:
596
+ here = f"branch {st['current']}" if st["current"] else "a detached HEAD"
597
+ print(f"WARN: --expect-branch {expect_branch}, but the checkout is on {here}", file=sys.stderr)
598
+ notice = None
588
599
  if notice: # #48: informational, never a refusal; evidence commits are often made detached
589
600
  print(f"WARN: {notice}", file=sys.stderr)
590
601
  return dirty
@@ -1534,10 +1545,12 @@ def pin_changes_text(changes: dict) -> str:
1534
1545
  def do_gate(reg_path, reg, events_p, name, receipt_arg,
1535
1546
  comparator_arg=None, refuse_private: bool = False,
1536
1547
  refuse_dirty: bool = False, formalization_path: str | None = None,
1537
- regate: bool = False, reason: str | None = None) -> tuple[list[str], dict]:
1548
+ regate: bool = False, reason: str | None = None,
1549
+ expect_branch: str | None = None) -> tuple[list[str], dict]:
1538
1550
  return _with_private_warnings(_do_gate, reg_path, reg, events_p, name, receipt_arg,
1539
1551
  comparator_arg, refuse_private, refuse_dirty=refuse_dirty,
1540
- formalization_path=formalization_path, regate=regate, reason=reason)
1552
+ formalization_path=formalization_path, regate=regate, reason=reason,
1553
+ expect_branch=expect_branch)
1541
1554
 
1542
1555
 
1543
1556
  def toolchain_advisories_of(receipt) -> list[dict]:
@@ -1552,21 +1565,22 @@ def toolchain_advisories_of(receipt) -> list[dict]:
1552
1565
 
1553
1566
  def do_gate_check(reg, name, receipt_arg, comparator_arg=None, refuse_private: bool = False,
1554
1567
  refuse_dirty: bool = False, regate: bool = False,
1555
- reason: str | None = None) -> tuple[list[str], dict]:
1568
+ reason: str | None = None, expect_branch: str | None = None) -> tuple[list[str], dict]:
1556
1569
  return _with_private_warnings(_do_gate_check, reg, name, receipt_arg, comparator_arg, refuse_private,
1557
- refuse_dirty=refuse_dirty, regate=regate, reason=reason)
1570
+ refuse_dirty=refuse_dirty, regate=regate, reason=reason,
1571
+ expect_branch=expect_branch)
1558
1572
 
1559
1573
 
1560
1574
  def _do_gate_check(reg, name, receipt_arg, comparator_arg=None, refuse_private: bool = False,
1561
1575
  private_sink=None, refuse_dirty: bool = False, regate: bool = False,
1562
- reason: str | None = None) -> tuple[list[str], dict]:
1576
+ reason: str | None = None, expect_branch: str | None = None) -> tuple[list[str], dict]:
1563
1577
  """`gate NAME --receipt R --check` (#26.2): every validation `gate` makes, against HEAD; writes
1564
1578
  nothing, records no event, works at any status. The mirror of `comparator --check`."""
1565
1579
  pkg = get_pkg(reg, name)
1566
1580
  repo = repo_path(pkg)
1567
1581
  if not repo.is_dir():
1568
1582
  raise Fail(f"{name}: local_path does not exist: {repo}")
1569
- dirty = dirty_guard(repo, name, refuse_dirty)
1583
+ dirty = dirty_guard(repo, name, refuse_dirty, expect_branch)
1570
1584
  resolved: list[dict] = []
1571
1585
  rp, receipt = load_json_object(locate_evidence_arg(receipt_arg, "receipt", name, repo, resolved), "receipt")
1572
1586
  cp = comp = None
@@ -1639,7 +1653,8 @@ def _do_gate_check(reg, name, receipt_arg, comparator_arg=None, refuse_private:
1639
1653
  def _do_gate(reg_path, reg, events_p, name, receipt_arg, comparator_arg=None,
1640
1654
  refuse_private: bool = False, private_sink=None,
1641
1655
  refuse_dirty: bool = False, formalization_path: str | None = None,
1642
- regate: bool = False, reason: str | None = None) -> tuple[list[str], dict]:
1656
+ regate: bool = False, reason: str | None = None,
1657
+ expect_branch: str | None = None) -> tuple[list[str], dict]:
1643
1658
  """formalization_path (#26.4): the formalization.yaml `--refresh-formalization` is about to own and
1644
1659
  point the registry at; when no pointer is recorded yet, the evidence rule's derived-only exception
1645
1660
  is judged for that path (the refresh records it as the pointer right after the gate)."""
@@ -1649,7 +1664,7 @@ def _do_gate(reg_path, reg, events_p, name, receipt_arg, comparator_arg=None,
1649
1664
  raise Fail(f"{name}: local_path does not exist: {repo}")
1650
1665
  vpkg = pkg if (formalization_rel(pkg) or not formalization_path) \
1651
1666
  else {**pkg, "formalization_yaml": formalization_path}
1652
- dirty = dirty_guard(repo, name, refuse_dirty)
1667
+ dirty = dirty_guard(repo, name, refuse_dirty, expect_branch)
1653
1668
  resolved: list[dict] = []
1654
1669
  rp, receipt = load_json_object(locate_evidence_arg(receipt_arg, "receipt", name, repo, resolved), "receipt")
1655
1670
  cp = comp = None
@@ -2028,7 +2043,8 @@ def do_gate_refresh(reg_path, reg, events_p, args) -> tuple[list[str], dict, lis
2028
2043
  out, payload = do_gate(reg_path, reg, events_p, args.name, args.receipt, args.comparator,
2029
2044
  refuse_private=args.refuse_private, refuse_dirty=args.refuse_dirty,
2030
2045
  formalization_path=fz.target_rel(get_pkg(reg, args.name)),
2031
- regate=getattr(args, "regate", False), reason=getattr(args, "reason", None))
2046
+ regate=getattr(args, "regate", False), reason=getattr(args, "reason", None),
2047
+ expect_branch=getattr(args, "expect_branch", None))
2032
2048
  gated = payload.get("event") in ("gate-passed", "regated")
2033
2049
  pkg = get_pkg(reg, args.name)
2034
2050
  if not gated:
@@ -2065,6 +2081,8 @@ def gate_next_command(args, payload: dict, regate: bool, reason: str | None) ->
2065
2081
  parts += ["--reason", q(reason)]
2066
2082
  parts += [f for f, on in (("--refuse-private", args.refuse_private),
2067
2083
  ("--refuse-dirty", args.refuse_dirty)) if on]
2084
+ if getattr(args, "expect_branch", None):
2085
+ parts += ["--expect-branch", q(args.expect_branch)]
2068
2086
  agent = getattr(args, "agent", None)
2069
2087
  parts += ["--agent", q(agent) if agent is not None else "AGENT"]
2070
2088
  return " ".join(parts)
@@ -2104,7 +2122,8 @@ def cmd_gate(args) -> int:
2104
2122
  print(note, file=sys.stderr)
2105
2123
  out, payload = do_gate_check(reg, args.name, args.receipt, args.comparator,
2106
2124
  refuse_private=args.refuse_private, refuse_dirty=args.refuse_dirty,
2107
- regate=regate, reason=reason)
2125
+ regate=regate, reason=reason,
2126
+ expect_branch=getattr(args, "expect_branch", None))
2108
2127
  payload["repo_override"] = override
2109
2128
  payload["registry_state"] = rstate
2110
2129
  from . import palomar_check # advisory (feature request #6): never changes the verdict; no WARN
@@ -2129,7 +2148,8 @@ def cmd_gate(args) -> int:
2129
2148
  out, payload = do_gate(reg_path, reg, events_p,
2130
2149
  args.name, args.receipt, args.comparator,
2131
2150
  refuse_private=args.refuse_private, refuse_dirty=args.refuse_dirty,
2132
- regate=regate, reason=reason)
2151
+ regate=regate, reason=reason,
2152
+ expect_branch=getattr(args, "expect_branch", None))
2133
2153
  from .toolchain_advisories import warn_line # #237: a warning, never a refusal
2134
2154
  for view in payload.get("toolchain_advisories") or []:
2135
2155
  print(warn_line(view), file=sys.stderr)