Skip to content

design-15 S2b: wire sidecar delivery into approvals - #18

Closed
lr00rl wants to merge 1 commit into
feat/design-15-usage-reversalfrom
feat/design-15-metadata-sync
Closed

design-15 S2b: wire sidecar delivery into approvals#18
lr00rl wants to merge 1 commit into
feat/design-15-usage-reversalfrom
feat/design-15-metadata-sync

Conversation

@lr00rl

@lr00rl lr00rl commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

design-15 D2 trigger wiring (renderer + task shape landed in #13):

  • lines.sync_metadata {node_id} (in-core, proxy:admin): renders the node sidecar and queues a pending approval — Plan is the metadata document itself (secret-free; review shows the exact bytes). Idempotent per (node, metadata sha).
  • Apply: applyScriptFor routes singbox-linemeta approvals to the atomic tmp+mv/.bak writer, re-verifying the plan hash at execution (fail-closed on drift).
  • Auto-queue: a node's discovered line set changing across agent reports queues the same sync (system actor, own fingerprint map — not the 6h audit throttle). Unchanged/error reports queue nothing. Discovery still never mutates a node by itself.

Stacked on #17. vpn-core manifest/UI companion lands in the plugin repo.

Verification

  • gofmt/go vet clean; go test ./internal/server/ ok (21s)
  • New tests: queue + dedup, unknown node, script shape + tamper fail-closed, task-result ladder, discovery queues only on change (incl. error-skip)

Refs LatticeNet/lattice#2, #13#17.

design-15 D2: lines.sync_metadata queues a reviewed sidecar apply for
one node — Plan is the metadata document itself (secret-free, so review
shows the exact bytes), and the apply script re-verifies the plan hash
at execution, failing closed on drift. Queueing is idempotent per
(node, metadata sha).

Discovery change detection queues the same sync automatically (system
actor, own fingerprint map independent of the 6h audit throttle):
a node's line set changing across reports queues one pending approval;
unchanged or error reports queue nothing. Every byte still waits for an
operator's approval.
@lr00rl

lr00rl commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #20, which rebased the complete remaining Design 15 stack onto alpha/v0.2.2 and passed go test, go vet, gosec, govulncheck, formatting, and Docker contract CI before merge as 86422a1.

@lr00rl lr00rl closed this Jul 22, 2026
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