Repository navigation
OSS-368 P0 contract: versioned node-control protocol and ownership model - #516
Merged
Merged
Conversation
Adds a separate node_control.proto with authenticated node identity, bounded one-time enrollment metadata, per-node claims, capability and version negotiation, health/preflight, operation dedupe, bounded contexts and fail-closed dispatch with no legacy fallback. Generated Go/TS come only from this file via the pinned generator. Adds metadata-only Node columns, an idempotent migration with column-only rollback, legacy-safe defaults, an owned-DB apply/rollback fixture, negative RBAC fixtures proving all nine RPCs denied by default, a descriptor check for secret fields in responses, ADR 0019 and a governing knowledge concept. No agent, daemon lifecycle or enrollment server is implemented.
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.
OSS-368 / Track C — P0 Contract & model (plan §19)
Focused PR: versioned typed node-control contract and node ownership model only. No agent, daemon lifecycle or enrollment server is implemented (P1+). P0-GATE (PR509 server redaction + PR510 UI no-round-trip) is merged, so the hard gate is satisfied.
Scope
proto/carbonpanel/v1/node_control.proto:NodeControlServicewith 9 RPCs; authenticatedNodeIdentity(fingerprints/generations only), TTL-bounded one-time enrollment metadata, per-nodeNodeAuthorizationClaims, capability/version negotiation with explicit skew, redacted health/preflight reports,OperationEnvelopededupe with deadline/attempt/capability snapshot, and fail-closedDispatchOperationwith no legacy/host-socket fallback.NodeTransportdeliberately has no legacy value.ClaimEnrollmentRequest; all responses carry fingerprints/metadata. A descriptor test enforces this.bun scripts/proto-generate.mjs(local pinned buf 1.50.0). Only this new proto's outputs were created; no other owner's proto or generated file changed.transport,enrollment_state/expiry/id,protocol_version,capabilities_json,capability_owner,credential_generation, key/token fingerprints). Idempotent gormigrate migration with native column-only rollback; existing/new nodes staylegacy, nothing auto-enrolled.CreateNodewhitelist updated.CodeUnimplemented), including broadnodes:*grant and no-auth admin. No secret fields in any response descriptor.knowledge/architecture/node-control-protocol.md; generated architecture index line.knowledge/decisions/adrs.mdwas not edited (orchestrator owns it).Acceptance coverage (plan §19 P0)
make proto-lint/buf lint+buf format -dclean;bun scripts/proto-generate.mjs --checkidentical; new RPCs denied by default with negative fixtures; migration apply/rollback fixture; no secrets in responses; W16 resolver, W17 streaming and W15 admission untouched.Verification
buf lint,buf format -d— clean;proto-generate.mjs --check— outputs match.go test ./internal/db ./internal/rpc ./pkg/proto/... -count=1andgo vet— pass.go test ./... -count=1,go vet ./...— pass.bun run check(0 errors/warnings),bun run test(315 pass),bun run lint(prettier + eslint) — pass.knowledge-lint -fixthen plain — pass, 62 concepts, 38/38 queries.For the orchestrator — ADR index row text (not written here)
| [0019](../../docs/adr/0019-node-control-contract.md) | Versioned typed node-control contract with redacted responses and fail-closed routing | [Node control protocol](../architecture/node-control-protocol.md), [RPC contract](../architecture/rpc-contract.md) |Limitations / blockers