lpgcast.resolve¶
Resolve identities and assemble the graph container of one episode.
Identities are computed before edges are built, because graflo's writer fills digest and minted keys on vertex documents only, never on the endpoint documents inside edges.
| Identity mode | Key |
|---|---|
| natural | the identity properties the text stated |
| hash / funnel | the digest of its source properties |
| assigned, blank | a UUID derived from the schema, the episode, the type and the ref |
Derived UUIDs make a replay byte-identical; a fresh model call that names its refs differently still mints new vertices for assigned and blank types.
A mention (mention: true) is never written as a vertex. Edges reach it by
its primary identity, or — when the text gave only a secondary identity — are
held as pending until the write looks the primary identity up.
Attributes¶
Endpoint = EdgeEndpoint
module-attribute
¶
MINT_NAMESPACE = uuid.UUID('6f1c3a52-6a51-4f8e-9e0e-2b8c1d7a4e10')
module-attribute
¶
Classes¶
Resolution
¶
Bases: BaseModel
One episode's graph, ready to write.
Source code in lpgcast/resolve.py
Functions:¶
merge_containers(containers)
¶
One container holding every vertex and edge of containers, in order.
Source code in lpgcast/resolve.py
mint_id(schema, source_id, vertex_type, ref)
¶
The UUID of an assigned or blank vertex the model introduced as ref.
Source code in lpgcast/resolve.py
resolve(validation, slice_, episode, *, extractor, model=None)
¶
Build the episode's container, pending edges and groundings.
Source code in lpgcast/resolve.py
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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |