Skip to content

design-15 S6b: preview + encrypted endpoint vault + backend error surface (0.4.0-alpha.1) - #3

Merged
lr00rl merged 4 commits into
mainfrom
feat/design-15-deep-integration
Jul 22, 2026
Merged

design-15 S6b: preview + encrypted endpoint vault + backend error surface (0.4.0-alpha.1)#3
lr00rl merged 4 commits into
mainfrom
feat/design-15-deep-integration

Conversation

@lr00rl

@lr00rl lr00rl commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

design-15 §7 companion slice (pairs with LatticeNet/lattice-server#16):

  • preview (read, proxy:read): pulls the same vpn-core export, reads the remote managed sub, returns added/removed/unchanged labels (URL fragment → host fallback) — read-only, full links never leave the artifact.
  • Endpoint vault: save_endpoint / clear_endpoint / endpoint_status via secret:read/secret:write (§9.4 encrypted store, this plugin's own namespace). endpoint_status hints scheme://host only — the secret path never round-trips. Operator calls then use base_url: "secret://endpoint", which lattice-server#16 resolves before operator-target binding. The autosync flag stored alongside drives the server's debounced auto-sync.
  • Error surface: http responses decode body_base64; non-2xx failures surface the Sub-Store backend's own error text (bounded 4 KiB, flattened). Transport failures stay opaque — the existing no-leak test (secret URL path) still pins that behavior.
  • UI: "Preview changes" panel (+new/−removed/unchanged badges, create hint), save/use/clear endpoint controls, auto-sync toggle, validator accepts secret:// refs.
  • Manifest: declares backing:"runtime" (require-declared-backing gate); capabilities += secret:read, secret:write; bundle rebuilt (Go 1.26.4 / Node 22), packed 2× byte-identical, re-signed (server-parity OK).

Verification

  • Go tests 17/17 (new: diff, label, preview diff/missing-sub/read-only, vault save/clear/status hint, backend body surfacing) — -count=1
  • UI: typecheck clean, vitest 9/9, build + verify:build pass
  • Reproducible digest matches manifest; pluginsign server-parity OK

Refs LatticeNet/lattice#2, LatticeNet/lattice-server#16.

lr00rl added 4 commits July 20, 2026 06:27
design-15 §7 companion slice (0.4.0-alpha.1):

- preview (read): pulls the same vpn-core export, reads the remote
  managed sub, and reports added/removed/unchanged labels — no writes,
  full links never leave the artifact.
- save_endpoint / clear_endpoint / endpoint_status: the endpoint (and
  the auto-sync flag) lives in this plugin's encrypted vault via
  secret:read/secret:write; endpoint_status hints scheme://host only, so
  the secret path never round-trips. The server resolves secret://
  operator-target references for status/preview/import calls.
- http responses now decode body_base64 and non-2xx failures surface the
  Sub-Store backend's own error text (bounded, flattened); transport
  failures stay opaque so the secret path cannot leak.
- UI: Preview changes panel, save/use/clear endpoint controls, auto-sync
  toggle; secret:// references accepted by the endpoint validator.
- Manifest declares backing="runtime" per the alpha server's
  require-declared-backing gate; bundle rebuilt and re-signed.
The plugin stores one versioned endpoint document, reports vault and autosync failures, serializes dirty follow-up syncs, and removes secret-bearing response and preview text. The prerelease manifest is signed against the deterministic bundle.

Constraint: Endpoint changes and autosync outcomes must be observable without leaking credentials.

Rejected: Independent secret keys | permits torn endpoint and autosync state

Confidence: high

Scope-risk: moderate

Directive: Preserve atomic endpoint writes and explicit degraded status semantics.

Tested: UI tests and typecheck; Go race tests and vet; deterministic Node 22/Go 1.26.4 bundle; server-parity manifest verification

Not-tested: Live Sub-Store service before canary deployment
@lr00rl
lr00rl marked this pull request as ready for review July 22, 2026 13:29
@lr00rl
lr00rl merged commit 1d18c3b into main Jul 22, 2026
1 check passed
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