[codex] polish docs and guard theorem names#7
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors and simplifies the documentation (specifically README.md and docs/theorem-map.md) by moving the detailed proof descriptions into a new docs/proof-spine.md file. It also introduces a Python verification script (scripts/check_doc_names.py) and a corresponding Makefile target to ensure that all documented Lean theorem names resolve correctly. The review feedback focuses on improving the robustness of the Python script, specifically by dynamically parsing markdown sections instead of relying on hardcoded headers, and utilizing a temporary directory context manager to prevent potential file leaks.
Review Summary by QodoPolish docs and add theorem-name verification guard
WalkthroughsDescription• Restructured README into concise front door with "Why This Matters" section • Moved detailed proof narrative to new docs/proof-spine.md module guide • Added make check-doc-names Python script to guard documented theorem names • Integrated documentation-name verification into CI pipeline • Clarified three-part proof structure: symmetry, decision theory, null calibration Diagramflowchart LR
README["README.md<br/>Concise front door"]
ProofSpine["docs/proof-spine.md<br/>Module narrative"]
TheoremMap["docs/theorem-map.md<br/>Public names surface"]
CheckScript["scripts/check_doc_names.py<br/>Name verification"]
CI["CI Pipeline<br/>check-doc-names step"]
README --> ProofSpine
README --> TheoremMap
CheckScript --> CI
TheoremMap --> CheckScript
File Changes1. README.md
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Pull request overview
This PR polishes user-facing documentation and adds a CI guard that the public theorem names cited in the markdown actually resolve in Lean, addressing issue #5's request to pin the public-name surface and prevent docs↔source drift.
Changes:
- Slimmed
README.mdto a concise front door and moved the module-by-module narrative to a newdocs/proof-spine.md; clarified the conceptual dependency stack indocs/theorem-map.mdand tightened reviewer wording indocs/reviewer-brief.md. - Added
scripts/check_doc_names.pywhich extractsOrdvecFormalization.<name>references from the docs plus backticked names in the theorem-map "Public Names" section and#checks them vialake env lean. - Wired the new check into the
Makefile(make check-doc-names), extendedmake auditto also scanscripts/, and added a CI step that runs the guard.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Rewritten as a short overview that links out to the theorem-map, proof-spine, and reviewer brief. |
| docs/theorem-map.md | Tightened dependency diagram, removed inline proof-spine prose (now in docs/proof-spine.md), marked Public Names as a stable surface, and documented the new check. |
| docs/proof-spine.md | New file holding the module-by-module proof narrative previously in the README. |
| docs/reviewer-brief.md | Reframed claims into symmetry / decision theory / null calibration; sharpened the engineering takeaway; added make check-doc-names to the reviewer checks. |
| scripts/check_doc_names.py | New script that gathers documented names and #checks them in a temporary Lean file under lake env lean. |
| Makefile | Adds check-doc-names target and includes scripts/ in the audit sorry grep. |
| .github/workflows/lean_action_ci.yml | Runs make check-doc-names after make verify. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc4b07a342
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the name-guard bot findings in
Validated with |
What changed
README.mdinto a concise front door focused on why the theorem matters.docs/proof-spine.md.docs/theorem-map.mdas the stable checked-name surface and clarified the conceptual dependency stack.make check-doc-names, which extracts documentedOrdvecFormalization.*names and theorem-map public names, then checks they resolve in Lean.Issue coverage
Closes #5 by pinning the public-name surface and adding a docs-to-source name guard. The direct headline axiom audit is already present in
Verify.lean.Validation
make buildmake verifymake check-doc-namesmake auditmake lint