Skip to content

TASK-0016 NetGuard reality suggestion core - #26

Merged
lr00rl merged 1 commit into
integrationfrom
feat/hephaestus-task0016-netguard-suggestions-core
Jul 31, 2026
Merged

TASK-0016 NetGuard reality suggestion core#26
lr00rl merged 1 commit into
integrationfrom
feat/hephaestus-task0016-netguard-suggestions-core

Conversation

@lr00rl

@lr00rl lr00rl commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a pure internal/netguard suggestion engine for low-trust model.GuardNodeReality snapshots.
  • Compare listeners, interfaces, managed table hash, current binding overrides, attached groups, and interface/CIDR-backed zones.
  • Emit deterministic review-only suggestions for missing allows, stale allows, overlay/public allow moves, untrusted overlay zones, and managed-table drift.

Scope boundary

  • TASK-0016 allowed paths only: internal/netguard/**.
  • No API route, State persistence, dashboard/plugin UI, node-agent wiring, SDK/proto/model contract, auth/RBAC, workflow, signing, release, deploy, or live host discovery changes.
  • /api/agent/guard-reality remains out of scope until the API contract row is fully in force and a separate endpoint/storage slice is opened.

Exact head

e3238de6fee15327112878207ea4a3a11cb00c27

Verification

  • 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_INSPECTED=/private/tmp/hephaestus-task0016-redaction-ledger.txt sh ../../lattice-olympus/rules/checks/redaction-scan.sh internal/netguard/suggest.go internal/netguard/suggest_test.go
  • git diff --check

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.
@lr00rl
lr00rl merged commit 3fcf54a into integration Jul 31, 2026
1 check passed
@lr00rl
lr00rl deleted the feat/hephaestus-task0016-netguard-suggestions-core branch July 31, 2026 13:43
@lr00rl

lr00rl commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Landed via direct integration merge commit 3fcf54a9d7d894f964adb8e414593807106d2a83 after exact-head and post-merge gates. First parent: 0fef1eb91129a9c0e735aefcccf8ac714d5b8eeb; second parent: e3238de6fee15327112878207ea4a3a11cb00c27. Remote ci / go: SUCCESS (10m28s).

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