Repository navigation
feat: sandbox/v1 protobuf contract + codegen (ST1, #84) - #91
Merged
Merged
Conversation
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
The generated sandbox/v1 stub imports only @bufbuild/protobuf/wire and @grpc/grpc-js (reqId uses a local longToNumber helper), so long and protobufjs were unused direct dependencies. Both remain available transitively via @grpc/proto-loader. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
Stage generated trees before diffing so a future .proto whose codegen output is untracked also fails the gate, not just edits to tracked stubs. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
Trivy (GitHub Advanced Security) flagged gen/go/go.mod on PR rossoctl#91: google.golang.org/grpc v1.68.0 CVE-2026-33186 (CRITICAL, fixed 1.79.3), plus HIGH/MEDIUM in golang.org/x/net v0.29.0 and golang.org/x/sys v0.25.0. Bump grpc 1.68.0->1.82.0, x/net 0.29.0->0.57.0, x/sys 0.25.0->0.47.0, protobuf 1.36.4->1.36.11 (all >= their fixed versions). go mod tidy raised the module go directive to 1.25.0, so the CI proto job now reads its Go version from gen/go/go.mod (go-version-file) instead of a hardcoded 1.23. Generated stubs are unchanged (codegen plugin pins untouched; no drift). Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
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.
Implements ST1 (#84), epic #89. Publishes the language-neutral
sandbox/v1Protobuf contract (spec §4) plus reproducible TypeScript + Go codegen — the shared foundation the backend and Go worker tracks generate their clients from.What's here
proto/sandbox/v1/sandbox.proto— verbatim spec §4: two services (SandboxWorker.Attachbidi,SandboxExec.Exec/Abort), 13 messages, binarybytesforstdin/data,capacity_maxonHelloonly. No registry service, noSelector, no mTLS wire fields.bufcodegen from onebuf.gen.yaml:ts-proto(grpc-js output) →@sh/k8s-sandbox/src/gen;protoc-gen-go+protoc-gen-go-grpc→ a self-containedgen/gomodule. Generated stubs are committed and drift-checked.protojob:buf lint→buf generate→ drift check (git diffover both generated trees, incl. untracked) →go build/go test. Enforces reproducible, never-hand-edited codegen.Scope
Contract + codegen only. The
SandboxTransportseam, the relay,GrpcRelayTransport, and the Go worker are separate follow-up tracks (ST2–ST5) that consume this.proto. Rationale and rejected alternatives are in ADR-0024.Verification
buf lintclean; the TS stubs typecheck and a vitest round-tripsHello/Exec/End(including a negativesint32exit_code); the Go stubsgo buildandgo testround-trip. The TS and Go stubs were verified to agree on the wire (field numbers,bytes, zigzagsint32).Assisted-By: Claude Code