model: line_uuid + downstream_line_uuid on SingBoxNode (design-15) - #7
Merged
Conversation
Spec §9.3 binds a host-risk approval to the exact code and inputs that produced its plan: plugin id, version, artifact digest, service, method, request hash, and the full target set. The server had somewhere for only two of those — Plugin and a singular NodeID — so the rest had to be smuggled into the free-form Plan string and recovered by hashing it. Give them real columns. Each is compared to live state at execute time and each is what the operator's review is accountable for, so each should be a typed field, not a value parsed back out of a blob. ApprovalView carries them too, so a reviewer sees what will actually run — which plugin version, which artifact, which nodes. Every field is omitempty and additive: an approval that is not a plugin operation (nft, dns, agent update) serializes exactly as before, and NodeID stays the first target so the per-node approval machinery is unchanged. Tests: model build + proto contract test green.
Design-15 D1/D4/D6: the agent reads the sing-box sidecar metadata (lattice.singbox-metadata.v2) and reports the control-plane line identity plus declared chain edge per inbound. Both fields are omitempty so older agents and servers interoperate unchanged.
This was referenced Jul 18, 2026
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.
Summary
SingBoxNode.LineUUID— control-plane line identity (design-15 D1), sourced from the sidecarlattice.singbox-metadata.v2SingBoxNode.DownstreamLineUUID— declared chain edge target (design-15 §6)Both
omitempty: old agents/servers interoperate unchanged; JSON-only contract (no proto mirror for SingBox types).Verification
gofmtclean,go vet ./...clean,go test ./...okConsumers (server/agent) pin this branch as a Go pseudo-version until merge. Refs LatticeNet/lattice#2.