Skip to content

fix(website): every course has an address -- routes come from courses.t27 (Closes #1598) - #1599

Merged
gHashTag merged 1 commit into
mainfrom
fix/course-routes-every-course
Oct 11, 2026
Merged

gHashTag merged 1 commit into
mainfrom
fix/course-routes-every-course

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Description

{
  "version": 1,
  "head_sha": "7aff4c0e2743a916d56f80f88e4f5004dbb96515",
  "summary": "Before this PR, 3 of the 7 courses had no route in the app, so 'Next course' after GoldenFloat opened nothing. Every course address now comes from courses.t27, and a course with no menu entry fails check:course.",
  "changes": [
    "specs/course/courses.t27: GENERATED now names a second file, src/lib/courseRoutes.generated.ts, with the reason dated 2026-10-10.",
    "scripts/course-from-spec.mjs: writes courseRoutes.generated.ts (COURSE_ROUTES only, so the entry chunk does not load the 650 KB course file); navProblems fails the build when Navigation.tsx has no entry for a course address.",
    "src/main.tsx: the course <Route>s are mapped from COURSE_ROUTES, replacing the hand list of 4.",
    "src/components/GlobalStarfield.tsx: COURSE_ROOTS comes from COURSE_ROUTES, so the three courses draw on pure black like the others.",
    "src/components/Navigation.tsx: menu entries for verify-hardware, clocks-and-cdc and buses-and-peripherals.",
    "src/data/blog/bodies/course-three-verifying-hardware.ts: a dated correction (EN and RU); the post promised t27.ai/#/verify-hardware, which had no route from 2026-10-07 to 2026-10-10.",
    "scripts/course-from-spec.test.mjs: the routes file is current; main.tsx and the starfield import it and name no course by hand; a removed menu entry fails the build."
  ],
  "tests": [
    {"command": "cd apps/website && npm run test:course", "status": "passed", "result": "42 of 42 tests pass, the 2 new ones included", "evidence": "local run on 7aff4c0e"},
    {"command": "cd apps/website && node scripts/course-from-spec.mjs --check", "status": "passed", "result": "spec tests 53, asserts 258, all hold; generated files up to date", "evidence": "local run on 7aff4c0e, exit 0"},
    {"command": "cd apps/website && npx vite build && npx vite preview, then Playwright Chromium at 390x844 on #/goldenfloat, #/verify-hardware, #/clocks-and-cdc, #/buses-and-peripherals", "status": "passed", "result": "each page draws its course title and 30 lesson links; the 'Next course' link on #/goldenfloat points to #/verify-hardware, and clicking it opens 'Verifying hardware with t27: testbenches, waveforms, formal, mutation'", "evidence": "local Chromium run on the built site"},
    {"command": "npx tsc -b; npx eslint on the changed files", "status": "passed", "result": "the same 179 tsc errors and 2 eslint errors as on main (pre-existing, in other code); none in the changed files", "evidence": "compared against a stash of the change"},
    {"command": "npm run check:queen-languages && npm run check:explorer-languages (lefthook pre-commit)", "status": "passed", "result": "both contracts PASS", "evidence": "local run on 7aff4c0e: 497 EN/RU keys, 8 explorer pages"},
    {"command": ".githooks/pre-commit (sacred constants)", "status": "not_run", "result": "needs zig, which is not installed in this container; the PR touches no zig or FPGA spec", "evidence": "zig: command not found"}
  ],
  "limitations": [
    "The menu entries are written by hand (their short labels and notes are prose); the build only checks that each course has one.",
    "Not verified on the deployed t27.ai until this merges and the site is published."
  ],
  "tags": ["Engineering", "Verification", "Courses"],
  "blog": {
    "title": "A hand-written route list and the course nobody could open",
    "summary": "Three of seven t27 courses had no address in the app for three days because the router kept its own copy of the course list; the list is now generated from the course catalog spec.",
    "outline": [
      "The 'Next course' link after GoldenFloat led to #/verify-hardware, which had no route: main.tsx and the starfield each held a hand copy of 4 course addresses while courses.t27 named 7.",
      "course-from-spec.mjs writes the addresses alone into a small generated file that the router and the starfield import, and fails the build when the menu misses a course; a Chromium run clicked the link and landed on the course.",
      "Menu labels stay prose written by hand; only their presence is checked. The deployed site is checked after publishing."
    ],
    "reproduce": ["cd apps/website && npm run test:course"]
  }
}

Related Issue

Closes #1598

Specification Link

Spec: apps/website/specs/course/courses.t27, which now declares GENERATED = [course.generated.ts, courseRoutes.generated.ts].
Generated Code: apps/website/src/lib/courseRoutes.generated.ts

Changes Made

  • Bug Fix: #/verify-hardware, #/clocks-and-cdc and #/buses-and-peripherals had no route.
  • Refactor: course addresses are generated from the catalog spec, not hand-listed.
  • Documentation: dated correction in the course 3 post (EN/RU).
  • Tests: two new tests in course-from-spec.test.mjs.

Breaking Changes

  • No. The 4 existing course routes keep the same addresses.

🔥 TOXIC VERDICT

What Works

In a real Chromium on the built site, all 7 course addresses open, and the GoldenFloat → verify-hardware chain link lands on the course.

What Doesn't Work

  • Nothing known.

Tech Debt

  • Menu labels are still hand-written prose. The check covers their presence, not their wording.

Self-Score: 8/10

Deployment Notes

  • Website deployment required (publish to ghashtag.github.io after merge)

🤖 Generated with Claude Code

https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k


Generated by Claude Code


Generated by Claude Code

….t27 (Closes #1598)

"Next course" after GoldenFloat led to #/verify-hardware, which had no
route: main.tsx listed 4 of the 7 catalog courses by hand, and so did the
starfield. course-from-spec.mjs now writes src/lib/courseRoutes.generated.ts
(declared in courses.t27 GENERATED); the router and the starfield import it,
and check:course fails when a course has no menu entry. The three missing
courses get menu entries, and the course 3 post carries a dated correction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
@github-actions github-actions Bot added the status:in-progress 🔵 Agent working label Oct 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

X Brain Health Check

Score: 100.0/100
Status: 🟢 HEALTHY
Threshold: 80/100

X Brain is above merge threshold

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Brain Stress Test Results

Tests: 261/261 passed, 0 leaked
Status: 🟢 PASS
Gate: every test in zig build test-brain-stress passes and none leaks

@gHashTag
gHashTag marked this pull request as ready for review October 11, 2026 06:37
@gHashTag
gHashTag merged commit 58c3012 into main Oct 11, 2026
42 of 44 checks passed
@github-actions github-actions Bot added status:completed Done and removed status:in-progress 🔵 Agent working labels Oct 11, 2026
github-actions Bot added a commit that referenced this pull request Oct 11, 2026
fix(website): every course has an address -- routes come from courses.t27 (Closes #1598) (#1599)

"Next course" after GoldenFloat led to #/verify-hardware, which had no route:
main.tsx listed 4 of the 7 catalog courses by hand. course-from-spec.mjs now
writes src/lib/courseRoutes.generated.ts; the router and the starfield import
it, and check:course fails when a course has no menu entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

website: "Next course" after GoldenFloat opens nothing -- 3 of 7 courses have no route

2 participants