Skip to content

fix(mechanic): wire annotations into cauchy-schwarz-oq-03-oq-02 index.ts#18834

Merged
rjwalters merged 1 commit into
mainfrom
fix/mechanic-cauchy-schwarz-oq-03-oq-02-index
May 13, 2026
Merged

fix(mechanic): wire annotations into cauchy-schwarz-oq-03-oq-02 index.ts#18834
rjwalters merged 1 commit into
mainfrom
fix/mechanic-cauchy-schwarz-oq-03-oq-02-index

Conversation

@rjwalters
Copy link
Copy Markdown
Owner

Fix

Replace 4-line stub index.ts with canonical typed-export template so the gallery page actually renders the slug's Proof / Annotation[] / ProofData.

Evidence

Before (src/data/proofs/cauchy-schwarz-oq-03-oq-02/index.ts, 4 lines):

import meta from "./meta.json";
import annotations from "./annotations.json";

export { meta, annotations };

module.default is the truthy raw meta dict → the fallback at src/data/proofs/index.ts:60-79 never runs → ProofPage.tsx:111 destructures undefined for .proof / .annotations8 annotations / 10KB of section content silently unrendered.

After: canonical template (precedent: merged #18764 lebesgue-measure-oq-01-oq-01, #18755 konigsberg-oq-03-oq-02). Typed exports cauchySchwarzOq03Oq02Proof / …Annotations / …Data, default = …Data, lazy import of proofs/Proofs/CauchySchwarzOQ03OQ02.lean?raw.

Scope

  • Single file: src/data/proofs/cauchy-schwarz-oq-03-oq-02/index.ts (+43 / -3)
  • No edits to meta.json, annotations.json, Lean source, or any sibling slug
  • Member of the gallery-wide 2-line index.ts stub class (~20 slugs remain after this PR)

Sibling-race check


Automated fix by lean-mechanic agent.

The slug's index.ts was a 4-line stub re-exporting raw meta/annotations
JSON. Because `module.default` is the truthy meta dict, the
`getProofAsync` fallback at src/data/proofs/index.ts never fires and
ProofPage destructures undefined for `.proof`/`.annotations` — leaving 8
annotations and 10KB of section content silently unrendered.

Apply the canonical full template (see merged precedents
lebesgue-measure-oq-01-oq-01 #18764, konigsberg-oq-03-oq-02 #18755):
typed `Proof` / `Annotation[]` / `ProofData` exports keyed off
`metaJson` and a lazy import of
`proofs/Proofs/CauchySchwarzOQ03OQ02.lean?raw`.

Sole change: src/data/proofs/cauchy-schwarz-oq-03-oq-02/index.ts
(+43/-3). No meta.json / annotations.json / Lean source touched.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
rjwalters added a commit that referenced this pull request May 13, 2026
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).

Co-authored-by: Robb Walters <r.j.walters@gmail.com>
@rjwalters rjwalters merged commit 06117ce into main May 13, 2026
@rjwalters rjwalters deleted the fix/mechanic-cauchy-schwarz-oq-03-oq-02-index branch May 13, 2026 12:44
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