Documentation
¶
Overview ¶
platformgraph writes the platform graph: the system the engine's code becomes, as one deterministic JSON file (memql#5727, design record D6).
Usage:
go run ./cmd/platformgraph --root . --out component/architecture/embedded/platform.graph.json
Run it through `make platform-graph`, which is the one place the flags live; TestPlatformGraphIsNotStale regenerates through the same target.
It lives in the ROOT module because what it reads needs the platform tier and above -- component/node's role and routing tables, the generated proto descriptors, the concept registry and the automation loader -- and the graph it writes lives in component/architecture, which is base tier and may take that data but never import it.
Eight passes, each a function of the tree:
nodes the roles (component/node/roles.go), mesh or not, and the
packages each role's binary links (`go list -deps -tags <type>`,
pinned to linux/amd64 with cgo off, the image's build)
deploy deploy/k8s/base plus components/engine-bff: Deployments,
Services, ports, runs_on, selects, dials, connects_to
services the proto descriptors: gRPC services, their RPCs, and serves
edges from each role to the servers its build constructs
frontdoor the generated cloud front door: hosts and paths, routes_to
routing the mesh event-routing table (node.RoutingRules)
concepts every concept by namespace and its @relationship edges
automations the static automation graph, through the one projection the
automationGraph builtin and cmd/memql-arch share
os the MemQL OS navigation contract
The output carries no timestamp, no absolute path and no domain (hosts are written against the placeholder <domain>), and is byte-identical across runs and machines.