Repository navigation
spec(t27f): SpecGraph holds 1024 nodes and 4096 edges, u16 indices (Closes #10230) - #10231
Merged
Merged
Conversation
gHashTag
enabled auto-merge (squash)
October 18, 2026 05:05
…10230) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag
force-pushed
the
claude/t27f-graph-caps-all
branch
from
October 18, 2026 05:13
25626d7 to
8b38651
Compare
This was referenced Oct 18, 2026
Merged
Contributor
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 #10230
SpecGraph held 192 nodes and 254 edges, so about 2 percent of the corpus (the biggest specs) was refused. This raises the caps to 1024 nodes and 4096 edges and moves edge endpoints to u16. Every spec in
specs/now fits; anything past the caps is still refused with ERR_TOO_MANY_*, never truncated.Measurement (Railway lab, nothing on the Mac)
All 2225
specs/**/*.t27files, exporter then derive pass (#10198), on a scratch build with 2048/8192 caps, then re-run on the final 1024/4096 build: 2225 of 2225 validate.Headroom over the maximum: 1.32x nodes, 1.28x edges. An invariant keeps it at 25 percent or more. The doc block in spec_graph.t27 records the method.
Changes
spec_graph.t27: MAX_NODES 1024, MAX_EDGES 4096, arrays andblank_graphwidened,edge_from/edge_toandwith_edgeendpoints u16, NO_INDEX 65535 (NO_CODE stays u8 255), measured numbers and constants, headroom invariant; the at-capacity test is rebuilt as 64 fns x 64 tests (distinct pairs).spec_graph_export.t27: u16 edge endpoints, name-span arrays widened, the two capacity tests now cut an at-cap and an over-cap source from ONE literal by slicing.spec_graph_derive.t27: only what the wider index forces:as u8toas u16atwith_edge, and the two capacity tests made cap-relative.spec_graph_fold.t27(landed in spec(t27f): readable big graphs -- wrapped columns, kind fold, expand kind, hit testing #10228 while this was in review): only what the wider index forces:as u8toas u16atwith_edge(expand_graph and the wide fixture) and three stale comments about MAX_NODES. The issue Boundary now lists it..claude/skills/t27f/SKILL.md: limits, and the exporter row no longer says "not wired to a host" (it is).spec_graph_view.t27andspec_graph_outline.t27are unchanged: the view reads indices as u32.Lab verification
t27c test-report: spec_graph 14/14, spec_graph_export 20/20, spec_graph_derive 10/10, spec_graph_outline 8/8, spec_graph_view 9/9, spec_graph_fold 12/12; 0 failing and 0 vacuous in each.t27b test --checkunder qemu-aarch64: every test PASS in all six specs;t27c check: Typecheck OK for all six. Re-run on the tree rebased onto master fdb6b28.Cost of the bigger caps (wasm, same glue as t27-mcp/wasm/export.zig, zig 0.16.0 ReleaseSmall, run under node)
blank_graph, copied into three per-module SpecGraph types.with_nodeandwith_edgecopies the whole graph by value, so the cost per call grew with the graph size. A typical spec stays in the low milliseconds.gx_view_height) on the largest spec by nodes (eval, 768 nodes): 190 ms; the layout is O(n^2) per row lookup. spec_graph_view is not changed here.Not done
Only
.t27and prose changed; no non-t27 code.🤖 Generated with Claude Code