fix(mechanic): wire annotations into erdos-1021-oq-01 index.ts#18855
Merged
Conversation
The 4-line stub `export { meta, annotations }` left the gallery page
broken: `getProofAsync` consumed `module.default` (the truthy raw meta
dict) and never reached the fallback branch, so the page rendered with
proof/annotations/versionInfo undefined despite a 10.8KB annotations.json
on disk.
Replaced with the canonical 44-line template (matches PR #18749
triangle-angle-sum-oq-01 and PR #17885 lagrange-theorem-oq-02-oq-02):
imports annotationsJson, hardcodes `proofs/Proofs/Erdos1021OQ01.lean?raw`,
exports camelCase `erdos1021Oq01Proof`/`erdos1021Oq01Annotations`/
`erdos1021Oq01Data` plus `getProofSource()` for the async Lean fetch.
Restores: 5 keyInsights, 4 sections (header-imports, oq01-question,
trivial-vs-little-o, k3-settled, lower-bound), historicalContext,
problemStatement, proofStrategy, conclusion, 2 references
(Kővári-Sós-Turán 1954, Bondy-Simonovits 1974), 1 cross-reference
to parent erdos-1021, and the full 10.8KB annotation set.
Orthogonal to the in-flight wave (#18805 #18806 #18810 #18813 #18815
#18817 #18820 #18822 #18823 #18824 #18827 #18830 #18834 #18836 #18838
#18839 #18840 #18843 #18844 #18846 #18849 #18850 #18852 #18853) — each
PR fixes one slug; ~7 stubs remain after this one (gcd-algorithm-oq-02,
gcd-algorithm-oq-04, harmonic-divergence-oq-04, ramseys-theorem-oq-04,
erdos-114-oq-04, lagrange-theorem-oq-02-oq-02-oq-01,
angle-trisection-oq-05-oq-04, triangular-reciprocals-oq-01).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix
Replace the 4-line stub `export { meta, annotations }` in
`src/data/proofs/erdos-1021-oq-01/index.ts` with the canonical
44-line wired template so the gallery page renders the proof,
annotations, sections, and Lean source instead of returning
`module.default` (the raw meta dict) to `getProofAsync` and silently
breaking the page.
Evidence
Before: 4-line stub. `module.default` was the truthy raw meta JSON
dict, so `getProofAsync` at `src/data/proofs/index.ts:60-79` never
reached the fallback branch. `ProofPage.tsx:111` then destructured
`proof`/`annotations`/`versionInfo` from undefined.
After: canonical template (matches PR #18749 triangle-angle-sum-oq-01
and PR #17885 lagrange-theorem-oq-02-oq-02). Imports `annotationsJson`,
hardcodes `proofs/Proofs/Erdos1021OQ01.lean?raw` for the async fetch,
exports camelCase `erdos1021Oq01Proof`/`erdos1021Oq01Annotations`/
`erdos1021Oq01Data` and the `getProofSource()` async function.
Restores: 5 keyInsights (k=3 settled, O vs o, probabilistic lower
bound, harder-for-large-k, open for all k≥4), 4 sections plus the
header-imports header (oq01-question, trivial-vs-little-o, k3-settled,
lower-bound), historicalContext, problemStatement, proofStrategy,
conclusion, 2 references (Kővári-Sós-Turán 1954, Bondy-Simonovits 1974),
1 cross-reference to parent erdos-1021, and the full 10.8KB annotation
set.
Scope
One slug per PR. Orthogonal to the in-flight stub-wire wave (#18805
#18806 #18810 #18813 #18815 #18817 #18820 #18822 #18823 #18824 #18827
#18830 #18834 #18836 #18838 #18839 #18840 #18843 #18844 #18846 #18849
#18850 #18852 #18853 — 24 sibling PRs all on this same drift class).
~7 stub index.ts files remain after this one
(triangular-reciprocals-oq-01, angle-trisection-oq-05-oq-04,
ramseys-theorem-oq-04, harmonic-divergence-oq-04, gcd-algorithm-oq-04,
gcd-algorithm-oq-02, lagrange-theorem-oq-02-oq-02-oq-01,
erdos-114-oq-04) — separate PRs each, if needed.
Out of scope: meta.json (sorries=17 / axiomCount=2 / lineCount=191
unchanged), annotations.json (10.8KB unchanged), Lean source
(`proofs/Proofs/Erdos1021OQ01.lean` and its Aristotle companion both
present and untouched).
Automated fix by lean-mechanic agent.