refactor(proto): isolate gateway storage messages - #3169
Open
varshaprasad96 wants to merge 1 commit into
Open
Conversation
Move persistence-only protobufs into a server-private versioned package, remove them from generated public SDKs, and gate durable/public schema compatibility with legacy database fixtures. Closes NVIDIA#3053 Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
varshaprasad96
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
September 3, 2026 20:35
politerealism
approved these changes
Sep 4, 2026
politerealism
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the full diff (excluding the generated Go SDK bindings, which mechanically follow the .proto changes).
Summary: Moves seven server-internal, storage-only protobuf messages out of the public openshell.proto into a new private openshell.storage.v1 package compiled only into openshell-server, so they no longer leak into the public API descriptor set or generated SDK bindings.
What stood out positively:
- The core safety claim — that relocating a message's package is compile-time-only and requires no data migration, since protobuf wire bytes don't encode package names — is proven with real byte fixtures, not just asserted.
storage_proto.rsdecodes checked-in hex payloads produced by the old public-package types using the new private types, and separately round-trips them through an actual on-disk SQLite database via current migrations. - Schema drift is caught by fingerprint tests (SHA-256 over the storage schema, public RPC closure, durable-root closure, and their overlap), each failing with an actionable message telling the developer exactly what to review before updating the hash.
- The nine types that remain deliberately dual-purpose (
Sandbox,Provider,Workspace, etc.) are an explicit, reviewed accept documented inarchitecture/gateway.md, not an oversight — and that overlap is exactly what the fingerprint test guards going forward. storage_types_are_absent_from_public_descriptoris a good explicit negative check, not just an implicit "it compiles" assumption.
No concerns that warrant a change. Solid, well-tested refactor.
LGTM.
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.
Summary
Separates persistence-only protobuf messages from OpenShell's public API packages. The gateway now owns a private, versioned storage package while preserving existing payload bytes and stable database object routing.
Related Issue
Closes #3053
Changes
openshell.storage.v1package and compile them only for the gateway.Deviations from Plan
None — implemented as planned.
Testing
mise run pre-commitpassesmise run testpassesmise run cipassesTests added:
e2e/changed.Checklist
Documentation updated:
architecture/gateway.mdrecords storage classifications, per-root twin decisions, schema inventories, and compatibility policy.