Commit 37e0bfd
authored
chore: support plural subgraphs: form, pull spec v0.8.1 (#10)
* test: support plural subgraphs: form, pull spec v0.8.1
Bump the spec submodule from v0.8.0 to v0.8.1 to pick up fixture 019
(subgraph-two-level-nesting), the regression coverage that exercises
namespace and parent_states stacking at depth 2.
Extend the conformance harness to handle the plural `subgraphs:` map
at a fixture's top level. Subgraphs there can reference each other,
so they're compiled in dependency order via iterative resolution —
each pass picks up subgraphs whose referenced names are already in
the registry, and the loop errors on cycles or unresolvable names.
Singular `subgraph:` handling (used by 006, 011, 013) is unchanged.
Engine itself needs no changes; it already supports arbitrary nesting
depth through descend_into_subgraph recursion. Fixture 019 passes on
the first run after the harness extension.
* test: harden plural subgraphs harness against fixture errors
Two defensive checks added per PR review feedback:
1. _compile_subgraphs_map now raises ValueError if an entry's `name`
field is present and disagrees with the dict key, or if the name
already exists in the registry (collision with the singular
subgraph: form or duplicate plural entry). Both are fixture
authoring bugs the harness should surface, not paper over.
2. _unsupported_directive now also walks every entry under the
plural `subgraphs:` map. A future fixture with fan_out or a flaky
directive inside a nested subgraph will skip cleanly instead of
failing noisily.1 parent c332657 commit 37e0bfd
2 files changed
Lines changed: 68 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
106 | 167 | | |
107 | 168 | | |
108 | 169 | | |
| |||
113 | 174 | | |
114 | 175 | | |
115 | 176 | | |
116 | | - | |
117 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
118 | 181 | | |
119 | 182 | | |
120 | 183 | | |
121 | 184 | | |
122 | 185 | | |
| 186 | + | |
| 187 | + | |
123 | 188 | | |
124 | 189 | | |
125 | 190 | | |
| |||
0 commit comments