TASK-0016 NetGuard reality suggestion core - #26
Merged
lr00rl merged 1 commit intoJul 31, 2026
Conversation
G3 needs operator-reviewed advice from low-trust node facts, but the report endpoint and State collection are separate contract-bound work. Add the deterministic core now so later HTTP/storage wiring can wrap a tested function instead of embedding policy in handlers. The intent index includes per-node overrides before attached groups, matching the compiler's effective-order model, and zones classify reality by interface names or CIDRs so CIDR-backed overlay zones do not fall back to public. Constraint: TASK-0016 is limited to lattice-server/internal/netguard/** and excludes API, State, dashboard, agent, SDK, auth/RBAC, plugin gateway, workflow, signing, release, and deploy changes. Rejected: Implement /api/agent/guard-reality in this slice | contract/api-contract.md row #8 is still draft and endpoint/storage is outside TASK-0016. Rejected: Generate suggestions from live ss/ip/nft commands | reality collection is TASK-0015's node-agent concern and tests must stay pure. Confidence: high Scope-risk: narrow Directive: Keep suggestions as low-trust display/diff prompts; accepting one must remain a later audited mutation path. Tested: initial targeted go test ./internal/netguard -run 'TestSuggest' -count=1 failed on missing API; gofmt; go test ./internal/netguard -run 'TestSuggest' -count=1; go test -race -cover ./internal/netguard (81.7%); sh scripts/check-docker-defaults.sh; go vet ./...; go test -race -cover ./...; redaction-scan with inspected synthetic fixture ledger; git diff --check. Not-tested: No endpoint/storage/dashboard/agent integration and no live host discovery commands; those are out of scope.
Contributor
Author
|
Landed via direct integration merge commit |
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
internal/netguardsuggestion engine for low-trustmodel.GuardNodeRealitysnapshots.Scope boundary
internal/netguard/**./api/agent/guard-realityremains out of scope until the API contract row is fully in force and a separate endpoint/storage slice is opened.Exact head
e3238de6fee15327112878207ea4a3a11cb00c27Verification
go test ./internal/netguard -run 'TestSuggest' -count=1go test -race -cover ./internal/netguard(81.7%)sh scripts/check-docker-defaults.shgo vet ./...go test -race -cover ./...REDACTION_INSPECTED=/private/tmp/hephaestus-task0016-redaction-ledger.txt sh ../../lattice-olympus/rules/checks/redaction-scan.sh internal/netguard/suggest.go internal/netguard/suggest_test.gogit diff --check