mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-17 08:28:07 -05:00
Derive a topic→chapter "Learn more" pointer for every question at build time from schema/topic_chapter_map.yaml, closing the loop from practice back into the textbook (issue #1822, Phase 1). vault-cli: - BookRefResolver joins topic→chapter, reads chapter titles from each chapter's .qmd H1, and link-checks every mapped chapter at build time (a missing .qmd fails the build — the old "defer until URLs stabilize" blocker becomes "URLs are enforced valid"). book_refs is emitted top-level so it rides into the summary bundle and renders synchronously. - Regenerates corpus-summary.json: all 9,525 published questions now carry book_refs (100% topic coverage). staffml: - BookRefCard shows the primary chapter + authored "why" line + also_see chapters, after the attempt (go-deeper pointer, not an answer key). - Supersedes ChapterLinks; retires chapter-map.json/chapters.ts. Fixes live 404s: ChapterLinks built /contents/vol1/<ch>/ URLs that 404; the verified-200 pattern is /vol1/contents/vol1/<ch>/<ch>.html. Tests: adds test_book_refs.py (resolver + link-checker regression).