Repository navigation
spec(t27f): derive pass adds tested_by, data_flow and UNKNOWN call targets (Closes #10191) - #10198
Merged
Merged
Conversation
…rgets (Closes #10191) derive_graph(g, src) appends what the exporter must not claim: DERIVED tested_by (calls read backwards), DERIVED data_flow (a const or use named in a fn's return statement) and UNKNOWN opaque nodes for undeclared qualified call targets. It never changes an EXACT fact. Exporter plus derive equal the tutorial 08 fixture: 15 of 15 nodes, 16 of 16 edges, no special case. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 18, 2026 04:04
Contributor
This was referenced Oct 18, 2026
gHashTag
added a commit
that referenced
this pull request
Oct 18, 2026
…ind as pass (Closes #10212) (#10214) #10198, #10202 and #10194 added these three specs without a row in docs/reports/t27b_expectations.json, so t27b-native-ratchet reads "UNLISTED 3" on master and on every open PR (run 39096977680 on #10185): "the reference passes it and the ledger does not name it (t27b pass)". Adds the three rows in path order with the verdict the run measured. No other row moves. 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.
Closes #10191
Adds the T27F derive pass:
derive_graph(g: SpecGraph, src: []const u8) -> SpecGraphinspecs/t27f/spec_graph_derive.t27. It appends the facts the exporter (#10173) must not claim and changes nothing the exporter holds. Refs gHashTag/trinity#1648, RFC gHashTag/trinity#1649.Result
Exporter plus derive equal the hand-read
tutorial_08_graph()on the tutorial 08 snapshot as sets: 15 of 15 nodes (kind, label, name, span), 16 of 16 edges (kind, endpoints, label, line), in both directions. No special case was needed, so there is no finding about an unreproducible fixture edge.Rules (stated in the spec header, each follows EDGE_FROM_KINDS / EDGE_TO_KINDS)
tested_by_matches_callsalready states for the fixture.usethat an EXACT USES edge ties to a fn, and whose name appears inside one of that fn's return statements (fromreturnto the next;, outside strings, character literals and comments). This is the fixture's own comment: the named values are operands of the return expression.std.testing.expectEqual(namesstd.testing), spanning the lines that call through it. An UNKNOWN node has no edges, becausevalidate_edgerefuses an UNKNOWN endpoint.Why a separate module, not an extension of the exporter
The exporter promises it never emits DERIVED or SUGGESTED, and its test
the_scanner_never_emits_derived_or_suggestedchecks that. Keeping the inference in its own module keeps that promise true on its own, and lets a host choose exact-only or exact plus derived. The byte helpers are reused throughuse, not copied.Choices that are the rules' own, not read off the fixture
std.testing.expectEqual), and a two-segmentx.f(cannot be told from a method call on a local value.Limits (also in the spec header)
Names are matched as text; flow through locals and call results is not derived; a graph that does not validate, or a source with a different line count, is returned unchanged; past 192 nodes or 254 edges the count keeps growing and
validate_graphanswers the too-many verdict, so the result is refused, never truncated. Not wired to a host: the MCP tool does not call it.Tests (10 tests, 2 invariants)
Every rule has a synthetic test with negative controls (a fn calling a fn, a
letuse, a use after the return's;, a test body, a name in a comment or string, a two-segment path, ause-declared head). Also: the never-change-an-EXACT-fact check with tampered copies, idempotence, the unchanged-input cases, and overflow cases for both the node and the edge capacity with a fits-exactly control. The heavy tutorial 08 comparison is atest, not aninvariant, because invariants are evaluated at compile time.Verification (Railway lab only)
t27c test-report specs/t27f/spec_graph_derive.t27: 10 of 10 pass, 2 invariants proved, 0 vacuous passes.t27b test specs/t27f/spec_graph_derive.t27 --checkunderqemu-aarch64, both the 2026-10-17 and the 2026-10-10 aarch64 binaries: 10 passed, 0 failed, invariants 2 held, 139 runtime asserts, exit 0. The exporter under the same binaries: 20 of 20, exit 0.Also updates
.claude/skills/t27f/SKILL.md(new table row and the prose that said no pass derives) and thet27f/row ofspecs/OWNERS.md.🤖 Generated with Claude Code