lean-pkg 0.25.0__tar.gz → 0.26.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/CHANGELOG.md +90 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/CITATION.cff +5 -2
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/PKG-INFO +1 -1
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/README.md +2 -2
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/pyproject.toml +1 -1
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/__init__.py +1 -1
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/cli.py +98 -11
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/cli_parser.py +7 -3
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/comparator_config.py +13 -3
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/comparator_receipt.py +6 -2
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/comparator_types.py +36 -7
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/core.py +1 -1
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/coverage.py +55 -8
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/page.py +57 -6
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/producer_skew.py +4 -3
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/recommended.py +6 -1
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg.egg-info/PKG-INFO +1 -1
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg.egg-info/SOURCES.txt +1 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_types.py +66 -0
- lean_pkg-0.26.0/tests/test_coverage_conclusion.py +205 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_coverage_offline.py +3 -2
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_host_check.py +45 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_recommended.py +20 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_status_scope.py +57 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_update_relocate.py +83 -2
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/LICENSE +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/MANIFEST.in +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/PYPI.md +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/setup.cfg +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/adapters/__init__.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/adapters/github.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/adapters/leansearch.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/adapters/loogle.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/adapters/palomar.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/adapters/reservoir.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/anchor.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/audit.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/binding_file.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/blueprint.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/build_scope.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/ci_github.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/claim_axioms.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/claims.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/claims_mark.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/command_tree.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/comparator_contracts.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/comparator_stage.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/container.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/data/stacks/lts-2026.10.yaml +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/data/toolchain-advisories.yaml +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/data/upgrade-breaking.yaml +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/data/verify-workflow-pins.yaml +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/deps_closure.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/deps_fill.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/dup_constants.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/exercise.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/exercise_forbid.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/export_paths.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/extract.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/extract_decls.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/extract_ledger.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/extract_summary.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/extract_types.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/extract_write.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/formalization.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/formalization_kept.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/fresh_repo.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/gate.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/headline.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/help_topics.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/holes.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/host_routes.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/hypotheses.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/index.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/json_stdout.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/lake_hygiene.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/lean_diag.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/lean_scan.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/ledger.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/next_step.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/page_html.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/palomar.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/palomar_check.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/port_modules.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/prior_art.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/producer.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/public_safety.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/publish.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/rebase.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/receipt.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/receipt_check.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/receipt_ci.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/receipt_systemd.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/report.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/reservoir.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/scaffold.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/schemas/formalization-0.4.schema.json +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/schemas/formalization-0.4.schema.source.txt +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/scripts/ClaimAxioms.lean +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/scripts/ContractsOnly.lean +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/scripts/DupConstants.lean +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/scripts/HypProbe.lean +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/scripts/comparator-check.sh +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/scripts/verify-comparator.sh +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/seal_bundle.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/search.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/site_profiles/easley.yaml +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/site_profiles/github-actions.yaml +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/sites.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/stacks.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/statements_module.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/templates/Apache-2.0.txt +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/toolchain_advisories.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/upgrade.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg/verify.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg.egg-info/dependency_links.txt +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg.egg-info/entry_points.txt +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg.egg-info/requires.txt +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/src/lean_pkg.egg-info/top_level.txt +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_adapters.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_append_note.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_audit_claims_coverage.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_audit_gh_outcomes.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_audit_missing_path.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_audit_no_github_mirror.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_audit_palomar.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_audit_receipts_paths.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_audit_reference_branch.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_binding_file.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_binding_file_g3.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_blueprint_check.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_bootstrap_collaborator.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_branch_notice.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_campaign_recovery_docs.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_check_changelog_releases.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_ci_attested.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_ci_comparator.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_ci_corroborate.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_ci_receipt_level1.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_claim_axioms.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_claims.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_claims_ledger.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_claims_mark.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_claims_rebase.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_cli.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_cli_consistency.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_cli_contract_argv.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_cli_contract_corpus.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_cli_contract_help.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_cli_contract_json.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_cli_contract_names.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_columns.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_command_docs.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_command_tree_stage2.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_commit.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_attempts.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_config.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_contracts.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_coverage.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_host_label.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_list_defaults.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_log_transport.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_mismatch_next.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_name_hints.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_no_mathlib.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_readiness.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_receipt.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_replace.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_repo_claims_file.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_sacct_seal.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_stage.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_comparator_tool_toolchain.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_compressed_log_bindings.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_conditional_claims.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_conditional_closeout.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_conditional_outputs.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_consent_dedupe.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_core_split.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_cut_release.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_defaults.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_docs.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_docs_classifier_preflight.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_docs_descendants.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_docs_old_spellings.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_doctor.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_dup_constants.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_evidence_formalization.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_exercise.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_exercise_course.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_extract_decls.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_extract_ledger.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_extract_plan.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_extract_summary.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_extract_types.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_fields_only.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_formalization.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_formalization_anchor.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_formalization_kept.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_formalization_refresh.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_formats.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_fresh_repo.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate_binding.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate_binding_scope.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate_check.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate_check_next.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate_claims.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate_pins.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate_receipt_path.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate_refresh.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_gate_regate.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_headline.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_help_topics.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_hints_and_time.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_host_routes.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_hypotheses_ledger.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_hypotheses_probe.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_ignored_evidence.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_index_add.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_index_built_on.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_index_check.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_index_claims.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_index_docs_descendants.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_index_render.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_index_schema.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_init.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_input_hygiene.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_internal_claims.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_json.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_json_control_chars.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_json_stdout.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_judged_as.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_lake_cache_systemd.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_lake_hygiene.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_large_artifacts_recipe.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_lean_diag.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_lean_scan_extract.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_lease.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_lease_actor.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_lease_expiry_notice.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_lease_registry_stamp.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_ledger_exact_covers.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_ledger_golden.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_lifecycle_notes.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_llms.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_locking.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_manuscript_findings.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_mathlib_none.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_migrate.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_migrate_v3.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_namespace_notes.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_new.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_next.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_noninteractive.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_olean_manifest.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_outputs_golden.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_package_fields.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_packaging.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_page.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_page_repo_head.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_page_site.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_palomar_check.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_palomar_prepare.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_palomar_snapshot.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_paper.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_port_modules.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_prior_art.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_producer_skew.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_promote_audit.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_promote_scope.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_public_allow.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_public_safety.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_public_safety_gzip.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_public_safety_long_line_stream.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_public_safety_scope.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_publication_hold.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_publish.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_check.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_check_opt_in.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_ci.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_container.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_private_scan.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_producer.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_slurm.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_slurm_artifacts.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_slurm_contracts_preflight.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_slurm_fill_plan.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_slurm_preflight_deps.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_slurm_runtime_preflight.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_slurm_sacct_seal.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_slurm_template_src.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_subdir_package.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_receipt_systemd.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_record.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_record_evidence.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_record_transitions.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_refresh_descendant.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_register.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_registry_core.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_registry_snapshot.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_release_script.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_release_version.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_repo_override.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_report.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_report_log_required.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_reservoir_check.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_review_fixes_prior_art.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_robustness.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_seal_bundle.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_search.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_search_completeness.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_search_declarations.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_search_field_coverage.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_search_scan.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_search_sources.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_sibling_packages.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_signoff_sidecar.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_sites.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_skills.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_smoke_configs.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_source_paper_ai.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_stack_opt_in.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_stacks.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_statements_module.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_subdir_package.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_template_module_headers.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_toolchain_advisories.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_toolchain_floor.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_trust.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_update_publication_fields.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_upgrade.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_user_default.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_validate.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_verdict_first.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_verify_preflight.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.0}/tests/test_verify_workflow_oidc.py +0 -0
- {lean_pkg-0.25.0 → lean_pkg-0.26.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.26.0] - 2026-11-06
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- `update NAME --path NEW` keeps verified evidence it can check (#426): a
|
|
17
|
+
gate or comparator receipt that is not bound to the new HEAD is kept, by
|
|
18
|
+
hash, when the new checkout holds the receipt's commit in its history (an
|
|
19
|
+
ancestor of HEAD), that commit is the one the gate event recorded, and the
|
|
20
|
+
receipt file at the new path is byte-identical to the copy at the old
|
|
21
|
+
checkout, the one the gate checked (so the old checkout must be on this
|
|
22
|
+
host). The package then stays `verified-private`, JSON and the `relocated`
|
|
23
|
+
event list it in `kept_by_hash`, and `next:` names `lean-pkg gate NAME
|
|
24
|
+
--check --regate --receipt R` for the new HEAD. This makes a scratch clone
|
|
25
|
+
usable for rehearsing a re-gate against a scratch registry copy, without
|
|
26
|
+
editing the registry file by hand. Anything that cannot be checked is
|
|
27
|
+
cleared as before; the claims cache still follows HEAD alone.
|
|
28
|
+
- `coverage.yaml` paper rows may say how their Lean conclusion relates to
|
|
29
|
+
the paper's (proposal 0010, #419): `conclusion: full | weaker |
|
|
30
|
+
special-case` (absent means `full`) and `conclusion_scope`, one line saying
|
|
31
|
+
what the Lean proves (required for `weaker` and `special-case`, refused
|
|
32
|
+
otherwise; both refused on an `outside` row and on a library row). The
|
|
33
|
+
class still names only the hypotheses. `lean-pkg page` never calls a
|
|
34
|
+
verified weaker or special-case result the bare "Verified.": it says
|
|
35
|
+
"Verified: a weaker statement." or "Verified: a special case.", adds a
|
|
36
|
+
"Conclusion." line with the scope (also in `--site` and `--html`), and the
|
|
37
|
+
header's verified line counts them; `coverage check --json` gains
|
|
38
|
+
`conclusions` and `page --json` `verified_conclusions`. The schema string
|
|
39
|
+
stays `coverage/1`: nothing changes for files without the keys, and a file
|
|
40
|
+
that uses them needs this release or later (an older lean-pkg refuses
|
|
41
|
+
them). See docs/page.md, "A weaker conclusion or a special case".
|
|
42
|
+
- `status NAME` names the gated commit on a host without the checkout (#423):
|
|
43
|
+
`scope.gate` gains `recorded_commit`, the commit of the latest
|
|
44
|
+
`gate-passed` or `regated` event for the current `gate.receipt` (matched by
|
|
45
|
+
receipt, not by position), and `commit_source` (`checkout`, `recorded` or
|
|
46
|
+
null). When the receipt cannot be read from a checkout, the text line is
|
|
47
|
+
`gated source commit: <c12> (recorded by the gate; ... not checked
|
|
48
|
+
against one)` instead of `unreadable`. `commit` and `readable` keep their
|
|
49
|
+
meaning: read from the receipt in the checkout. Asked for by a field
|
|
50
|
+
report from a host that judges packages it has no checkout of.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- `gate --help` says what `--check --regate` does (#424), the combination
|
|
55
|
+
`next` recommends: `--regate`'s entry adds that with `--check` it also runs
|
|
56
|
+
the checks `--regate` adds (status verified-private or public; the
|
|
57
|
+
receipt's commit descends from the gated commit, or `--reason`), shown as
|
|
58
|
+
a `regate:` line, and writes nothing. Help text only.
|
|
59
|
+
- `comparator host-check` no longer reads like a failure on a judge-only
|
|
60
|
+
host (#425): when the `toolchain` mechanism (what Palomar runs) is usable,
|
|
61
|
+
a check only the `legacy` mechanism needs that is not `ok` prints as
|
|
62
|
+
`n/a ITEM: DETAIL (only the legacy mechanism needs it; toolchain is ok)`
|
|
63
|
+
(a missing `cargo`, a low Landlock ABI), and a failing legacy mechanism as
|
|
64
|
+
`mechanism legacy: n/a (not Palomar-predictive; not needed here: toolchain
|
|
65
|
+
is ok): ...`. With toolchain failing, nothing changes. Text only: in
|
|
66
|
+
`--json` every check keeps its `level` and gains `required_by`, the
|
|
67
|
+
mechanisms that need it (`[]` for an advisory check such as `lake-path`).
|
|
68
|
+
The verdict and exit code are unchanged.
|
|
69
|
+
|
|
70
|
+
- The install docs use PyPI (#421): lean-pkg is on PyPI from 0.25.0, so
|
|
71
|
+
README.md, the quickstart, getting-started, the documentation index, the
|
|
72
|
+
comparator and pi-lambda walkthroughs, the trust model and the agent
|
|
73
|
+
contract's header (`lean-pkg llms`, llms.txt) say `pipx install lean-pkg`
|
|
74
|
+
instead of `pipx install git+https://github.com/lean-pkg/lean-pkg.git`.
|
|
75
|
+
getting-started keeps the Git URL for running unreleased code. Lines that
|
|
76
|
+
pin an older version (receipts.md's job install, page.md's CI example) and
|
|
77
|
+
the upgrade notice of `registry recommend` are unchanged.
|
|
78
|
+
- The upgrade notice of `registry recommend` (and doctor's `recommended`
|
|
79
|
+
line) installs from PyPI (#422): for a recommended release of 0.25.0 or
|
|
80
|
+
later the route is `pipx install --force 'lean-pkg==X.Y.Z'`, not
|
|
81
|
+
`pipx install --force 'git+https://github.com/lean-pkg/lean-pkg.git@vX.Y.Z'`.
|
|
82
|
+
A recommendation before 0.25.0, which is not on PyPI, keeps the git-tag
|
|
83
|
+
route, and an editable install keeps `git -C <checkout> pull --ff-only`.
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- `comparator config --from-claims --challenge-from-type` / `--emit-script`
|
|
88
|
+
found no type for a claim whose `decl` is written relative to its
|
|
89
|
+
namespace (`decl: baz` inside `namespace Demo`), which `claims sync`
|
|
90
|
+
accepts: Lean was asked for `baz` and answered "unknown constant" (a
|
|
91
|
+
package reported 0 of 46 filled). The scaffold now resolves such a decl,
|
|
92
|
+
from the claim's file at HEAD, to the one declaration whose qualified name
|
|
93
|
+
ends in it, asks Lean for that name, closes the Solution with
|
|
94
|
+
`exact @_root_.<full name>`, and records it as `name` beside `decl` (#418).
|
|
95
|
+
Crediting is unchanged: a claim counts as covered only with its fully
|
|
96
|
+
qualified `decl`.
|
|
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.25.0] - 2026-11-02
|
|
13
101
|
|
|
14
102
|
### Added
|
|
@@ -55,6 +143,8 @@ full policy, and the criteria for 1.0.0, are in RELEASING.md, "When to tag".
|
|
|
55
143
|
|
|
56
144
|
public-safety (make public-safety, --strict, history): 0 hit(s) (0 tree, 0 history); 0 blocking, 0 warning(s)
|
|
57
145
|
|
|
146
|
+
Zenodo version DOI: [10.5281/zenodo.23901343](https://doi.org/10.5281/zenodo.23901343)
|
|
147
|
+
|
|
58
148
|
## [0.24.0] - 2026-10-30
|
|
59
149
|
|
|
60
150
|
### Added
|
|
@@ -6,8 +6,8 @@ authors:
|
|
|
6
6
|
- family-names: Chen
|
|
7
7
|
given-names: Le
|
|
8
8
|
affiliation: "Auburn University"
|
|
9
|
-
version: "0.
|
|
10
|
-
date-released: "2026-11-
|
|
9
|
+
version: "0.26.0"
|
|
10
|
+
date-released: "2026-11-06"
|
|
11
11
|
license: Apache-2.0
|
|
12
12
|
repository-code: "https://github.com/lean-pkg/lean-pkg"
|
|
13
13
|
doi: 10.5281/zenodo.23272098
|
|
@@ -195,6 +195,9 @@ identifiers:
|
|
|
195
195
|
- type: doi
|
|
196
196
|
value: 10.5281/zenodo.23866040
|
|
197
197
|
description: Version DOI for 0.24.0
|
|
198
|
+
- type: doi
|
|
199
|
+
value: 10.5281/zenodo.23901343
|
|
200
|
+
description: Version DOI for 0.25.0
|
|
198
201
|
url: "https://lean-pkg.github.io/lean-pkg/"
|
|
199
202
|
keywords:
|
|
200
203
|
- Lean 4
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lean-pkg
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.26.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
|
|
@@ -146,7 +146,7 @@ many independent Lean/Git research repositories.
|
|
|
146
146
|
Today, bootstrap the shared registry explicitly:
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
|
-
pipx install
|
|
149
|
+
pipx install lean-pkg
|
|
150
150
|
|
|
151
151
|
mkdir -p ~/.lean-pkg/registry
|
|
152
152
|
git -C ~/.lean-pkg/registry init
|
|
@@ -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.
|
|
366
|
+
version = {0.26.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.
|
|
7
|
+
version = "0.26.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).
|
|
@@ -99,7 +99,7 @@ import datetime as dt
|
|
|
99
99
|
import fnmatch # noqa: F401 a cli attribute for one release (#317); core.py uses it
|
|
100
100
|
import fcntl # noqa: F401 a cli attribute for one release (#317); core.py uses it
|
|
101
101
|
import gzip # noqa: F401 a cli attribute for one release (#317); gate.py uses it
|
|
102
|
-
import hashlib #
|
|
102
|
+
import hashlib # also a cli attribute for one release (#317); gate.py uses it
|
|
103
103
|
import io
|
|
104
104
|
import json
|
|
105
105
|
import os
|
|
@@ -1223,6 +1223,34 @@ def _bound_at(repo: pathlib.Path, head: str | None, rel,
|
|
|
1223
1223
|
return ok, commit, (note or f"commit {commit[:12]} is HEAD")
|
|
1224
1224
|
|
|
1225
1225
|
|
|
1226
|
+
def _kept_by_hash(old_abs: pathlib.Path | None, new_abs: pathlib.Path, head: str | None, rel: str,
|
|
1227
|
+
commit: str | None, recorded: str | None) -> tuple[bool, str]:
|
|
1228
|
+
"""A field request (option A): a receipt not bound to the new HEAD is still the same evidence when the new
|
|
1229
|
+
checkout holds the gated commit and the receipt there is byte-identical to the one at the old checkout, the
|
|
1230
|
+
copy the gate checked. (kept, verdict). The old checkout must be on this host: with no copy to compare,
|
|
1231
|
+
nothing is kept."""
|
|
1232
|
+
if not head:
|
|
1233
|
+
return False, "no git HEAD at the new path"
|
|
1234
|
+
if old_abs is None or not old_abs.is_dir():
|
|
1235
|
+
return False, "the old checkout is not on this host, so the receipt cannot be compared with it"
|
|
1236
|
+
a, b = old_abs / rel, new_abs / rel
|
|
1237
|
+
if any(p.is_symlink() or not p.is_file() for p in (a, b)):
|
|
1238
|
+
return False, f"{rel} is not a regular file at both the old and the new path"
|
|
1239
|
+
ha, hb = (hashlib.sha256(p.read_bytes()).hexdigest() for p in (a, b))
|
|
1240
|
+
if ha != hb:
|
|
1241
|
+
return False, f"{rel} differs from the copy at the old checkout"
|
|
1242
|
+
if not (commit and _HEX40.fullmatch(commit)):
|
|
1243
|
+
return False, "the receipt names no 40-hex commit"
|
|
1244
|
+
if recorded and recorded != commit:
|
|
1245
|
+
return False, f"the receipt's commit {commit[:12]} is not the gated commit {recorded[:12]} the registry recorded"
|
|
1246
|
+
if git(new_abs, "cat-file", "-e", f"{commit}^{{commit}}").returncode != 0:
|
|
1247
|
+
return False, f"commit {commit[:12]} is not in the new checkout's history"
|
|
1248
|
+
if commit != head and not _is_ancestor(new_abs, commit, head):
|
|
1249
|
+
return False, f"commit {commit[:12]} is not an ancestor of HEAD {head[:12]}"
|
|
1250
|
+
return True, (f"same bytes as at the old checkout (sha256 {ha[:12]}); commit {commit[:12]} is in the new "
|
|
1251
|
+
f"checkout's history" + ("" if commit == head else f", an ancestor of HEAD {head[:12]}"))
|
|
1252
|
+
|
|
1253
|
+
|
|
1226
1254
|
def relocate_binding(name: str, pkg: dict, repo: pathlib.Path, head: str | None, new: str,
|
|
1227
1255
|
receipt: dict | None, comparator: dict | None, claims_cleared: bool,
|
|
1228
1256
|
reason: str) -> tuple[dict, list[str], list[str]]:
|
|
@@ -1264,6 +1292,9 @@ def relocate_binding(name: str, pkg: dict, repo: pathlib.Path, head: str | None,
|
|
|
1264
1292
|
else:
|
|
1265
1293
|
nxt.append(f"lean-pkg gate {name} --receipt R" + (" --refresh-formalization" if fz_tracked else "")
|
|
1266
1294
|
+ f" # R: a lower-tier receipt bound to HEAD {h12}")
|
|
1295
|
+
if receipt and receipt["kept"] and receipt.get("by") == "hash" and head and receipt["commit"] != head:
|
|
1296
|
+
nxt.append(f"lean-pkg gate {name} --check --regate --receipt R # R: a lower-tier receipt bound to HEAD "
|
|
1297
|
+
f"{h12}; the kept evidence is for {str(receipt['commit'])[:12]}")
|
|
1267
1298
|
if comparator and not comparator["kept"] and not (nxt and nxt[0].startswith(f"lean-pkg update {name} --formalization")):
|
|
1268
1299
|
nxt += [f"comparator-receipt --repo {repo} # at HEAD {h12}",
|
|
1269
1300
|
f"lean-pkg comparator {name} --receipt .lean-receipts/{h12}-comparator.json"]
|
|
@@ -1325,11 +1356,22 @@ def do_relocate(reg_path, reg, events_p, name, *, new_path, reason, agent,
|
|
|
1325
1356
|
notes.append(f"no git HEAD at {new_abs}; commit-bound evidence cannot be confirmed here")
|
|
1326
1357
|
|
|
1327
1358
|
cleared: list[str] = []
|
|
1359
|
+
kept_by_hash: list[str] = []
|
|
1328
1360
|
gate = copy.deepcopy(pkg.get("gate") or {})
|
|
1329
1361
|
b_receipt = b_comp = None
|
|
1362
|
+
old_abs = HOME / pathlib.Path(old) if old else None
|
|
1363
|
+
recorded = recorded_gate_commit(pkg)
|
|
1330
1364
|
if gate.get("receipt"):
|
|
1331
1365
|
kept, commit, verdict = _bound_at(new_abs, head, gate["receipt"], formalization_rel(pkg), pkg)
|
|
1332
1366
|
b_receipt = {"path": gate["receipt"], "commit": commit, "kept": kept, "verdict": verdict}
|
|
1367
|
+
if not kept and present:
|
|
1368
|
+
hkept, hverdict = _kept_by_hash(old_abs, new_abs, head, gate["receipt"], commit, recorded)
|
|
1369
|
+
if hkept:
|
|
1370
|
+
kept = True
|
|
1371
|
+
kept_by_hash.append("gate.receipt")
|
|
1372
|
+
b_receipt.update(kept=True, by="hash", verdict=hverdict)
|
|
1373
|
+
else:
|
|
1374
|
+
b_receipt["verdict"] = f"{verdict}; not kept by hash either: {hverdict}"
|
|
1333
1375
|
if not kept:
|
|
1334
1376
|
cleared.append("gate.receipt")
|
|
1335
1377
|
notes.append(f"gate.receipt cleared: {gate['receipt']} (commit {str(commit)[:12]}) "
|
|
@@ -1337,6 +1379,13 @@ def do_relocate(reg_path, reg, events_p, name, *, new_path, reason, agent,
|
|
|
1337
1379
|
gate["receipt"] = None
|
|
1338
1380
|
if gate.get("comparator"):
|
|
1339
1381
|
ckept, ccommit, cverdict = _bound_at(new_abs, head, gate["comparator"], formalization_rel(pkg), pkg)
|
|
1382
|
+
if not ckept and present and gate.get("receipt"):
|
|
1383
|
+
hkept, hverdict = _kept_by_hash(old_abs, new_abs, head, gate["comparator"], ccommit, None)
|
|
1384
|
+
if hkept:
|
|
1385
|
+
ckept, cverdict = True, hverdict
|
|
1386
|
+
kept_by_hash.append("gate.comparator")
|
|
1387
|
+
else:
|
|
1388
|
+
cverdict = f"{cverdict}; not kept by hash either: {hverdict}"
|
|
1340
1389
|
kept = bool(gate.get("receipt")) and ckept
|
|
1341
1390
|
b_comp = {"path": gate["comparator"], "commit": ccommit, "kept": kept,
|
|
1342
1391
|
"verdict": cverdict if gate.get("receipt") else "the lower-tier receipt is cleared"}
|
|
@@ -1375,8 +1424,12 @@ def do_relocate(reg_path, reg, events_p, name, *, new_path, reason, agent,
|
|
|
1375
1424
|
|
|
1376
1425
|
binding, next_commands, block = relocate_binding(name, pkg, new_abs, head, new, b_receipt, b_comp,
|
|
1377
1426
|
"claims" in cleared, reason)
|
|
1427
|
+
if kept_by_hash:
|
|
1428
|
+
notes.append(f"kept by hash: {', '.join(kept_by_hash)} (byte-identical to the old checkout's copy; the "
|
|
1429
|
+
f"gated commit is in the new checkout's history)")
|
|
1378
1430
|
payload = {"ok": True, "name": name, "event": "relocated", "old_path": old,
|
|
1379
|
-
"new_path": new, "cleared": cleared, "
|
|
1431
|
+
"new_path": new, "cleared": cleared, "kept_by_hash": kept_by_hash, "notes": notes,
|
|
1432
|
+
"dry_run": bool(dry_run),
|
|
1380
1433
|
"status": ({"from": old_status, "to": new_status}
|
|
1381
1434
|
if new_status != old_status else None),
|
|
1382
1435
|
"redetected": redetected, "binding": binding, "next_commands": next_commands}
|
|
@@ -1405,6 +1458,8 @@ def do_relocate(reg_path, reg, events_p, name, *, new_path, reason, agent,
|
|
|
1405
1458
|
if field in tp:
|
|
1406
1459
|
pkg[field] = tp[field]
|
|
1407
1460
|
fields = {"old_path": old, "new_path": new, "reason": reason, "cleared": cleared}
|
|
1461
|
+
if kept_by_hash:
|
|
1462
|
+
fields["kept_by_hash"] = kept_by_hash
|
|
1408
1463
|
if agent:
|
|
1409
1464
|
fields["agent"] = agent
|
|
1410
1465
|
if redetected:
|
|
@@ -2430,6 +2485,22 @@ def status_ledger_line(led: dict) -> str:
|
|
|
2430
2485
|
f"{led['stage']} stage: {led['package_status']})")
|
|
2431
2486
|
|
|
2432
2487
|
|
|
2488
|
+
GATE_EVENTS = ("gate-passed", "regated")
|
|
2489
|
+
|
|
2490
|
+
|
|
2491
|
+
def recorded_gate_commit(pkg: dict) -> str | None:
|
|
2492
|
+
"""The commit the registry recorded for the current gate receipt: the latest gate-passed or regated event
|
|
2493
|
+
whose receipt is gate.receipt (matched by receipt, not position: a lease or update event may follow it).
|
|
2494
|
+
Recorded by the gate, not re-read from the receipt, so it needs no checkout."""
|
|
2495
|
+
receipt = (pkg.get("gate") or {}).get("receipt")
|
|
2496
|
+
if not receipt:
|
|
2497
|
+
return None
|
|
2498
|
+
for e in reversed([e for e in (pkg.get("history") or []) if isinstance(e, dict)]):
|
|
2499
|
+
if e.get("event") in GATE_EVENTS and e.get("receipt") == receipt and e.get("commit"):
|
|
2500
|
+
return str(e["commit"])
|
|
2501
|
+
return None
|
|
2502
|
+
|
|
2503
|
+
|
|
2433
2504
|
def status_scope(pkg: dict, repo: pathlib.Path | None) -> dict:
|
|
2434
2505
|
"""#5 P3: what the evidence actually covers, offline and read-only: the gated source commit, the recorded
|
|
2435
2506
|
privacy (and any publication hold), the exact declarations the recorded comparator receipt compared and
|
|
@@ -2439,10 +2510,13 @@ def status_scope(pkg: dict, repo: pathlib.Path | None) -> dict:
|
|
|
2439
2510
|
head = git_head(repo) if have else None
|
|
2440
2511
|
rec = recorded_json(repo, gate.get("receipt")) if have and gate.get("receipt") else None
|
|
2441
2512
|
gated = str(rec.get("commit")) if isinstance(rec, dict) and rec.get("commit") else None
|
|
2513
|
+
recorded = recorded_gate_commit(pkg)
|
|
2442
2514
|
out: dict = {
|
|
2443
2515
|
"gate": {"receipt": gate.get("receipt"), "commit": gated, "head": head,
|
|
2444
2516
|
"head_is_gated_commit": bool(gated and head and gated == head),
|
|
2445
|
-
"readable": isinstance(rec, dict) if gate.get("receipt") else None
|
|
2517
|
+
"readable": isinstance(rec, dict) if gate.get("receipt") else None,
|
|
2518
|
+
"recorded_commit": recorded,
|
|
2519
|
+
"commit_source": "checkout" if gated else ("recorded" if recorded else None)},
|
|
2446
2520
|
"publication": {"status": pkg.get("status"), "visibility": pkg.get("visibility"),
|
|
2447
2521
|
"publication_hold": pkg.get("publication_hold"),
|
|
2448
2522
|
"github": "not queried (status is offline; `lean-pkg audit` asks gh)"},
|
|
@@ -2505,6 +2579,9 @@ def scope_lines(sc: dict) -> list[str]:
|
|
|
2505
2579
|
lines.append(f" gated source commit: {g['commit'][:12]} ({g['receipt']}); HEAD "
|
|
2506
2580
|
f"{(g['head'] or '?')[:12]}" + (" (the gated commit)" if g["head_is_gated_commit"] else
|
|
2507
2581
|
" (not the gated commit: `gate --check` judges it)"))
|
|
2582
|
+
elif g["receipt"] and g.get("recorded_commit"):
|
|
2583
|
+
lines.append(f" gated source commit: {g['recorded_commit'][:12]} (recorded by the gate; {g['receipt']} is "
|
|
2584
|
+
f"missing or not JSON in the checkout, so it is not checked against one)")
|
|
2508
2585
|
elif g["receipt"]:
|
|
2509
2586
|
lines.append(f" gated source commit: unreadable ({g['receipt']} is missing or not JSON in the checkout)")
|
|
2510
2587
|
else:
|
|
@@ -3077,7 +3154,7 @@ any -> archived `update --status archived --reason` or `regis
|
|
|
3077
3154
|
SUBCOMMANDS (global flags: --registry PATH --events PATH --json --commit --push --no-commit, also after the subcommand; env LEAN_PKG_REGISTRY, LEAN_PKG_HOME, LEAN_PKG_EVENTS (ignored when --registry is given: its sibling log); --version: `lean-pkg X.Y.Z (<sha>[+dirty], editable <checkout>)` or `(installed <dir>)`, local only; --json {version, commit, dirty, install, path}; --registry-snapshot COMMIT (env LEAN_PKG_REGISTRY_SNAPSHOT): read-only, the registry + event log as of COMMIT of its git repo (git show into a temp copy); reads work (status/list/registry board/registry audit/dry runs/comparator config --dry-run), every write exits 2 `read-only: --registry-snapshot`; --json +registry_snapshot sha)
|
|
3078
3155
|
registry board TUI on a tty, static table otherwise; --only, --fields, --no-claims as for list (any: never the TUI). ex: lean-pkg registry board --json --only my-lean
|
|
3079
3156
|
list static table; --only NAME[,NAME] filters packages (full records, shape unchanged); --fields a,b.c trims each record as status --fields (+ `fields` list; text: YAML); --no-claims as status. ex: lean-pkg list --json --only my-lean --fields status
|
|
3080
|
-
status full record + last 5 history entries (a lease adds derived expires_at, UTC; a lapsed lease ends the output with `lease: EXPIRED ...`, one lapsing within 2h with `lease: expires in ...`; --json lease_state {state live|expiring|expired|invalid|none, seconds_left}); in a registry git clone the output always ends with a lease line (`lease: live, expires in T (A)` / `lease: none` too) stamped with the registry commit it was read from, `(as of registry SHA7, committed 6h ago[, registry file modified])`, and --json adds registry_state {root, commit, committed_at, age_seconds, branch, upstream, behind, ahead, dirty} (local refs only, never fetched; null outside a git clone or under --registry-snapshot; branch null when detached; upstream/behind/ahead null without a local origin/BRANCH ref); a clone behind its last-fetched origin/BRANCH adds 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` (also with --json); --fields a,b.c: only those keys (dotted paths; lease.contact: null when unset; aliases = the table columns: pin, vis, reaudit, expires|lease.expires, lease.claimed; --json keeps nesting, text YAML; unknown: exit 2 listing keys); record keys: status --help, docs/cli.md#package-record. --no-claims: drop [bulk] keys (claims; also list/board; +omitted[]). Without --fields: a `scope:` text block and --json scope {gate {receipt, commit, head, head_is_gated_commit, readable}, publication {status, visibility, publication_hold, github}, product {kind paper|library|null, source, note}, comparator null|{receipt, readable, commit, mechanism, configs[], theorem_names[], definition_names[], claimed_theorems, claimed_theorems_covered, reusable_theorems, reusable_theorems_covered, whole_package false, note}, claims {total, by_status, synced_commit, note, ledger? {stage, package_status, total, counts, outstanding_hypotheses}: only when a cached claim uses hypotheses/discharges/witness, text `claims: 3 (1 verified, 2 conditional; outstanding hypotheses: Hyp.B)`}}: the gated source commit, recorded privacy + hold (offline: gh not queried), the product (kind in coverage.yaml at HEAD; paper when absent; not the DOI track), the exact declarations the comparator receipt compared and the claimed theorems/lemmas they cover (never the whole package), claim counts by status (not completion percentages). Also without --fields: a `producer` text block and --json producer_skew {running, receipts[] {role lower-tier|comparator, receipt, readable, producer (its producer.lean_pkg, or unknown), producer_record, direction unknown|same|older|newer, breaking[] {id, version, pr, kind, area}, other_breaking[], level info|warn, message, command}, warnings[], skew, data_problem}, null on an internal error: the lean-pkg that wrote each gate receipt against the running one; WARN (text block, and stderr `lean-pkg: WARN: producer skew: ...` with --json) when an older producer lies before a breaking upgrade-record entry in an evidence area (receipts, gate, claims; src/lean_pkg/data/upgrade-breaking.yaml), naming the entry ids and `lean-pkg doctor --upgrade-from vPRODUCER --source DIR`, and always for a producer newer than the running lean-pkg (it may ignore evidence it does not know); an older producer with no such entry, the same version or no producer is info only; never a refusal. ex: lean-pkg status my-lean --json --fields status,gate.receipt,lease.agent
|
|
3157
|
+
status full record + last 5 history entries (a lease adds derived expires_at, UTC; a lapsed lease ends the output with `lease: EXPIRED ...`, one lapsing within 2h with `lease: expires in ...`; --json lease_state {state live|expiring|expired|invalid|none, seconds_left}); in a registry git clone the output always ends with a lease line (`lease: live, expires in T (A)` / `lease: none` too) stamped with the registry commit it was read from, `(as of registry SHA7, committed 6h ago[, registry file modified])`, and --json adds registry_state {root, commit, committed_at, age_seconds, branch, upstream, behind, ahead, dirty} (local refs only, never fetched; null outside a git clone or under --registry-snapshot; branch null when detached; upstream/behind/ahead null without a local origin/BRANCH ref); a clone behind its last-fetched origin/BRANCH adds 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` (also with --json); --fields a,b.c: only those keys (dotted paths; lease.contact: null when unset; aliases = the table columns: pin, vis, reaudit, expires|lease.expires, lease.claimed; --json keeps nesting, text YAML; unknown: exit 2 listing keys); record keys: status --help, docs/cli.md#package-record. --no-claims: drop [bulk] keys (claims; also list/board; +omitted[]). Without --fields: a `scope:` text block and --json scope {gate {receipt, commit, head, head_is_gated_commit, readable, recorded_commit, commit_source checkout|recorded|null}, publication {status, visibility, publication_hold, github}, product {kind paper|library|null, source, note}, comparator null|{receipt, readable, commit, mechanism, configs[], theorem_names[], definition_names[], claimed_theorems, claimed_theorems_covered, reusable_theorems, reusable_theorems_covered, whole_package false, note}, claims {total, by_status, synced_commit, note, ledger? {stage, package_status, total, counts, outstanding_hypotheses}: only when a cached claim uses hypotheses/discharges/witness, text `claims: 3 (1 verified, 2 conditional; outstanding hypotheses: Hyp.B)`}}: the gated source commit (commit: read from the receipt in the checkout; recorded_commit: from the latest gate-passed/regated event for that receipt, so a host without the checkout still sees it, text `gated source commit: <c12> (recorded by the gate; ... not checked against one)`), recorded privacy + hold (offline: gh not queried), the product (kind in coverage.yaml at HEAD; paper when absent; not the DOI track), the exact declarations the comparator receipt compared and the claimed theorems/lemmas they cover (never the whole package), claim counts by status (not completion percentages). Also without --fields: a `producer` text block and --json producer_skew {running, receipts[] {role lower-tier|comparator, receipt, readable, producer (its producer.lean_pkg, or unknown), producer_record, direction unknown|same|older|newer, breaking[] {id, version, pr, kind, area}, other_breaking[], level info|warn, message, command}, warnings[], skew, data_problem}, null on an internal error: the lean-pkg that wrote each gate receipt against the running one; WARN (text block, and stderr `lean-pkg: WARN: producer skew: ...` with --json) when an older producer lies before a breaking upgrade-record entry in an evidence area (receipts, gate, claims; src/lean_pkg/data/upgrade-breaking.yaml), naming the entry ids and `lean-pkg doctor --upgrade-from vPRODUCER --source DIR`, and always for a producer newer than the running lean-pkg (it may ignore evidence it does not know); an older producer with no such entry, the same version or no producer is info only; never a refusal. ex: lean-pkg status my-lean --json --fields status,gate.receipt,lease.agent
|
|
3081
3158
|
new scaffold a minimal Lean package in a new directory (refused when it exists and is not empty) and git init it; no registry read or written, nothing committed, fetched or built: lean-toolchain (--stack NAME|current|none: a declared LTS stack's toolchain and Mathlib tag, docs/stacks/, plus `stack: NAME` in coverage.yaml; default current for --kind paper (no stack current: the newest pins, warned), none for --kind library: the newest pins, the newest stable Lean release lean-pkg ships with its Mathlib tag (v4.35.0), a release candidate only when no stable release is newer, and then said in the output; an undeclared stack exits 2 listing the declared ones), .gitignore, lakefile.toml (library MOD = NAME in CamelCase, --module MOD, defaultTargets [MOD] so a bare `lake build` builds it, globs [MOD, MOD.+]; requires Mathlib unless --no-mathlib), MOD.lean (the library's root module, empty), MOD/Challenge.lean (sorry) + MOD/Solution.lean (module-headed, the getting-started template) + MOD/Axioms.lean (#print axioms), comparator.json, claims.yaml (one reusable claim), coverage.yaml (--kind paper, the default: kind paper, manuscript version unposted and FILL-ME markers that coverage check refuses until the author names the paper and `formalization anchor --write` binds the posted version, no manuscript invented; --kind library: one main result, passes coverage check), CITATION.cff (--author, else git user.name; a name with no space warns: it looks like a handle), LICENSE + LICENSES/<SPDX>.txt (--license Apache-2.0|MIT), REUSE.toml (every file, receipts and logs included, under that license: reuse lint passes), README.md (the lean-pkg credit), verify.sh (the log `receipt systemd --run` reads; --no-mathlib: a `mathlib-rev: none` line, which the receipt also derives from a lake-manifest.json with no mathlib package), lean-pkg-binding.yaml (docs_descendants: true with a comment: the committed docs-only opt-in, see gate; --evidence-only leaves it out); NAME [a-z][a-z0-9]*(-[a-z0-9]+)*, at most 64 (else exit 2); --json {ok, name, dir, kind, module, mathlib, lean_toolchain, mathlib_rev, release_candidate, stack, stack_source, license_spdx, author, author_source, files[], git_init, committed, registry_touched, coverage_complete, next_commands[], warnings[], binding_file (lean-pkg-binding.yaml or null)}. ex: lean-pkg new my-proof (a paper), lean-pkg new my-lib --kind library; the path to a page: docs/quickstart.md
|
|
3082
3159
|
registry init bootstrap an empty registry + event log (event: file name + version; --force: empty only, forced: true). ex: lean-pkg --registry ./lean-packages.yaml init
|
|
3083
3160
|
registry migrate upgrade the registry schema in place to v3 (v2 adds license_spdx, formalization_yaml, palomar[], doi, reservoir, consent[];
|
|
@@ -3099,7 +3176,7 @@ register add a package; dedupes by name AND resolved local_path (~/ expanded, s
|
|
|
3099
3176
|
update set fields (--notes over non-empty notes: exit 2, nothing written, unless --replace-notes, which replaces, prints the old value, event notes_replaced + notes_from; --append-note TEXT --agent A appends `YYYY-MM-DD (A): TEXT` and prints only `appended note: <line>` (--json changes.notes keeps from/to), not with --notes); manual status moves and --force need --reason (else exit 1; a refusal lists the allowed moves); empty --url/--owner-project refused; --license-spdx takes an SPDX expression (MIT OR Apache-2.0); --paper-arxiv ID / --paper-status unpublished|preprint|published set the optional paper {arxiv, status} (an id alone: preprint). --source-paper-title T --source-paper-author A (repeatable) --source-paper-arxiv ID --source-paper-doi DOI / --ai-tool T --ai-role R (repeatable): optional source_paper {title, authors[], arxiv, doi} / ai_assistance {tools[], roles[]}, rendered as formalization.yaml acknowledgements lines (never project.authors; no consent needed). --namespace-note TEXT [--namespace NS]: namespace_notes {NS: TEXT} (default NS: those shared with another package); audit duplicate-namespace is info once all sharers have one. --track palomar|doi-only --reason R: the optional DOI track (see record doi-minted). --accept-docs-descendants | --no-accept-docs-descendants --reason R: the optional docs_descendants true/false (opt in to the docs-only rule, see gate; --accept-docs-descendants is deprecated: stderr "WARN: deprecated: ..." and JSON deprecations[] {id registry-docs-descendants, message, replacement, earliest_removal 1.0.0, removal_rule}; the veto is not); --write-binding-file: write lean-pkg-binding.yaml into the package dir from the record's docs_descendants: true and build_inputs (the migration; never staged, the registry not written, not a registry write for committed mode; record not opted in: nothing written, exit 0; identical file: no-op; a different file, a symlink or a dir: exit 1, untouched; --dry-run prints it; with a field, --status or --path: exit 2; JSON {ok, name, event binding-file-written|binding-file-unchanged|binding-file-dry-run|binding-file-not-opted-in|binding-file-refused, state, path, written, dry_run, docs_descendants, build_inputs, content, advice, problem}; commit it on its own right before the next verify run: a file added after the receipt commit unbinds the current receipts until then); --build-inputs GLOB,GLOB --reason R: the optional build_inputs list ('' clears); --headline-config REL: the optional headline_config (the headline comparator configuration formalization renders as status.main_results; '' clears); these three accept --dry-run (event update-dry-run, nothing written). register/update/record: schema errors already in the registry (e.g. another package's) go to stderr as pre-existing, not blocking.
|
|
3100
3177
|
ex: lean-pkg update my-lean --status gate-pending --reason "check job 4242 submitted"
|
|
3101
3178
|
--withdraw-publication --reason TEXT [--agent A] [--dry-run]: record the owner's privacy withdrawal of a public package (see the transitions; event publication-withdrawn {status_from, status_to, visibility_from, visibility_to, reason, by, github_visibility, promoted_commit, forced}; JSON status/visibility {from, to}, publication_hold, github_visibility, github_check). --release-publication-hold --reason TEXT [--agent A] [--dry-run]: lift it, status/visibility unchanged (event publication-hold-released {reason, hold, by, forced}). Each on its own (other fields: exit 2). | --path NEW --reason TEXT [--agent A] [--redetect] [--dry-run]: relocate (same name, history, claims; event relocated). Same path: no-op,
|
|
3102
|
-
exit 0. Refuses another package's path, a foreign live lease (no --force). Gate/claims not bound to NEW's HEAD are cleared (`cleared`). Output ends with a binding block (receipt commit vs new HEAD, evidence-only verdict, formalization.yaml exception) + `next:` commands (or "nothing to re-gate"); JSON binding{} + next_commands[].
|
|
3179
|
+
exit 0. Refuses another package's path, a foreign live lease (no --force). Gate/claims not bound to NEW's HEAD are cleared (`cleared`), except that a gate/comparator receipt is kept by hash (`kept_by_hash` in JSON and the event; status unchanged) when NEW holds its commit in history, an ancestor of HEAD, the commit is the one the gate event recorded, and the receipt file at NEW is byte-identical to the one at the old checkout, which must be on this host; next: then names `lean-pkg gate NAME --check --regate --receipt R` for the new HEAD (a scratch clone for rehearsing a re-gate). Output ends with a binding block (receipt commit vs new HEAD, evidence-only verdict, formalization.yaml exception) + `next:` commands (or "nothing to re-gate"); JSON binding{} + next_commands[].
|
|
3103
3180
|
lease claim (old spellings: claim, lease NAME) CAS lease; refuses if another agent holds an unexpired lease (names holder + expiry). Any other command naming a package whose lease has lapsed, or lapses within 2h, prints stderr `WARN: NAME lease: EXPIRED ... | expires in ...` with the claim/renew that keeps it (not claim/renew/release/leases/audit/status), stamped `(as of registry SHA7, committed AGE ago)` in a registry git clone and followed by the registry-clone-behind WARN when the clone is behind its last-fetched origin/BRANCH. Writes take a file lock on <registry>.lock (sibling); safe across processes on one host.
|
|
3104
3181
|
flags: --workspace W --agent A (required) [--ttl HOURS: 1..8760, 24 new; a holder's re-claim keeps its TTL; above 8760: exit 2, nothing written] [--reason TEXT] [--contact TEXT: address of the holding session (e.g. alice-laptop/paper-1, @proof-team), stored as lease.contact; one line, <= 200 chars, else exit 2; a re-claim without it keeps it] [--force (needs --reason)]
|
|
3105
3182
|
ex: lean-pkg lease claim my-lean --workspace w3 --agent vera --reason "chapter 2"
|
|
@@ -3115,7 +3192,7 @@ comparator attach NAME --receipt PATH (old spelling: comparator NAME --receipt
|
|
|
3115
3192
|
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
|
|
3116
3193
|
COMPARATOR_RECEIPT_ALLOWED_HOSTS, COMPARATOR_RECEIPT_ALLOW_HOST=1, or the workstation default: no allow-list set, no Slurm on the machine, COMPARATOR_RECEIPT_WORKSTATION_DEFAULT not 0; recorded as `host h-LABEL: the machine running the command (workstation default ...)`). Stages checkout, cache-get, build, comparator, receipt log to <evidence-dir>/comparator-stages/NN-<stage>.log + stages.json (kept on failure; the error names the stage and log; --evidence-dir DIR, default .lake/comparator-receipt); readiness before any expensive stage: a .lake/.lake/packages(/*) symlink resolving outside the project is refused (the lake comparator sandbox cannot read it), and the checkout stage ends with `lake --no-build build M` per configured module (unknown target: fails naming the missing [[lean_lib]]); a judge that stops before judging (sandboxed dependency resolution) is a tool/environment error, not a rejection; a refusal whose judge log carries Lake's `Challenge and solution theorem statement do not match` or `Const does not match between challenge and target` ends with one stderr line `next: lean-pkg comparator check NAME --contracts-only` (+ --repo DIR when the checkout is not the registered one; NAME from a best-effort read-only registry lookup by local_path, else by git remote, else the literal NAME and the docs section), once per run, and stages.json next_command (null otherwise; display only, verdict and exit unchanged; #397); --prepare runs only the setup stages (idempotent); a later run at the same commit/toolchain/config hash skips them (--from-prepared DIR: reuse DIR's, refuse a mismatch); receipt gains an additive stages[] summary; a run replacing an earlier run's stage files first keeps them read-only as comparator-stages/attempts/NNN/ + attempt.json {n, verdict, failed_stage, started_at, finished_at, olean_manifest_sha256, next_command, files sha256} (numbers never reused, never deleted or read back: resume/setup reuse/receipts use the current run only; prune by hand), `comparator-receipt --attempts [DIR] [--json]` lists them (exit 1 if a kept file changed). A receipt written in a Slurm job claims it only through SLURM_JOB_ID (job_id J, host_policy "Slurm job J on H"), which any shell can set: after the job finished, `comparator-receipt --seal-sacct R [--sacct-file F] [--user NAME] [--json]` (no host policy) corroborates it with sacct (main line J COMPLETED, 0:0; Start..End, with zone, containing generated_at; User = this account with live sacct or --user; NodeList = the receipt's host: its h- label against the node's label (or its first DNS label's), an older receipt's host name against the node name; an operator --host-label or a node range is not compared), refuses otherwise (exit 1, nothing written), and writes .lean-receipts/<c12>-comparator-sacct.txt (JobID|State|ExitCode|Start|End|Elapsed, UTC; no user or node names) plus the additive slurm_sacct {schema slurm-sacct-seal/1, job, file, sha256, state, exit_code, start, end, elapsed, checks, source} into R; only a sealed comparator receipt (seal committed at HEAD, rehashed and reparsed) backs a coverage.yaml compute job.
|
|
3117
3194
|
flags: --receipt PATH (required); `comparator check NAME --receipt PATH` (old spelling: --check) validates only, records nothing (works at any status), --check --repo DIR (validate against the checkout DIR, e.g. a worktree or feature branch, not the registered local_path; same rules as gate --check --repo: never saved, stderr note, JSON repo_override {path, registered_path, remote_match}, null without it; attaching refuses --repo, exit 2), --refuse-private, --refuse-dirty; `comparator check NAME --contracts-only [--config PATH]... [--export MODULE=FILE]... [--no-sandbox] [--repo DIR]` (no receipt; read-only, never acceptance): every comparator*.json and comparator/config*.json of the checkout at once, one leanexport per module (--ignore-missing, bwrap unless --no-sandbox), then Lake's own compareAt and checkAxioms per configuration (as lake comparator's compare step); no kernel, no receipt, no event, nothing in the checkout written; per configuration match/differs/error, a differing one with Lake's message, breadcrumb[] (target to the refused constant), first_field {field, path, challenge, solution} and a display-only hint; JSON {schema lean-pkg-comparator-contracts/1, ok, acceptance false, evidence false, verdict, counts, configs[], exports[]}; exit 0 all match / 1
|
|
3118
|
-
ex: lean-pkg comparator attach my-lean --receipt .lean-receipts/<c12>-comparator.json | comparator config --from-claims NAME [--out comparator.json] [--dry-run]: one TODO theorem_names entry per synced theorem/lemma claim not yet configured (name <Pkg>Audit.<decl>; the TODO markers go to lean-pkg-signoff.json configs[<config>].scaffold.todo, never into the config; a config still carrying the deprecated inline lean_pkg_scaffold is refused until migrated); never overwrites; counts existing/added/skipped; --challenge-from-type pre-fills Challenge (elaborated type) + Solution (`exact @_root_.<decl>`) via `lake env lean` [--lake-env DIR --jobs N --timeout S], or split it: --emit-script F (bash F OUT.json on a Slurm node, JSON comparator-types/1; ENFILE/EMFILE: halves jobs, retries) then --from-output OUT.json (commit must be HEAD; driver exits 1 on extraction errors, 2 if none filled; ingest refuses those unless --allow-partial: failures kept TODO, extraction_failed; --checkout DIR instead of local_path; --claims-file PATH: claims from that working-copy claims.yaml instead of the synced registry cache (no claims sync; schema-checked like claims check --file, package must be NAME; never written to the registry; same config as the registry route for the same claims; output line `claims source:` and JSON claims_source {kind registry|file, path, sha256, synced_commit, claims}); --no-registry --out FILE: scratch config, no lease check); per entry: type_error keeps the TODO, needs_restatement flags project vocabulary; each printed type re-elaborated vs the decl (example : (T) := @decl), failure keeps TODO, round_trip_failed | comparator config --coverage NAME: read-only; claims covered/not/TODO by the config tracked at the gate-bound commit (never a candidate); a changed or uncommitted config cannot certify that tree, a new gate at a commit tracking it is required; prints the exact next commands (JSON next_commands[]) | comparator config --migrate-signoff PATH [--write]: no registry; moves the deprecated inline judged_as (-> configs[<config>].definitions, one {reviewer, date, judged_as} per hole, config_sha256 bound to the migrated bytes) and lean_pkg_scaffold (-> configs[<config>].scaffold) of that configuration into lean-pkg-signoff.json at the package root; dry run by default (prints both would-be files); refuses an invalid inline sign-off or a conflicting sidecar entry; the Palomar keys and their values never change, but the file's bytes do: a gated package needs a new comparator receipt (receipt impact + next commands printed; JSON {moved[], dropped[], config_sha256_before/after, receipt_impact, next_commands[]}) | comparator host-check: read-only, no registry: kernel, landlock ABI, bwrap, go/cargo/jq/git/lean/lake/python3 ok|warn|fail, then `mechanism toolchain|legacy: ok|fail` (toolchain = bwrap+lean+lake+python3, what Palomar runs; legacy = Landlock ABI>=1 + go/cargo/git/jq/lean/lake) + verdict naming only usable ones (exit 0 can / 1 cannot); warn git-env (JSON env_warnings[]) when GIT_DIR/GIT_WORK_TREE/GIT_INDEX_FILE/GIT_OBJECT_DIRECTORY/GIT_ALTERNATE_OBJECT_DIRECTORIES/GIT_COMMON_DIR/GIT_NAMESPACE is set (comparator-receipt and package-checkout git drop them; stages.json git_env_scrubbed[]); --routes (field report #5; run it before sbatch inside the job's image with the job's binds and PATH): per route judge (`lake comparator` in bwrap: the toolchain mechanism's needs; no unsandboxed route ever) / prepare (comparator-receipt --prepare: kernel+lake/lean/git/python3) / transfer (build here, judge elsewhere: prepare + tar/sha256sum) `route R: yes|no (reason)` + `run:` lines, executables resolved like type -P (the receipt slurm --template HOST_TOOLS list included; time: binary only), locale (LANG/LC_ALL/LC_CTYPE, C.UTF-8 installed, warn when a set locale is not installed: stderr warning; export LC_ALL=C LANG=C PYTHONUTF8=1), limits (ulimit -n soft/hard, /proc/sys/fs/file-nr; tight: LEAN_NUM_THREADS=3), resources (sched_getaffinity CPUs, cgroup v1/v2 memory limit, MemAvailable, SLURM_* allocation), advice[]; JSON additive routes_schema host-routes/1, routes[{route, supported, needs, failing, reason, commands, notes}], executables{name: {path, level, required_by[], note?}}, locale, limits, resources, advice[]; read-only, no network; exit 0 when any route is supported
|
|
3195
|
+
ex: lean-pkg comparator attach my-lean --receipt .lean-receipts/<c12>-comparator.json | comparator config --from-claims NAME [--out comparator.json] [--dry-run]: one TODO theorem_names entry per synced theorem/lemma claim not yet configured (name <Pkg>Audit.<decl>; the TODO markers go to lean-pkg-signoff.json configs[<config>].scaffold.todo, never into the config; a config still carrying the deprecated inline lean_pkg_scaffold is refused until migrated); never overwrites; counts existing/added/skipped; --challenge-from-type pre-fills Challenge (elaborated type) + Solution (`exact @_root_.<decl>`) via `lake env lean` [--lake-env DIR --jobs N --timeout S], or split it: --emit-script F (bash F OUT.json on a Slurm node, JSON comparator-types/1; ENFILE/EMFILE: halves jobs, retries) then --from-output OUT.json (commit must be HEAD; driver exits 1 on extraction errors, 2 if none filled; ingest refuses those unless --allow-partial: failures kept TODO, extraction_failed; --checkout DIR instead of local_path; --claims-file PATH: claims from that working-copy claims.yaml instead of the synced registry cache (no claims sync; schema-checked like claims check --file, package must be NAME; never written to the registry; same config as the registry route for the same claims; output line `claims source:` and JSON claims_source {kind registry|file, path, sha256, synced_commit, claims}); --no-registry --out FILE: scratch config, no lease check); per entry: type_error keeps the TODO, needs_restatement flags project vocabulary; each printed type re-elaborated vs the decl (example : (T) := @decl), failure keeps TODO, round_trip_failed | comparator config --coverage NAME: read-only; claims covered/not/TODO by the config tracked at the gate-bound commit (never a candidate); a changed or uncommitted config cannot certify that tree, a new gate at a commit tracking it is required; prints the exact next commands (JSON next_commands[]) | comparator config --migrate-signoff PATH [--write]: no registry; moves the deprecated inline judged_as (-> configs[<config>].definitions, one {reviewer, date, judged_as} per hole, config_sha256 bound to the migrated bytes) and lean_pkg_scaffold (-> configs[<config>].scaffold) of that configuration into lean-pkg-signoff.json at the package root; dry run by default (prints both would-be files); refuses an invalid inline sign-off or a conflicting sidecar entry; the Palomar keys and their values never change, but the file's bytes do: a gated package needs a new comparator receipt (receipt impact + next commands printed; JSON {moved[], dropped[], config_sha256_before/after, receipt_impact, next_commands[]}) | comparator host-check: read-only, no registry: kernel, landlock ABI, bwrap, go/cargo/jq/git/lean/lake/python3 ok|warn|fail, then `mechanism toolchain|legacy: ok|fail` (toolchain = bwrap+lean+lake+python3, what Palomar runs; legacy = Landlock ABI>=1 + go/cargo/git/jq/lean/lake); when toolchain is ok, a check only legacy needs that is not ok prints as `n/a ITEM: DETAIL (only the legacy mechanism needs it; toolchain is ok)` and a failing legacy as `mechanism legacy: n/a (not Palomar-predictive; not needed here: toolchain is ok): ...` (text only: JSON checks[] keep level and gain required_by [toolchain|legacy], [] for advisory checks) + verdict naming only usable ones (exit 0 can / 1 cannot); warn git-env (JSON env_warnings[]) when GIT_DIR/GIT_WORK_TREE/GIT_INDEX_FILE/GIT_OBJECT_DIRECTORY/GIT_ALTERNATE_OBJECT_DIRECTORIES/GIT_COMMON_DIR/GIT_NAMESPACE is set (comparator-receipt and package-checkout git drop them; stages.json git_env_scrubbed[]); --routes (field report #5; run it before sbatch inside the job's image with the job's binds and PATH): per route judge (`lake comparator` in bwrap: the toolchain mechanism's needs; no unsandboxed route ever) / prepare (comparator-receipt --prepare: kernel+lake/lean/git/python3) / transfer (build here, judge elsewhere: prepare + tar/sha256sum) `route R: yes|no (reason)` + `run:` lines, executables resolved like type -P (the receipt slurm --template HOST_TOOLS list included; time: binary only), locale (LANG/LC_ALL/LC_CTYPE, C.UTF-8 installed, warn when a set locale is not installed: stderr warning; export LC_ALL=C LANG=C PYTHONUTF8=1), limits (ulimit -n soft/hard, /proc/sys/fs/file-nr; tight: LEAN_NUM_THREADS=3), resources (sched_getaffinity CPUs, cgroup v1/v2 memory limit, MemAvailable, SLURM_* allocation), advice[]; JSON additive routes_schema host-routes/1, routes[{route, supported, needs, failing, reason, commands, notes}], executables{name: {path, level, required_by[], note?}}, locale, limits, resources, advice[]; read-only, no network; exit 0 when any route is supported
|
|
3119
3196
|
publish NAME --yes (old spelling: promote NAME --yes; `publish NAME --yes --dry-run` is the old `promote NAME`) flips GitHub visibility to public (ONE-WAY) + one notification
|
|
3120
3197
|
(via LEAN_PKG_NOTIFY_CMD when set). Needs an authenticated `gh` (--yes: a failed gh query is a failure). Refuses without a byte-
|
|
3121
3198
|
valid comparator receipt bound to HEAD, a claims ledger that is not ready (`claims ledger NAME`: every reusable claim verified or conditional, theorems/lemmas by the comparator too; a conditional package passes with the line 'claims ledger ready: N required claim(s) verified or conditional (conditional: K; outstanding hypotheses: ...)'; no claims = unknown = refused; JSON claims_ledger {package_status, counts, required, reasons, ledger_digest}), both receipts + comparator logs committed unmodified at HEAD, HEAD in origin/<branch> (local refs; --yes first runs git fetch --prune --tags origin incl. +refs/pull/*/head:refs/remotes/origin/pr/*, 120 s; a failed fetch is a ✗), (paper field) a paper unpublished with no arXiv id, and blocking public-safety hits (the whole repository when the package is a subdirectory of it; warn-only hits: a WARN line; skip: --skip-public-safety, a WARN). Evidence on disk that git ignores (receipts, comparator logs, comparator-stages/ files) is a WARN naming each path + rule (.gitignore:3:*.log) and the remedy (!.lean-receipts/ + !**/.lean-receipts/** after it, or git add -f); a not-committed ✗ names the rule; JSON ignored_evidence[{path, rule}] (also publish, and gate/comparator after attaching: stderr WARN).
|
|
@@ -3126,7 +3203,7 @@ registry audit (old spelling: audit) read-only without --write (old spelling --
|
|
|
3126
3203
|
--toolchain-floor V (env LEAN_PKG_TOOLCHAIN_FLOOR; default leanprover/lean4:v4.35.0-rc2): below-toolchain-floor, rc < release,
|
|
3127
3204
|
nightly -> toolchain-unparsed, scratch/archived exempt; floor is warn only for public/comparator-evidence packages or --promotion, else level info; --json findings carry level warn|info; repo not on GitHub -> no-github-mirror (human: one line); informational: receipt-untracked (receipt file not tracked at the tip), duplicate-path (two packages, one checkout), duplicate-namespace (two checkouts, one Lean root namespace), consent-duplicate (one who+role recorded twice; shown once), claims-coverage-none (claims coverage none|empty|unsynced: search falls back to declarations; --json coverage; archived/upstreamed skipped); a failed gh query: check gh-OUTCOME, gh = gh-missing|not-authenticated|no-access|not-found|error, detail names the remedy (archived + not-found: info); human line `LEVEL CHECK NAME: DETAIL`, the line "N finding(s): W warn, I info" first and last (--quiet: it alone); --json counts {warn, info}; --no-gh: gh-skipped (info); missing-path: recorded path + `update NAME --path DIR --reason .. --dry-run` (+ "found at DIR": a sibling with lakefile + same remote); palomar-not-ready (warn; only packages aiming at Palomar: upstream_target palomar or a palomar entry, not scratch/archived/upstreamed): `palomar check`'s error gaps at its commit (gate-bound, else HEAD), detail = count + codes + `lean-pkg palomar check NAME`, --json palomar {errors, codes[], commit, command}; warn gaps alone: no finding. ex: lean-pkg audit --json
|
|
3128
3205
|
registry validate schema + enum + history sanity; the optional top-level lean_pkg must be a mapping and lean_pkg.recommended an X.Y.Z string. ex: lean-pkg registry validate
|
|
3129
|
-
registry recommend VERSION [--reason TEXT]: set the release of lean-pkg this registry recommends (top-level lean_pkg: {recommended: X.Y.Z}; additive, schema stays 3; log-only event registry-recommended {recommended, previous, reason}; the same version again writes nothing; VERSION not X.Y.Z exits 2). A writing command (every registry write; receipt slurm/systemd/ci/comparator outside --template, --check, --preflight-deps, --estimate, --verify-oleans, --attempts) run by an older lean-pkg prints ONE stderr line `lean-pkg: notice: this is lean-pkg A.B.C; the registry recommends X.Y.Z (upgrade: git -C <checkout> pull --ff-only | pipx install --force 'git+https://github.com/lean-pkg/lean-pkg.git@vX.Y.Z')
|
|
3206
|
+
registry recommend VERSION [--reason TEXT]: set the release of lean-pkg this registry recommends (top-level lean_pkg: {recommended: X.Y.Z}; additive, schema stays 3; log-only event registry-recommended {recommended, previous, reason}; the same version again writes nothing; VERSION not X.Y.Z exits 2). A writing command (every registry write; receipt slurm/systemd/ci/comparator outside --template, --check, --preflight-deps, --estimate, --verify-oleans, --attempts) run by an older lean-pkg prints ONE stderr line `lean-pkg: notice: this is lean-pkg A.B.C; the registry recommends X.Y.Z (upgrade: git -C <checkout> pull --ff-only | pipx install --force 'lean-pkg==X.Y.Z')` (a recommendation before 0.25.0, not on PyPI: pipx install --force 'git+https://github.com/lean-pkg/lean-pkg.git@vX.Y.Z'), offline, never a refusal, exit code unchanged; a registry write's --json gains lean_pkg_skew {running, recommended} (absent when not older). Compared on X.Y.Z: a dev build 0.23.0.dev1 or 0.23.0+dirty counts as 0.23.0; equal or newer is silent. ex: lean-pkg registry recommend 0.23.0 --commit
|
|
3130
3207
|
next NAME [--agent A] [--repo DIR] read-only, offline (never gh, never writes): the ONE recommended next command + a one-line reason, from the record + checkout (claim / update --status / gate --check / gate / gate --regate (verified-private, HEAD moved) / comparator-receipt / comparator config --from-claims / comparator / publish --dry-run (only when the claims ledger is ready; else its first fix or `claims ledger NAME`) / reservoir check / palomar prepare / record ...); without --agent a live lease is only noted; a checkout off its default branch (or detached) is noted, HEAD still judged; --repo DIR evaluates the checkout DIR instead of the registered local_path for this call (never saved; stderr note; JSON repo_override {path, registered_path, remote_match}, null without it; DIR a git work tree whose remotes, if any, include the package's repo (Host:/p matches a local-path repo /p; the registered local_path itself needs no remote); carried into a recommended gate --check, any other recommended command that reads the checkout gets a note that it uses the registered path); a comparator step (comparator-receipt, comparator config) whose lean-toolchain at HEAD is below audit's comparator floor (--toolchain-floor default / LEAN_PKG_TOOLCHAIN_FLOOR) is blocked first: command null, blocker below-toolchain-floor {lean_toolchain, floor, deferred_command}, reason says bump the toolchain, commit, re-gate; exit 0 command (or nothing left: command null), 1 blocked; --json {ok, name, command, reason, blockers[{kind: foreign-lease|invalid-lease|missing-checkout|no-commit|dirty-tree|invalid-receipt|unreadable-receipt|below-toolchain-floor, detail}], notes[], repo_override, state{status, lease, gate_commit, comparator_commit, head, dirty[], receipt_candidate, claims_ledger, ...}}. ex: lean-pkg next my-lean --agent vera --json
|
|
3131
3208
|
seal-bundle --spec S --receipt KEY=R [--receipt KEY=R ...] [--repo DIR] (--out DIR --pilot F | --check DIR) [--note TEXT]: render a seal job's bundle (a later replay/rebuild/audit of a commit a receipt verified) from the package's seal-bundle/1 spec and template (@@COMMIT@@ @@TREE@@ @@COMMIT_SHORT@@ @@TREE_SHORT@@ @@COMMIT:KEY@@ @@SHA256:FILE@@ @@NOTE@@ + the spec's counts/deps vars; unknown placeholder refused): commit = first package's receipt, tree = COMMIT:./, other packages' receipts must have verified the same tree apart from .lean-receipts/, module lists = umbrella imports (must equal the .lean files), counts = one value of a pattern in each receipt's sealed log, deps = lake-manifest.json revs, source.tgz reproducible (git archive --mtime=commit time, gzip -n; git >= 2.43), INPUT-SHA256SUMS; receipts checked at their own commit, not HEAD; --pilot explicit; writes only the new --out DIR (never a receipt or the registry); --check DIR re-derives and diffs an existing bundle (a hand-made source.tgz hash is taken from its sums), exit 1 on a difference; --json {ok, mode, out, commit, tree, packages[], counts{}, deps{}, pilot[], files[], notes[], differences[{file, kind, diff[]}]}. ex: lean-pkg seal-bundle --spec seal/seal-bundle.yaml --receipt main=.lean-receipts/R.json --pilot pilot.txt --out /tmp/seal
|
|
3132
3209
|
doctor ok/warn/n/a: version, install, registry [source: flag|env|user-default|cwd], recommended (warn: the running lean-pkg is older than the registry's lean_pkg.recommended, with the upgrade route, or the key is malformed; ok: equal or newer; n/a: none set), user-default, events [source: flag|registry-sibling|env|sibling], registry-repo (behind/ahead of origin or no origin remote, dirty registry files: warn = do not write yet; --fetch first), index, host (comparator host-check verdict; warn = cannot produce comparator receipts or a leaked GIT_* repository variable), tools (n/a = optional; the detail says what it is for and when it is needed; tool comparator without bwrap: run `comparator host-check`), gh auth (account; warn = not logged in, promote needs it), python, stack (n/a: the declared LTS stacks and the current one; doctor NAME: the package's committed lean-toolchain, Mathlib commit and recorded comparator receipt's tool digests against the stack its coverage.yaml declares, warn on a difference, a stack past its window or one this lean-pkg does not declare; --json adds stack {name, declared, matches, supported_until, window, toolchain, mathlib, comparator_tools, lean_pkg, mismatches[], warnings[]} or null); doctor --package NAME: one `producer <role>` line per gate receipt of NAME, the producer skew `status NAME` reports (warn: an older producer before a breaking evidence change, or a newer producer; ok: same version or no such change; n/a: unknown), --json adds producer_skew (the status object, null when NAME is not in the registry), never an exit 1, not with --upgrade-from (exit 2); exit 1 if the registry is unreadable or its schema version is unsupported (every other command refuses a newer version: upgrade lean-pkg); none configured and no ./lean-packages.yaml is n/a (`registry init` makes one), not an exit 1. doctor --upgrade-from OLD [--to NEW] [--source DIR] (read-only, no registry, no network): instead of the checks, what changed for a package author from OLD (a version: tag vX.Y.Z or the `release: X.Y.Z` commit; or any commit) to NEW (default HEAD) of a lean-pkg git checkout (default: the one running), read from git objects and never executed: requires-python, dependencies, executables, format markers (x/N constants, registry version, formalization.yaml version), on-disk key lists, commands/options from the help goldens (renamed = alias kept), --json key sets, aliases, packaged files; plus the curated docs/upgrades/<version>.yaml entries whose PR (#N) lies in OLD..NEW (behavior[], breaking[]) and the range's PRs no record names (uncurated[]); --json schema lean-pkg-upgrade/1. docs/design/upgrade-preflight.md
|
|
@@ -3151,7 +3228,7 @@ formalization NAME [--write] [--no-registry] [--out PATH] [--force [--reason TEX
|
|
|
3151
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
|
|
3152
3229
|
key is KEPT from the file; first render seeds authors from consent[] owner/author, else "[PLACEHOLDER] ..." + stderr warning (never
|
|
3153
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);
|
|
3154
|
-
--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?}], 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, 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), 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, 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). 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
|
|
3155
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).
|
|
3156
3233
|
order: registry, index, loogle, leansearch, reservoir, palomar, github; each "ok" or "skipped: <reason>" (never zero hits).
|
|
3157
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.
|
|
@@ -3240,7 +3317,7 @@ EXIT CODES
|
|
|
3240
3317
|
LLMS_TXT_HEADER = """\
|
|
3241
3318
|
# lean-pkg — llms.txt
|
|
3242
3319
|
|
|
3243
|
-
> Registry and trust gate for Lean 4 formalization packages. Install: `pipx install
|
|
3320
|
+
> Registry and trust gate for Lean 4 formalization packages. Install: `pipx install lean-pkg`.
|
|
3244
3321
|
> Human docs: https://lean-pkg.github.io/lean-pkg/ (source: docs/), README.md, DESIGN.md. Tests: `python3 -m pip install -e '.[test]' && python3 -m pytest -q`.
|
|
3245
3322
|
> The block below is the exact output of `lean-pkg llms` (written by `make docs`; tests/test_docs.py checks it byte for byte).
|
|
3246
3323
|
|
|
@@ -3727,11 +3804,21 @@ def cmd_comparator_host_check(args) -> int:
|
|
|
3727
3804
|
if args.json_out:
|
|
3728
3805
|
print_json({"ok": True, **res, **(routes or {})})
|
|
3729
3806
|
else:
|
|
3807
|
+
# A field request: with the toolchain mechanism (what Palomar runs) usable, a problem only the legacy
|
|
3808
|
+
# mechanism has is not a failure of this host; print it as n/a (the JSON level is unchanged).
|
|
3809
|
+
toolchain_ok = bool(res.get("mechanisms", {}).get("toolchain"))
|
|
3730
3810
|
for c in res["checks"]:
|
|
3731
|
-
|
|
3811
|
+
if toolchain_ok and c["level"] != "ok" and c.get("required_by") == ["legacy"]:
|
|
3812
|
+
print(f"n/a {c['item']}: {c['detail']} (only the legacy mechanism needs it; toolchain is ok)")
|
|
3813
|
+
else:
|
|
3814
|
+
print(f"{c['level']} {c['item']}: {c['detail']}")
|
|
3732
3815
|
for m, d in res.get("mechanism_detail", {}).items(): # #23.4: each mechanism against its own needs
|
|
3733
3816
|
why = "; ".join(d["failing"]) if d["failing"] else "every requirement met (" + ", ".join(d["needs"]) + ")"
|
|
3734
|
-
|
|
3817
|
+
state = "ok" if d["ok"] else ("n/a" if toolchain_ok and m != "toolchain" else "fail")
|
|
3818
|
+
kind = "Palomar runs this" if d["palomar"] else "not Palomar-predictive"
|
|
3819
|
+
if state == "n/a":
|
|
3820
|
+
kind += "; not needed here: toolchain is ok"
|
|
3821
|
+
print(f"mechanism {m}: {state} ({kind}): {why}")
|
|
3735
3822
|
print(f"verdict: {res['verdict']}")
|
|
3736
3823
|
if routes is not None:
|
|
3737
3824
|
print("\n".join(render_text(routes)))
|
|
@@ -394,7 +394,8 @@ def build_parser():
|
|
|
394
394
|
s.add_argument("--path", default=None, metavar="HOME-RELATIVE",
|
|
395
395
|
help="relocate: move local_path to another checkout, keeping name, history "
|
|
396
396
|
"and claims (needs --reason; event relocated; commit-bound evidence "
|
|
397
|
-
"not bound to the new HEAD is cleared
|
|
397
|
+
"not bound to the new HEAD is cleared, unless the new checkout holds the gated commit "
|
|
398
|
+
"and the receipts are byte-identical to the old checkout's)")
|
|
398
399
|
g = s.add_mutually_exclusive_group()
|
|
399
400
|
g.add_argument("--withdraw-publication", dest="withdraw_publication", action="store_true",
|
|
400
401
|
help="the owner made a promoted (public) repository private again: record it (needs --reason; "
|
|
@@ -419,7 +420,7 @@ def build_parser():
|
|
|
419
420
|
s.add_argument("name")
|
|
420
421
|
s.add_argument("path", metavar="HOME-RELATIVE",
|
|
421
422
|
help="the new checkout (event relocated; commit-bound evidence not bound to the new HEAD is "
|
|
422
|
-
"cleared)")
|
|
423
|
+
"cleared, unless the new checkout holds the gated commit in its history and each receipt there is byte-identical to the old checkout's copy (kept by hash, JSON kept_by_hash))")
|
|
423
424
|
s.add_argument("--reason", default="", help="required")
|
|
424
425
|
s.add_argument("--agent", default=None, help="lease holder, if one is live")
|
|
425
426
|
s.add_argument("--force", action="store_true",
|
|
@@ -513,7 +514,10 @@ def build_parser():
|
|
|
513
514
|
s.add_argument("--regate", action="store_true",
|
|
514
515
|
help="re-gate a verified-private (or public) package on a new receipt in one step: event "
|
|
515
516
|
"regated {previous_commit, commit, job_id, reason}, status unchanged; the receipt's "
|
|
516
|
-
"commit must descend from the gated commit unless --reason is given"
|
|
517
|
+
"commit must descend from the gated commit unless --reason is given; with --check: "
|
|
518
|
+
"also runs the checks --regate adds (status verified-private or public; the receipt's "
|
|
519
|
+
"commit descends from the gated commit, or --reason is given), shown as a `regate:` "
|
|
520
|
+
"line (JSON regate {previous_commit, non_descendant}), and writes nothing")
|
|
517
521
|
s.add_argument("--reason", default=None, metavar="TEXT",
|
|
518
522
|
help="with --regate: accept a receipt commit that does not descend from the gated commit "
|
|
519
523
|
"(recorded with non_descendant: true)")
|