Commit 406c723
The nodehood merge had two implementations, and one was dead
R952 was filed to refile intent_node_metadata_defect and split it per
grain. Absorbed here because the capture stages read it. Looking at it
turned up what the item had not seen: the merge it belongs to exists
twice.
graphitron_node and graphitron_node_keycolumn are stored relations
written by the graphitron gatherer, merging what the author wrote with
what the generated class published and recording which tier answered.
intent_resolved_node_type_id and intent_resolved_node_key_column
restated the same tiers, the same pick and the same well-formedness gate
as views, with intent_inferred_node_type as the published arm both stood
on. The defect rule looked like it had four readers; it had two, counted
once per implementation.
The live side had already moved. intent_resolved_node_key_shape, seven
readers, already stood on the stored relation; the key-column view had
no production reader at all; the type-id view had one, StoreNodeTables,
taking two columns graphitron_node carries. All three views go.
Swapping the reads onto the stored relations is what proved the two
agreed, and three cases did not. Each was the view admitting what the
stored relation's foreign keys forbid: a pinned column the table lacks,
forwarded as resolved; key columns for a @node with no @table, which is
not a node; a metadata entry returned in the author's spelling rather
than the catalog's. Two of those cases said in their own javadoc that
they existed to record a difference rather than an outcome, and the
difference is settled.
One behaviour changed rather than being confirmed. An ambiguous binding
now silences the pinned tier as well as the two table-reaching ones: a
key column is a column of a table, so a name pinned against two
candidate tables resolves against neither.
What it buys is R952's stated goal without its split.
DetectionReadReachGateTest loses three relations from
ResolvedKeyProjections' reach and nothing replaces them, node identity
being read off a table now rather than a tiered union re-expanded per
driving row. The schema holds 125 views where it held 128.
The fact model page's provenance rule is rewritten in the same change.
It said the resolved value is always a view and never a stored merge,
which graphitron_node had already stopped being true of. It now says
that two sources of one value are at least three facts, that the derived
fact owes an answer where its sources disagree, that how it is realised
is the storage rule's question, and that the origin belongs on the
derived row because it is the way back to the rest of what that source
knows.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QDMJx75yxRTJACZ9fW2D5S1 parent 72be35e commit 406c723
18 files changed
Lines changed: 238 additions & 235 deletions
File tree
- docs/architecture/explanation
- graphitron-model/src
- main
- java/no/sikt/graphitron/model
- capture/document
- derive
- resources/no/sikt/graphitron/model
- test
- java/no/sikt/graphitron/model
- derive
- intent
- resources/no/sikt/graphitron/model
- graphitron/src/test/java/no/sikt/graphitron/rewrite
- capture
- derive
- roadmap
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
| 664 | + | |
664 | 665 | | |
665 | 666 | | |
666 | 667 | | |
| |||
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
675 | | - | |
676 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
677 | 682 | | |
678 | 683 | | |
679 | 684 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
0 commit comments