Skip to content

tools: preserve reproducible Zeta5 certificate generation - #541

Merged
Vilin97 merged 8 commits into
mainfrom
codex/zeta5-certificate-regeneration-20260927
Sep 27, 2026
Merged

Vilin97 merged 8 commits into
mainfrom
codex/zeta5-certificate-regeneration-20260927

Conversation

@Vilin97

@Vilin97 Vilin97 commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Preserves a reproducible generator for the 118 numerical-certificate modules imported by #540, addressing its Greptile regeneration finding. Tooling and mathematical content are separate PRs as required by repository policy.

The archive stores exact decimal integer parameters and 461 shared proof templates for 14,147 source blocks. Rendering reproduces every certificate byte-for-byte at content commit b00b44fc50beb974417bfdff2898aeedd83cfdde; all 118 SHA-256 hashes are pinned. The later removal of the unused normalizer does not affect these files. Moritz Firsching's Apache-2.0 attribution is preserved.

This reproduces the preserved certificate set from explicit rational data; it does not search for new bounds. The original upstream generator does not reproduce the port. Separating the repeated proof templates from their exact inputs allows common proof edits without manually changing thousands of declarations. The most-used template occurs 4,500 times. The renderer needs only Python, does not execute archived text, and rejects invalid parameters or output paths outside the project. Generation renders and validates all modules before atomically creating a new destination directory. It creates missing parents, rejects existing destinations even when created concurrently, and removes the new output tree on a write failure. Generated Lean still requires the normal build, linter and trust checks.

Validation:

  • Regenerated and compared all 118 modules with feat: preserve the completed zeta(5) irrationality formalization #540; every byte and baseline hash matches.
  • Ruff check and format pass.
  • Full Python suite: 490 passed, including fourteen tests for exact large rationals, malformed records, constrained output paths, complete archive reproduction and damaged outputs.
  • No CI, policy, linter or gate configuration changes.

Final archive refresh at 37c58c2b1: updated 60 module headers after the content import cleanup, preserving every mathematical certificate body and numeric record. All 118 outputs match content b00b44fc5; all 490 Python tests and Ruff pass again. Renderer behavior is unchanged from the reviewed safety/portability fixes.

@Vilin97

Vilin97 commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator Author

/review

This is the tooling-only companion to #540. Please review the renderer and archive contract, including the limits stated in the README. All 118 output hashes and byte comparisons match the compiled content branch; local and CI Python tests pass. Required Lean/documentation workflows have been dispatched because the normal path filters do not trigger for this tooling directory.

@greptile-apps

greptile-apps Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

Retrigger

[Low risk] Adds archived numerical certificate data and reproduction tooling.

The PR appears safe to merge; the change since the previous review introduces no actionable issue.

Summary

The PR adds a Python renderer, archived rational parameters and proof templates, tests, and documentation for reproducing the 118 Zeta5 certificate modules. The only change since the previous review adds a README link to the reproduction guide.

Reviews (7) · Last reviewed commit: "Link the certificate reproduction guide ..."

Comment thread scripts/zeta5-certificates/regenerate.py
Comment thread scripts/zeta5-certificates/regenerate.py Outdated
Comment thread scripts/zeta5-certificates/regenerate.py Outdated
Comment thread scripts/zeta5-certificates/regenerate.py Outdated
@Vilin97

Vilin97 commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

🤖 LLM review — refactor (gpt-6-astra)

Reviewed head: 37c58c2b1ef349fef79b7ed053012d726ff67ce6

Verdict: ✅ approve

This adds a Python renderer and shared template archive for the existing Zeta5 certificates. All 118 outputs independently match content commit b00b44f byte for byte, preserving proof structure and automation. The 14 added tests pass, covering exact rendering, destination protection, and failure cleanup. Centralizing repeated proof text improves maintenance without changing Lean content or repository gates.

Aspect Value
Scope certificate-generation tooling
Introduces tech debt ✅ no
Maintainability ✅ improved
Brittleness ➖ unchanged
Risk ✅ low

