Repository navigation
feat(course): record AI numbers lessons 13-21 with t27c test-report and a one-line sed - #1571
Merged
Merged
Conversation
…nd a one-line sed The nine gft lessons (gft_smul, gft_sadd, gft_signed_mac, gft_relu, gft_exp2, gft_argmax4, gft_nll, gft_sgd_step, gft_xornet) said their recordings waited on tri test and tri mutate plant from gHashTag/t27#7400, which is blocked. They are now recorded the way t27c-gfternary was: t27c test-report on the spec (every test passes, none vacuous), one sed line, t27c test-report again (exactly the test the lesson names fails), then git checkout and sha256sum (the same hash as before the edit). Recorded with t27c 0.5.1 and zig 0.16.0 in a Claude Code cloud container, from a clean worktree of gHashTag/t27 at 72f793357. Every lesson's claim reproduced: m2, a2, pp, negz, em1, tie_low, perfect, ascend, x00. - scripts/t27c-mutation-casts.mjs: the recorder. bareEnv from tri-help-casts.mjs; staged prompt and typing, real output at the time it printed; refuses a recording whose baseline is not all green, whose mutant does not fail exactly the named test, whose diff is not one line, or whose hash differs after git checkout. Writes session.cast, meta.json, index.html, card.png (headless Chromium) and relists public/term/index.html. No GIF encoder: "gif": null, and the gallery links the card. - scripts/t27c-mutation-casts.test.mjs (in test:course): the committed casts show exactly the named test failing and the hash restored. - Lesson texts (EN spec and RU bundle) describe the recording that exists; gallery hooks replace the placeholder words; course, widgets and lesson pages and cards regenerated with the repo's own generators. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
The post said the nine gft recordings waited on gHashTag/t27#7400. They exist now without it: one paragraph in English and one in Russian says how they were made (t27c test-report, one sed line, t27c test-report, git checkout and sha256sum), where (t27c 0.5.1, zig 0.16.0, a Claude Code cloud container, t27 at 72f793357), and that t27c test-report still exits 0 on a failing test (t27#7370), so each verdict is read from the report. The original paragraph stays as it was written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
Contributor
X Brain Health CheckScore: 100.0/100 X Brain is above merge threshold |
Contributor
🧪 Brain Stress Test ResultsTests: 261/261 passed, 0 leaked |
gHashTag
marked this pull request as ready for review
October 9, 2026 14:19
github-actions Bot
added a commit
that referenced
this pull request
Oct 9, 2026
feat(course): record AI numbers lessons 13-21 with t27c test-report and a one-line sed (#1571) The nine "recording pending" placeholders in the AI numbers course, lessons 13-21 (public/term/t27c-gft-*), are now real t27c recordings. Each one runs `t27c test-report` on the spec (all green, none vacuous), applies a one-line `sed` mutation, runs `test-report` again so the lesson's named test turns red, then restores the file with `git checkout` and re-checks its sha256. - scripts/t27c-mutation-casts.mjs records each cast and refuses to write one if the base is not fully green, the mutant fails a test other than the named one, the diff is more than one line, or the restored hash differs. - The lesson texts (specs/course/ai-numbers.t27, the RU bundle, the gallery hooks) describe the commands each recording runs instead of waiting on t27#7400; widgets, course and lesson pages regenerated with the repo's generators. - The mutation-casts test is wired into `npm run test:course` (40/40). A dated paragraph is added to the two-courses post, as the course_post rule requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
gHashTag
added a commit
that referenced
this pull request
Oct 9, 2026
Brings in #1571 (AI numbers lessons 13-21 recorded). Conflicts resolved: - specs/widgets/gallery.t27: kept the PR's jtag-verdict entry in every array and applied main's nine WIDGET_HOOKS changes by widget id; no other array changed on main. - public/widgets/gallery.t27, src/lib/queenWidgets.generated.ts, src/lib/course.generated.ts: regenerated with widgets-from-spec.mjs and course-from-spec.mjs. - public/term/index.html: regenerated with t27c-mutation-casts.mjs --index-only, so main's nine recordings and tri-fpga-jtag-ir are all listed (105 recordings). check:widgets, check:course, check:widget-pages, check:course-pages, test:course (40/40), test:widgets-spec and test:widget-pages pass locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Description
Owner's decision: lessons 13 to 21 of the "AI numbers" course said "Recording pending: it waits on tri test and tri mutate plant from gHashTag/t27#7400". #7400 is blocked, so the nine lessons are now recorded the way
term/t27c-gfternary/was:t27c test-report <spec>, a one-linesedmutation,t27c test-reportagain showing exactly the test the lesson names failing, thengit checkout <spec>andsha256sum(the same hash as before the edit).Recorded with t27c 0.5.1 and zig 0.16.0 in a Claude Code cloud container (Linux x86_64), from a clean worktree of gHashTag/t27 at 72f793357. Every lesson claim was first reproduced by hand, then recorded:
sedline)gft_smul.t27m2gft_sadd.t27a2gft_signed_mac.t27ppgft_relu.t27negzgft_exp2.t27em1gft_argmax4.t27tie_lowgft_nll.t27perfectgft_sgd_step.t27ascendgft_xornet.t27x00The lesson-18 side claim was checked too: reversing the comparison of two negative scores fails no test.
Related Issue
Related to gHashTag/t27#7400 (still blocked; no longer a dependency of these lessons). Related to gHashTag/t27#7370 (
t27c test-reportexits 0 on a failing test, so verdicts are read from the report text).Changes Made
apps/website/scripts/t27c-mutation-casts.mjs-- recorder (reusesbareEnvfromtri-help-casts.mjs). Staged: prompt and typing. Real: every byte the commands printed, at the time they printed it. It refuses to write a recording whose baseline is not all green, whose mutant does not fail exactly the named test, whose diff is not one line, or whose hash differs aftergit checkout; it requires a clean t27 checkout before and after.public/term/t27c-gft-*/--session.cast(asciicast v2),meta.json(nopending;gif: null;descnames container, t27c, zig, t27 commit),index.html,card.png;public/term/index.htmlrelisted (count stays 104).specs/course/ai-numbers.t27andi18n/ai-numbers.ru.jsondescribe the recording that exists; gallery hooks inspecs/widgets/gallery.t27; a dated update paragraph (EN + RU) in the two-courses blog post.scripts/t27c-mutation-casts.test.mjs, wired intonpm run test:course.widgets-from-spec.mjs,course-from-spec.mjs,course-pages.mjs(18 lesson cards redrawn).GIF
No GIF encoder was used, so
gifisnulland there is nosession.gif.widgets-from-spec.mjsthen uses the card in the gallery markdown (gif ?? image); no contract requires a GIF.Test Results
All 65 steps of the
checksjob of.github/workflows/website-checks.ymlwere run locally, one command at a time: 63 pass. Two fail, the same way onorigin/main:sectors=0/page never became ready - sectors 0/6. On origin/main a0d149e (a clean worktree, same container) both fail identically: Queen viewport matrix with the same 18 size/view combinations, Queen touch contract with sectors 0/6. Logs: local runner, steps 57 and 63.Breaking Changes
TOXIC VERDICT
What Works
What Doesn't Work
t27c test-reportexits 0 on a failure (t27#7370), so the exit codes inmeta.jsonare all 0 and the verdict lives in the report text.Tech Debt
Known Issues
tri-test-now-runs-the-testsstill says the lessons wait on #7400 (left as written on its date).Overall Assessment: APPROVE once the Queen checks are confirmed green in CI. Self-Score: 8/10
TECH TREE Options
session.giffrom the casts so the gallery shows motion. Low effort.t27c test-reportexits non-zero on a failure, then re-record. Recommended: it removes the one caveat these recordings carry.Checklist
redacted: []){ "version": 1, "head_sha": "70b61bd4515ab69683a65f2ba9db2eae586c3660", "summary": "Lessons 13 to 21 of the AI numbers course now open real recordings instead of placeholders: each runs t27c test-report, plants one bug with a one-line sed, shows exactly the named test failing, and restores the spec with git checkout; all nine lesson claims reproduced.", "changes": [ "apps/website/scripts/t27c-mutation-casts.mjs: a recorder in the shape of tri-help-casts.mjs (its bareEnv): staged prompt and typing, real output at the time it printed; refuses a recording whose baseline is not all green, whose mutant does not fail exactly the named test, whose diff is not one line, or whose spec hash differs after git checkout; writes session.cast, meta.json, index.html, card.png and relists public/term/index.html", "public/term/t27c-gft-{smul,sadd,signed-mac,relu,exp2,argmax4,nll,sgd-step,xornet}: real asciicast v2 recordings replace the placeholders; meta.json has no pending field, gif is null because no GIF encoder was used, desc names t27c 0.5.1, zig 0.16.0, a Claude Code cloud container and t27 72f793357", "specs/course/ai-numbers.t27 and i18n/ai-numbers.ru.json: the nine lesson texts no longer say the recording waits on t27#7400; they describe t27c test-report, the sed line, the second report, git checkout and sha256sum, keeping every other fact", "specs/widgets/gallery.t27: the nine widget hooks describe the recordings instead of the placeholder", "Regenerated with the repo's generators: widgets-from-spec, course-from-spec, course-pages (18 lesson cards redrawn, EN and RU)", "scripts/t27c-mutation-casts.test.mjs, added to npm run test:course: the committed casts show exactly the named test failing and the spec hash restored", "src/data/blog/bodies/two-courses-twenty-seven-lessons-each.ts: a dated update paragraph (EN and RU) says the recordings exist now and how they were made; the original paragraph is kept" ], "tests": [ { "command": "t27c test-report specs/ternary/<spec>.t27, then sed -i <mutation>, then t27c test-report again, for all nine specs, by hand before recording", "status": "passed", "result": "baseline all pass, none vacuous; the mutants fail exactly m2, a2, pp, negz, em1, tie_low, perfect, ascend, x00", "evidence": "t27c 0.5.1, zig 0.16.0, clean worktree of gHashTag/t27 at 72f793357; the same runs are in public/term/t27c-gft-*/session.cast" }, { "command": "node scripts/t27c-mutation-casts.mjs --t27 <clean t27 worktree> --t27c <t27c> --zig <zig>", "status": "passed", "result": "wrote 9 recordings, none refused; the t27 checkout was clean before and after every one", "evidence": "public/term/t27c-gft-*/meta.json (exit codes all 0, recorded 2026-10-09)" }, { "command": "npm run test:course", "status": "passed", "result": "40 of 40 tests pass, 13 of them in the new t27c-mutation-casts.test.mjs", "evidence": "local run at this head" }, { "command": "every step of .github/workflows/website-checks.yml (checks job), one command at a time", "status": "failed", "result": "63 of 65 steps pass; Queen viewport matrix and Queen touch contract fail with sectors=0 because the Queen board's live data is not reachable from this container", "evidence": "On origin/main a0d149e7 (a clean worktree, same container) both fail identically: Queen viewport matrix with the same 18 size/view combinations, Queen touch contract with sectors 0/6. Logs: local runner, steps 57 and 63." }, { "command": "npm run check:course && npm run check:course-pages && npm run check:widgets && npm run check:widget-pages", "status": "passed", "result": "all up to date after regeneration; 392 pages, 392 cards, 194 widgets", "evidence": "local run at this head; part of the 63 passing steps" } ], "limitations": [ "gHashTag/t27#7400 stays blocked; the recordings use t27c test-report, which still exits 0 when a test fails (t27#7370), so each verdict is read from the report text and the recorder checks that text", "The recordings were made in a Claude Code cloud container, not on the t27c lab machine that made the earlier casts; t27c 0.5.1 was built from a recent tree, its exact commit is not recorded", "No GIF: gif is null and the gallery links the card; there is no session.gif", "The blog post tri-test-now-runs-the-tests still says the nine lessons wait on #7400; it is left as written on its date", "Queen viewport matrix and Queen touch contract were not green locally, on this branch or on origin/main; they need the Queen's live data" ], "tags": [ "courses", "recordings", "mutation", "ternary" ], "blog": { "title": "Nine lessons get their recordings without waiting for tri mutate plant", "summary": "Lessons 13 to 21 of the AI numbers course were placeholders waiting on a blocked PR; they now show t27c test-report passing, one planted bug failing exactly one named test, and git restoring the spec byte for byte.", "outline": [ "The problem: nine lessons said their recording waited on tri test and tri mutate plant from t27#7400, and #7400 is blocked, so the lessons showed no run at all.", "How it works: the recordings use t27c test-report directly, one sed line per lesson and git checkout, and a recorder that refuses any run whose mutant does not fail exactly the named test.", "The boundary: t27c test-report still exits 0 on a failure, the recordings come from a cloud container rather than the lab, and there is no GIF." ], "cast": "term/t27c-gft-relu/session.cast", "reproduce": [ "t27c test-report specs/ternary/gft_relu.t27", "sed -i 's/== 1) { return 0; }/== 1) { return x; }/' specs/ternary/gft_relu.t27 && t27c test-report specs/ternary/gft_relu.t27", "git checkout specs/ternary/gft_relu.t27 && sha256sum specs/ternary/gft_relu.t27" ] } }🤖 Generated with Claude Code
https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
Generated by Claude Code