Skip to content

spec(t27f): readable big graphs -- wrapped columns, kind fold, expand kind, hit testing - #10228

Merged
gHashTag merged 1 commit into
masterfrom
spec/t27f-graph-fold-10218
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
spec/t27f-graph-fold-10218

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10218

Adds specs/t27f/spec_graph_fold.t27 (module t27f_spec_graph_fold) next to the graph view, so a big spec is readable in the T27F graph view. All in t27; the view's colour constants (VIEW_LABEL_*, VIEW_TEXT, VIEW_BACKDROP) are only read, never edited.

What it adds

  • Wrap. A kind column with more than WRAP_MAX_ROWS (N = 12) rows wraps into sub-columns of R rows; R is chosen in N..tallest so width:height is nearest phi (WRAP_ASPECT_MILLI 1618, tolerance 25%). A graph that fits in N rows is laid out exactly as the view lays it out (the tests compare every box and edge end on both fixtures). The rule is a pure function of per-kind counts (WrapPlan), so a 300-fn layout is checked although MAX_NODES is 192 today. Edge ends pick the facing side by sub-column; view_edge_line is reused unchanged.
  • Fold. fold_level, fold_kind_count / fold_kind_label / fold_kind_label_count, per-kind box geometry (fold_box_x/y/w/h, fold_width/height), fold_edge_count / fold_edge_count_kind / fold_edge_label and arc geometry (fold_edge_x1/x2/y/apex). Counts are exact and sum to the graph's own counts (a test checks it). A box or an arc is drawn with the weakest member label; the aggregate is not called DERIVED.
  • Expand. expand_graph(g, k) = nodes of kind k plus the ends of any edge touching one, every edge with an end of kind k, fields copied verbatim, expand_origin maps back. Laid out with the wrap functions; layout_safe guards it because a sub-graph need not have the module at node 0.
  • Hit testing. wrap_hit, wrap_node_line_start/end, wrap_hit_line_start/end, fold_hit, expand_hit. No layout math in the host.
  • fx_* scalar entry points with a which fixture selector (0 and 1 are the view's, 2 is a new 185-node wide_graph).

Numbers

  • Wide graph (153 fns): 28 rows, 3160 x 1956, aspect 1615 (phi is 1618); the unwrapped view is 9956 px tall.
  • 300-fn plan (counts): 35 rows, 3940 x 2404, aspect 1638, no slot overlaps; unwrapped it would be 19364 px tall.

Not claimed

  • No host draws the fold yet. Nothing routes an edge around a box.
  • The 300-fn graph exists as counts, not yet as a SpecGraph, until the cap-raising change lands; one test fills the graph to min(300, MAX_NODES - 8) fns and becomes the real 300-fn test then.
  • expand_graph narrows new node numbers with as u8; if the cap-raising change widens the endpoint arrays, those casts follow.

Verified

  • Railway lab, t27c test-report on the new spec: 12 of 12 pass, 2 invariants proved, 0 vacuous.
  • tools/dupe_scan.py --like: nothing in the file is written elsewhere. ASCII only; no foreign-language code.

🤖 Generated with Claude Code

… kind, hit testing (Closes #10218)

New specs/t27f/spec_graph_fold.t27 next to the graph view. Columns taller than
N = 12 rows wrap into sub-columns so the canvas aspect is near phi; a graph
that fits is laid out exactly as the view lays it out. A fold shows one box
per node kind with the exact count and one arc per pair of kinds with the
exact edge count, labelled by the weakest member. expand_graph keeps one kind
and its direct neighbours verbatim with an origin map. wrap_hit and the line
span functions take a click to a node and its lines. Colour constants of the
view are not touched.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) October 18, 2026 04:58
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 04:58:29 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 49 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=0f8c66b9ed0e != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit fdb6b28 into master Oct 18, 2026
26 of 30 checks passed
gHashTag added a commit that referenced this pull request Oct 18, 2026
#10228 added specs/t27f/spec_graph_fold.t27; t27b-native-ratchet on
#10234 reports it UNLISTED (reference and t27b pass it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 18, 2026
…Closes #10233) (#10234)

* spec(tri/pr): preflight -- drop the use path through the keyword test (Closes #10233)

Since #10220 the parser discarded 7 tokens of
use tri::test::report::opens_with; -- the path stops at the keyword
test -- and the suite's parse-no-discard phase failed on master.
preflight now builds a private opens_with on the span_is it already
imports from tri::lab::receipt; the four call sites are unchanged.
Seal and gen/rust are regenerated by t27c on the Railway lab.

Lab, master fdb6b28 + this change: parse-complete reports nothing
discarded, test-report 19/19 with 0 vacuous (same as before), and
check_seal_coverage.py: OK, 2514 seals, 2392 hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ledger(t27b): list preflight and the two suite_ledger_steward specs as pass (Refs #10233)

t27b-native-ratchet is red on master and on #10185 with UNLISTED 3:
specs/ci/suite_ledger_steward.t27, specs/jobs/suite_ledger_steward.t27
and specs/tri/pr/preflight.t27 pass on the reference and t27b but the
ledger does not name them. Same shape as #10214.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ledger(t27b): list spec_graph_fold as pass (Refs #10233)

#10228 added specs/t27f/spec_graph_fold.t27; t27b-native-ratchet on
#10234 reports it UNLISTED (reference and t27b pass it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ledger(t27b): list specs/t27f/hot.t27 as pass (Refs #10233)

Master drift from #10235: t27b-native-ratchet run 39100342521 reports
UNLISTED 1 for exactly this spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec(t27f): readable big graphs -- wrapped columns, kind fold, expand kind, hit testing

1 participant