Skip to content

feat(model): design-13 netguard security-group + wireguard topology models - #5

Merged
lr00rl merged 3 commits into
mainfrom
feat/netguard-foundation
Jul 9, 2026
Merged

feat(model): design-13 netguard security-group + wireguard topology models#5
lr00rl merged 3 commits into
mainfrom
feat/netguard-foundation

Conversation

@lr00rl

@lr00rl lr00rl commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Wire contract for design-13 (LatticeNet/lattice#1) slices G1/G2/W1. Additive only.

NetGuard

GuardPortRange, GuardZone, GuardRule, SecurityGroup (versioned), NodeGuardBinding (versioned, Managed, apply-state + AppliedTableSHA drift anchor), GuardListener/GuardInterface/GuardNodeReality (the G3 reality contract, frozen now). NetEndpoint.ZoneID + NetRefZone + builtin zone id constants.

WireGuard

WGNetwork (mesh | hub-and-spoke | custom; listen port, keepalive, MTU, DNS), WGMembership (role, server-allocated address, per-member overrides, hub ExtraAllowedIPs), WGExternalPeer (non-node devices). Topology/role constants.

The existing implicit fleet mesh stays fully expressible through Node.WireGuard* and converts to this shape behind a render-parity gate (see lattice-server#6).

gofmt -l clean, go test ./... green. Consumed by LatticeNet/lattice-server#6 via Go pseudo-version pin — no stable tag minted, so v0.2.16 remains the latest release.

https://claude.ai/code/session_01D6PbasV2UT8nytJXGpn47Q

lr00rl added 2 commits July 9, 2026 01:08
GuardPortRange, GuardZone, GuardRule, SecurityGroup, NodeGuardBinding
(versioned, with apply-state + drift-anchor fields), and the
GuardNodeReality reporting contract. NetEndpoint gains an additive
ZoneID for the new zone remote kind; builtin zone id constants cover
public/loopback/wireguard/tailscale.

Claude-Session: https://claude.ai/code/session_01D6PbasV2UT8nytJXGpn47Q
WGNetwork (mesh | hub-and-spoke | custom), WGMembership (role,
address, per-member overrides, hub ExtraAllowedIPs), and
WGExternalPeer for non-node devices. Topology/role constants plus
WGDefaultListenPort/WGDefaultKeepalive.

Additive: the existing implicit fleet mesh stays expressible through
Node.WireGuard* and converts to this shape behind a render-parity gate.

Claude-Session: https://claude.ai/code/session_01D6PbasV2UT8nytJXGpn47Q
@lr00rl lr00rl changed the title feat(model): design-13 netguard security-group model feat(model): design-13 netguard security-group + wireguard topology models Jul 9, 2026
@lr00rl
lr00rl marked this pull request as ready for review July 9, 2026 06:26
NetEndpoint now carries zone_id in both the Go/JSON model and the protobuf contract, and the proto contract test covers the newly introduced NetGuard and WireGuard messages so future model-only drift is visible. The free-form rate_limit field is removed before it becomes stable contract baggage; rate limiting should return as a structured type once the renderer slice exists.

Constraint: design-13 is defining the shared SDK contract consumed by server and future clients

Rejected: Leave protobuf unchanged | zone-scoped remotes would be silently unrepresentable outside Go/JSON

Rejected: Keep rate_limit as string | opaque grammar would freeze invalid state into the public contract

Confidence: high

Scope-risk: moderate

Directive: Do not add guard authoring fields to model.go without updating proto/lattice/v1/common.proto and proto_contract_test.go in the same slice

Tested: go test ./...

Not-tested: Generated protobuf bindings; repo currently stores proto contracts only
@lr00rl
lr00rl merged commit 4623d3b into main Jul 9, 2026
1 check passed
@lr00rl
lr00rl deleted the feat/netguard-foundation branch July 9, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant