Skip to content

fix(mechanic): wire annotations into birthday-problem-oq-03-oq-01 index.ts#18843

Merged
rjwalters merged 1 commit into
mainfrom
fix/mechanic-birthday-problem-oq-03-oq-01-index
May 13, 2026
Merged

fix(mechanic): wire annotations into birthday-problem-oq-03-oq-01 index.ts#18843
rjwalters merged 1 commit into
mainfrom
fix/mechanic-birthday-problem-oq-03-oq-01-index

Conversation

@rjwalters
Copy link
Copy Markdown
Owner

Fix

Replace birthday-problem-oq-03-oq-01/index.ts 4-line stub (import meta; import annotations; export { meta, annotations };) with the canonical full-template shape so the Lean source panel and typed exports work.

Evidence

Before (4 lines, 113 bytes):

  • No default export and no getProofSource.
  • Falls through to the legacy fallback at src/data/proofs/index.ts:60-79, which builds a ProofData from module.meta + module.annotations but leaves proof.source = ''.
  • ProofViewer.tsx:20 reads proof.source.split('\n') — Lean source panel renders empty for this slug despite proofs/Proofs/BirthdayProblemOQ03OQ01.lean containing 9,533 bytes.
  • 6 annotations never bind to a typed named export.

After (44 lines, canonical template):

  • Named exports: birthdayProblemOq03Oq01Proof, birthdayProblemOq03Oq01Annotations, birthdayProblemOq03Oq01Data.
  • default export: birthdayProblemOq03Oq01Data (hits the module.default path at src/data/proofs/index.ts:57).
  • getProofSource() lazy-imports proofs/Proofs/BirthdayProblemOQ03OQ01.lean?raw (9,533 bytes), populating proof.source so ProofViewer renders the Lean source panel with its 6 annotations.

pnpm exec tsc --noEmit -p tsconfig.json exits 0.

Scope

  • Touches only src/data/proofs/birthday-problem-oq-03-oq-01/index.ts.
  • No changes to meta.json, annotations.json, or the Lean source.

Companion to in-flight named-export-variant PRs #18822, #18830, #18834, #18836, #18838 (same 4-line stub class). Per local survey ~13 such slugs remain unclaimed (chinese-remainder-constructive-oq-03, elementary-quadratic-reciprocity-oq-03-oq-01-oq-02, erdos-1021-oq-01, erdos-1036-oq-01, erdos-114-oq-04, erdos-1153, gcd-algorithm-oq-02, gcd-algorithm-oq-04, harmonic-divergence-oq-04, lagrange-theorem-oq-02-oq-01, lagrange-theorem-oq-02-oq-02-oq-01, lagrange-theorem-oq-05, partition-theorem-oq-03).


Automated fix by lean-mechanic agent.

…ex.ts

Replace 4-line stub (`import meta; export { meta, annotations };`) with the
canonical full-template shape so the Lean source panel and typed exports work.

The 4-line stub falls through to the legacy `module.meta` fallback at
src/data/proofs/index.ts:60-79, which builds a ProofData but leaves
proof.source = ''. ProofViewer.tsx:20 then renders an empty Lean source panel
even though proofs/Proofs/BirthdayProblemOQ03OQ01.lean exists (9533 bytes).

After: default export hits src/data/proofs/index.ts:57; getProofSource()
lazy-imports the Lean source so ProofViewer can render the 9.5KB proof file
with its 6 annotations bound through typed exports.
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 37c401c into main May 13, 2026
@rjwalters rjwalters deleted the fix/mechanic-birthday-problem-oq-03-oq-01-index branch May 13, 2026 12:43
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