Repository navigation
feat(t27f): t27f_outline and t27f_graph {path} from the T27F exporter - #13
Merged
Merged
Conversation
Read a .t27 spec through its exact-only T27F graph instead of the whole file. Generated spec_graph_export.zig/.mjs on the Railway lab from gHashTag/t27 master 290ff17df; export.zig gains ~80 lines of buffer/getter glue, graph.mjs is 50 lines of host I/O. Refuses (never truncates) over 192 nodes / 254 edges. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary by t27-beesThis PR adds two new tools ( Worth a look
Read: 11 files, +1644 -45, the whole diff up to 60000 characters (the rest was not read). Head |
gHashTag
marked this pull request as draft
October 18, 2026 04:05
… graph.mjs is I/O only The outline text templates, the refusal choice, the exact-only filter, the span rule and the tested-by view are t27 (gHashTag/t27#10202, issue #10200), generated to wasm on the lab. graph.mjs now only moves bytes and fills the spec's {} marks. Co-Authored-By: Claude Sonnet 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.
What
Claude Code can now read a
.t27spec through its T27F graph instead of the whole file.t27f_outline({path}): compact text, one line per node (kind, name, lines a-b, label), one per edge (kind, from -> to, line), plus a short derived section "fn X is tested by: ...".t27f_graphaccepts{path}as well as{fixture}and draws the exported graph with the existingspec_graph_viewlayout.The logic is t27
The output wording and every decision are in a new spec,
specs/t27f/spec_graph_outline.t27(gHashTag/t27#10202, issue #10200; 8 tests, 0 vacuous, on the Railway lab): the text templates (OUTLINE_TEXT,REFUSAL_TEXT, with{}marks), which refusal text a verdict takes (refusal_index), which facts print (shows_in_outline, exact only), how a span prints (span_is_range) and the tested-by view (tested_by_count,tested_by_of). The spec carries its own small copy of the tested_by rule until the derive spec (gHashTag/t27#10198) lands.How it is built
wasm/spec_graph_export.zig/.mjsgenerated witht27c gen/gen-jsfrom gHashTag/t27 master 290ff17df,wasm/spec_graph_outline.zig/.mjsfrom the branch of spec(t27f): spec_graph_outline -- the outline wording and decisions in t27 (Closes #10200) t27#10202 (head d1d8d74fa), on the Railway lab only.wasm/spec_graph_view.*regenerated for the larger capacity;wasm/t27f.wasmrebuilt (39273 bytes). Provenance, recipe and all sha256s are inwasm/BUILD.Glue disclosure (I/O only, no spec logic)
wasm/export.zig: 46 -> 138 lines, so ~92 lines of glue: a 2 MiB source buffer + 512-byte path buffer withgx_set_len/gx_set_path_len,gx_load()(runs the exporter, copies the graph into the view and outline modules' identical-shaped types field by field), scalar getters from a comptime loop over the SpecGraph fields, and wrappers for the view and outline fns. No spec function is named and no number is held.gx_node_name_ptr(i)/gx_node_name_len(i), a pointer and length into the source buffer.graph.mjs(57 lines): host I/O only. It writes bytes in, loops over nodes and edges and fills the spec's{}templates left to right. It chooses no wording, no filter and no refusal text. Its leftover: name tables for kinds/labels/verdicts are read from the generated constants ofspec_graph_view.mjs(gen-js does not emit them).server.mjs: tool registration, path validation (*.t27, no leading/, no..), SVG text fitting.Verification (fresh
node server.mjs, JSON-RPCtools/call, re-run after moving the logic into t27; output unchanged)t27f_outline specs/tutorial/08_modules_and_arrays.t27: 14 nodes, 9 edges (3 tested-by lines).t27f_graphon the same path: 14 nodes, 9 edges, 1600x380 SVG.specs/compiler/core/t27core_ddc.t27(about 1.36 MB, 4165 lines): 41 nodes, 14 edges.specs/numeric/gf16.t27: "refused, too many nodes: 436 nodes found, the graph holds at most 192. No graph is drawn or truncated." (alsot27core.t27, 307 nodes).t27f_graphreturns the same verdict as an error.../etc/passwd.t27is rejected by path validation.Order of merge: gHashTag/t27#10202 first (provenance of the outline spec), then this PR. Auto-merge is disabled on this repository, so a human merges.
package.jsonfileslistsgraph.mjs,wasm/spec_graph_view.mjs,wasm/spec_graph_export.mjsandwasm/spec_graph_outline.mjs.🤖 Generated with Claude Code