The archive provides reproducible generation and shared editing points while preserving the existing certificates exactly.


Tokens: 458,993 in / 5,080 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $9.5609 (Standard API equivalent; uncached input) (long-context rate)
Automated review against .github/REFACTOR_REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.

CI was not green for this commit at review time; this review does not replace CI.

Comment thread scripts/zeta5-certificates/regenerate.py Outdated
@Vilin97

Vilin97 commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator Author

/review

Please refresh the completed approval from 6a9863b to the current head c05607e. The intervening changes address Greptile findings: render before exclusive output-directory creation, create missing parents and clean up on write failure, use portable POSIX manifest keys and explicit UTF-8. The certificate archive is byte-identical. All 490 tests pass; Greptile confirms every finding resolved. Required Lean/documentation checks are running on this exact head.

@Vilin97
Vilin97 marked this pull request as draft September 27, 2026 13:53
@Vilin97
Vilin97 marked this pull request as ready for review September 27, 2026 14:05
@Vilin97

Vilin97 commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator Author

/review

Please refresh the completed approval of c05607e to current head 37c58c2. The renderer and its 14 tests are unchanged. The archive now pins content b00b44f: 60 generated module headers have narrower imports, all certificate bodies and their numeric records are unchanged, and five shared header templates are replaced. All 118 rendered modules match the content byte-for-byte; every manifest hash verifies. Ruff and all 490 Python tests pass again. This branch also includes current main. Required Lean/documentation workflows have been requested for the current head.

@Vilin97

Vilin97 commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator Author

Thorough acquisition-agent review: approve the source. This is separate from Greptile/GPT and is not an independent human approval.

The renderer and every archived output were inspected through the templates, numeric records and manifest. All 118 files independently reproduce the pinned imported certificates byte-for-byte and match their SHA-256 hashes. The latest README-only commit makes the reproduction guide discoverable; renderer, data and tests are unchanged from the fully tested 37c58c2b1 revision.

The renderer validates every record before writing, exclusively creates a new destination, rejects existing directories and symlinks, creates missing parents, cleans up its new tree after write failures, and uses explicit UTF-8 and portable manifest keys. All five earlier Greptile findings are fixed and their threads resolved. Ruff and all 490 tests pass, including 14 focused tests covering complete archive reproduction and failure cases. The archive uses text substitution with exact decimal strings, without executing archived code or invoking numerical search. Its limits and Apache-2.0 attribution are documented.

Greptile and GPT approved the archive revision; all required manual workflows also passed on that commit. GitHub did not associate those manual checks with the PR's protection rollup, so the useful README link now triggers the existing PR workflows normally. Current required checks remain mandatory; no policy change or bypass is proposed.

Merge coordination: prefer merging content #540 first, then updating this branch and completing its required checks. Merging this companion while #540's lengthy build is running would restart that build when main changes. No second mathematical project is being acquired here.

@Vilin97 Vilin97 added the needs-maintainer Actual human decision required: licensing, mathematical scope, policy, or reviewer disagreement. label Sep 27, 2026
@Vilin97

Vilin97 commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

Disposition: approved for protected squash merge.

Reviewed exact head ce9b3854facae6f015c33f5dcf546c932d7f7e45. Self-author approval equivalent: the renderer, archive and all changed files are suitable infrastructure, preserve all 118 Lean certificate outputs byte for byte, and introduce no content/policy mixture. The 14 targeted tests and archive reproduction pass. Path containment, strict integer parsing, destination protection and failure cleanup were independently inspected. The README-only follow-up preserves the previously reviewed implementation.

All required checks are now green at this exact head, all review threads are resolved, and GitHub reports CLEAN. The temporary operational blocker has cleared for this PR; the needs-maintainer label is removed. Proceeding with normal protected squash merge without an override.

@Vilin97 Vilin97 removed the needs-maintainer Actual human decision required: licensing, mathematical scope, policy, or reviewer disagreement. label Sep 27, 2026
@Vilin97
Vilin97 merged commit 91d0ec3 into main Sep 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant