Repository navigation
feat: t27_examples -- short compiler-checked worked examples per .t27 topic - #11
Merged
Merged
Conversation
… topic Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary by t27-beesThis PR adds Worth a look
Read: 8 files, +128 -1, the whole diff. Head |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts: # README.md
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.
Closes gHashTag/t27#10081
Part of the epic gHashTag/t27#10066 (learnability: worked examples for cheap models). Stacked on #8 (
t27-check); replaces #7, which GitHub marked merged although its commits never reached a landed branch; the spec is gHashTag/t27#10083.What
A new tool,
t27_examples: give it a topic (clocked,comb,fn,test, orresetwith async, sync or none) and get one to three short slices of real specs, at most 40 lines each, with one line on what each shows. An unknown topic returns the list of topics and no example.wasm/examples.wasm+wasm/examples_table.mjs: generated fromspecs/t27mcp/examples.t27byt27c gen-c+zig ccandt27c gen-js. The spec holds the topic matcher, the pinned commit and the pointer table; commands and sha256 are inwasm/BUILD. Built on the Railway lab.examples.mjs(24 lines) is glue: it passes the question to the wasm, fetches each row's file at the pinned commit through the server's cachedgetText, and cuts the lines. No table and no rule lives in it.Hand-written JavaScript added:
examples.mjs24,server.mjs8,smoke.mjs8 = 40 lines (cap: 40 per file, 80 per PR).Evidence
npm run smoke: the three newt27_exampleschecks pass (clocked slices of at most 40 lines containingfn on_clock;async resetisreset_asyncandsync resetisreset_sync; an unknown topic returns the topic list and no example). The run's one failure,backendFailures tally matches the specs blaming a backend, is a stale assertion that predates this stack (it summed a per-backend count against a spec count); it is fixed in the stacked brief PR feat: t27_spec brief by default; field lists and failure reasons from a .t27 spec (Closes gHashTag/t27#10090) #10.t27c test-reporton the lab.🤖 Generated with Claude Code