Skip to content

Conversation

@w1am
Copy link
Collaborator

@w1am w1am commented Dec 18, 2025

User description

  • Extend client module to support schema registry api
  • Run integration tests against KurrentDB 25.1

PR Type

Enhancement, Tests


Description

  • Implement comprehensive Schema Registry API client support with 12 core operations for schema and version management

  • Add schema compatibility checking functionality with detailed error reporting

  • Generate complete gRPC service definitions and protocol buffer message types for schema registry operations

  • Implement bidirectional enum mappers and utility functions for gRPC to TypeScript domain type conversions

  • Add 12 integration test suites covering all schema registry operations (create, read, update, delete, list, lookup, register versions, check compatibility)

  • Support schema filtering by name prefix, tags, and version IDs with optional schema definition inclusion

  • Enable schema group management with auto-registration, validation, and compatibility mode settings

  • Support multiple schema data formats (JSON, Protobuf, Avro, Bytes) and 8 compatibility modes

  • Export schema registry module to public client API


Diagram Walkthrough

flowchart LR
  proto["Proto Definitions<br/>service, schemas, groups,<br/>validation, shared, errors"]
  generated["Generated Code<br/>gRPC client, message types,<br/>serialization/deserialization"]
  mappers["Mapper Utilities<br/>enum conversion, type mapping,<br/>gRPC to domain conversion"]
  impl["Client Methods<br/>12 schema operations,<br/>compatibility checking"]
  tests["Integration Tests<br/>12 test suites covering<br/>all operations"]
  api["Public API<br/>schemaRegistry module<br/>export"]
  
  proto --> generated
  generated --> mappers
  mappers --> impl
  impl --> api
  impl --> tests
Loading

File Walkthrough

Relevant files
Dependencies
17 files
validation_pb.js
Generated protobuf validation message definitions               

packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.js

  • Generated protobuf message classes for schema validation including
    SchemaCompatibilityError, SchemaCompatibilityResult,
    CheckSchemaCompatibilityRequest, and CheckSchemaCompatibilityResponse
  • Implements serialization/deserialization methods for binary protobuf
    wire format
  • Defines enum SchemaCompatibilityErrorKind with 8 error types for
    schema compatibility validation
  • Provides getter/setter methods for all message fields with proper type
    conversions
+1789/-0
service_grpc_pb.js
Generated gRPC schema registry service client                       

packages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.js

  • Generated gRPC service client for SchemaRegistryService with 24 RPC
    methods
  • Implements serialization/deserialization functions for all
    request/response message types
  • Defines service methods for schema groups, schemas, versions, and
    compatibility checking
  • Exports SchemaRegistryServiceClient constructor for client
    instantiation
+654/-0 
shared_pb.js
Generated shared protobuf types and enums                               

packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.js

  • Generated protobuf definitions for shared types: ErrorDetails,
    SchemaDataFormat, and CompatibilityMode enums
  • Implements serialization/deserialization for ErrorDetails message with
    code and message fields
  • Defines 5 schema data formats (JSON, Protobuf, Avro, Bytes,
    Unspecified) and 8 compatibility modes
+233/-0 
service_pb.js
Generated service protocol aggregation file                           

packages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.js

  • Generated minimal service definition file that imports and extends
    proto objects from groups, schemas, and validation modules
  • Serves as aggregation point for all registry service protocol
    definitions
+29/-0   
errors_pb.js
Generated registry error definitions                                         

packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.js

  • Generated protobuf error definitions for registry operations
  • Defines RegistryError enum with REGISTRY_ERROR_UNSPECIFIED value
  • Imports RPC protocol definitions as dependency
+34/-0   
schemas_grpc_pb.js
Generated schemas gRPC placeholder                                             

packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_grpc_pb.js

  • Generated placeholder file indicating no gRPC services defined in
    schemas proto
+1/-0     
validation_grpc_pb.js
Generated validation gRPC placeholder                                       

packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_grpc_pb.js

  • Generated placeholder file indicating no gRPC services defined in
    validation proto
+1/-0     
errors_grpc_pb.js
Generated errors gRPC placeholder                                               

packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_grpc_pb.js

  • Generated placeholder file indicating no gRPC services defined in
    errors proto
+1/-0     
groups_grpc_pb.js
Generated groups gRPC placeholder                                               

packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_grpc_pb.js

  • Generated placeholder file indicating no gRPC services defined in
    groups proto
+1/-0     
shared_grpc_pb.js
Generated shared gRPC placeholder                                               

packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_grpc_pb.js

  • Generated placeholder file indicating no gRPC services defined in
    shared proto
+1/-0     
service_grpc_pb.d.ts
Schema Registry gRPC Service Type Definitions                       

packages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.d.ts

  • Generated gRPC service definitions for Schema Registry API with 19 RPC
    methods
  • Defines interfaces for service implementation, server handlers, and
    client stubs
  • Supports schema group operations (create, update, delete, get, list)
  • Supports schema operations (create, update, delete, get, list, lookup,
    register versions)
  • Includes schema validation and compatibility checking methods
+350/-0 
schemas_pb.d.ts
Schema Registry Protocol Buffer Message Types                       

packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_pb.d.ts

  • Generated Protocol Buffer type definitions for schema management
    messages
  • Defines request/response types for schema CRUD operations and version
    management
  • Includes SchemaDetails, SchemaVersion, RegisteredSchema message types
  • Supports bulk schema registration with
    BulkRegisterSchemasRequest/Response
  • Provides filtering and metadata capabilities (tags, timestamps, data
    formats)
+822/-0 
groups_pb.d.ts
Schema Registry Group Management Protocol Buffers               

packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_pb.d.ts

  • Generated Protocol Buffer definitions for schema group management
  • Defines SchemaGroup and SchemaGroupDetails message types with
    configuration
  • Includes settings for auto-registration, validation, compatibility,
    and data format enforcement
  • Supports stream filtering with regex and category-based filters
  • Provides CRUD operations for schema groups with timestamps and
    metadata
+474/-0 
validation_pb.d.ts
Schema Registry Validation and Compatibility Protocol Buffers

packages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.d.ts

  • Generated Protocol Buffer types for schema validation and
    compatibility checking
  • Defines CheckSchemaCompatibilityRequest/Response with success/failure
    variants
  • Includes SchemaCompatibilityError with detailed error information
    (kind, property path, type changes)
  • Supports compatibility checking against schema names or version IDs
  • Provides comprehensive error reporting for schema validation failures
+247/-0 
shared_pb.d.ts
Generated Shared Protocol Buffer Types                                     

packages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.d.ts

  • Generated TypeScript type definitions for shared protobuf messages
  • Includes ErrorDetails class and schema data format/compatibility mode
    enums
  • Provides serialization/deserialization methods
+49/-0   
service_pb.d.ts
Generated Service Protocol Buffer Types                                   

packages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.d.ts

  • Generated TypeScript type definitions for gRPC service
  • Imports related protocol buffer definitions for groups, schemas, and
    validation
+10/-0   
errors_pb.d.ts
Generated Error Protocol Buffer Types                                       

packages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.d.ts

  • Generated TypeScript type definitions for registry error codes
  • Includes RegistryError enum with unspecified default value
+12/-0   
Enhancement
24 files
mappers.ts
Schema registry gRPC to domain type mappers                           

packages/db-client/src/schemaRegistry/utils/mappers.ts

  • Implements bidirectional enum mappers for SchemaDataFormat,
    CompatibilityMode, and SchemaCompatibilityErrorKind
  • Provides message mapping functions to convert gRPC protobuf objects to
    TypeScript domain types
  • Includes utility functions for timestamp conversion, map
    serialization, and schema definition byte handling
  • Exports helper functions to create gRPC schema details from domain
    objects
+288/-0 
index.ts
Schema registry utilities barrel export                                   

packages/db-client/src/schemaRegistry/utils/index.ts

  • Exports all mapper utilities from the mappers module
+1/-0     
index.ts
Export schema registry module                                                       

packages/db-client/src/index.ts

  • Adds export of schemaRegistry module to public API
+1/-0     
types.ts
Schema Registry Type Definitions and Interfaces                   

packages/db-client/src/schemaRegistry/types.ts

  • Defines comprehensive TypeScript types and interfaces for schema
    registry operations
  • Includes schema data formats (json, protobuf, avro, bytes) and
    compatibility modes
  • Exports request/response options and result types for all schema
    registry API operations
  • Defines error types for schema version and compatibility validation
+386/-0 
checkSchemaCompatibility.ts
Schema Compatibility Checking Implementation                         

packages/db-client/src/schemaRegistry/checkSchemaCompatibility.ts

  • Implements checkSchemaCompatibility method on the Client prototype
  • Validates schema definitions against existing schemas by name or
    version ID
  • Returns compatibility result with either success (compatible) or
    failure (errors list)
  • Handles gRPC communication with schema registry service
+105/-0 
createSchema.ts
Schema Creation Implementation                                                     

packages/db-client/src/schemaRegistry/createSchema.ts

  • Implements createSchema method to register new schemas in the registry
  • Supports optional initial schema definition and metadata (description,
    tags)
  • Returns schema version ID and version number when definition is
    provided
  • Handles gRPC request/response mapping
+79/-0   
updateSchema.ts
Schema Metadata Update Implementation                                       

packages/db-client/src/schemaRegistry/updateSchema.ts

  • Implements updateSchema method to modify schema metadata
  • Supports updating description and tags with field mask for selective
    updates
  • Uses gRPC FieldMask to specify which fields to update
  • Handles schema metadata changes without affecting versions
+86/-0   
deleteSchema.ts
Schema Deletion Implementation                                                     

packages/db-client/src/schemaRegistry/deleteSchema.ts

  • Implements deleteSchema method to remove schemas and all versions
  • Sends delete request to schema registry service via gRPC
  • Returns void on successful deletion
+48/-0   
getSchema.ts
Schema Metadata Retrieval Implementation                                 

packages/db-client/src/schemaRegistry/getSchema.ts

  • Implements getSchema method to retrieve schema metadata by name
  • Returns schema details including data format, compatibility mode, and
    timestamps
  • Maps gRPC response to TypeScript Schema interface
+57/-0   
listSchemas.ts
Schema Listing with Filtering Implementation                         

packages/db-client/src/schemaRegistry/listSchemas.ts

  • Implements listSchemas method with optional filtering by name prefix
    and tags
  • Returns array of schema metadata matching filter criteria
  • Supports tag-based filtering for schema discovery
+64/-0   
lookupSchemaName.ts
Schema Name Lookup by Version ID                                                 

packages/db-client/src/schemaRegistry/lookupSchemaName.ts

  • Implements lookupSchemaName method to find schema name by version ID
  • Enables reverse lookup from schema version ID to schema name
  • Returns schema name string
+53/-0   
registerSchemaVersion.ts
Schema Version Registration Implementation                             

packages/db-client/src/schemaRegistry/registerSchemaVersion.ts

  • Implements registerSchemaVersion method to add new versions to
    existing schemas
  • Accepts schema definition as string or Uint8Array
  • Returns schema version ID and incremented version number
+69/-0   
deleteSchemaVersions.ts
Schema Version Deletion Implementation                                     

packages/db-client/src/schemaRegistry/deleteSchemaVersions.ts

  • Implements deleteSchemaVersions method to remove specific schema
    versions
  • Accepts array of version numbers to delete
  • Returns error list for any failed deletions
+66/-0   
getSchemaVersion.ts
Schema Version Retrieval Implementation                                   

packages/db-client/src/schemaRegistry/getSchemaVersion.ts

  • Implements getSchemaVersion method to retrieve schema version by name
    and optional version number
  • Returns latest version when version number is not specified
  • Maps gRPC response to SchemaVersion interface
+67/-0   
getSchemaVersionById.ts
Schema Version Retrieval by ID Implementation                       

packages/db-client/src/schemaRegistry/getSchemaVersionById.ts

  • Implements getSchemaVersionById method to retrieve schema version by
    unique ID
  • Enables direct access to specific schema versions via version ID
  • Returns complete schema version details
+60/-0   
listSchemaVersions.ts
Schema Versions Listing Implementation                                     

packages/db-client/src/schemaRegistry/listSchemaVersions.ts

  • Implements listSchemaVersions method to retrieve all versions of a
    schema
  • Supports optional inclusion of schema definitions in response
  • Returns array of SchemaVersion objects
+60/-0   
listRegisteredSchemas.ts
Registered Schemas Listing Implementation                               

packages/db-client/src/schemaRegistry/listRegisteredSchemas.ts

  • Implements listRegisteredSchemas method to list schemas with latest
    version info
  • Supports filtering by version ID, name prefix, and tags
  • Optionally includes schema definitions in response
+80/-0   
index.ts
Schema Registry Module Exports                                                     

packages/db-client/src/schemaRegistry/index.ts

  • Exports all schema registry module implementations and types
  • Organizes exports into logical groups: schema management, version
    management, and compatibility
  • Provides single entry point for schema registry API
+21/-0   
shared.proto
Shared Protocol Buffer Definitions                                             

packages/db-client/protos/kurrentdb/protocols/v2/registry/shared.proto

  • Defines shared protobuf enums for schema data formats and
    compatibility modes
  • Includes ErrorDetails message for error information
  • Supports json, protobuf, avro, and bytes data formats
  • Defines 7 compatibility modes from backward to none
+61/-0   
schemas.proto
Schema Management Protocol Buffer Definitions                       

packages/db-client/protos/kurrentdb/protocols/v2/registry/schemas.proto

  • Defines protobuf messages for schema CRUD operations
  • Includes messages for creating, updating, deleting, and listing
    schemas
  • Defines schema version management messages and registered schema
    representation
  • Supports bulk registration and field masking for updates
+191/-0 
validation.proto
Schema Validation Protocol Buffer Definitions                       

packages/db-client/protos/kurrentdb/protocols/v2/registry/validation.proto

  • Defines protobuf messages for schema compatibility checking
  • Includes SchemaCompatibilityError with detailed error information
  • Defines compatibility error kinds enum with 8 error types
  • Supports success/failure response patterns
+76/-0   
groups.proto
Schema Group Management Protocol Buffer Definitions           

packages/db-client/protos/kurrentdb/protocols/v2/registry/groups.proto

  • Defines protobuf messages for schema group management
  • Includes settings for auto-registration, validation, compatibility,
    and data format
  • Supports stream filtering and group CRUD operations
  • Enables hierarchical schema organization
+125/-0 
service.proto
Schema Registry gRPC Service Definition                                   

packages/db-client/protos/kurrentdb/protocols/v2/registry/service.proto

  • Defines gRPC service interface for schema registry operations
  • Includes 15 RPC methods for schema and version management
  • Organizes operations into schema groups, schema management, and
    compatibility sections
  • Supports bulk registration and schema compatibility checking
+61/-0   
errors.proto
Schema Registry Error Codes Definition                                     

packages/db-client/protos/kurrentdb/protocols/v2/registry/errors.proto

  • Defines error codes specific to schema registry API
  • Currently contains placeholder for future error code definitions
  • Provides foundation for standardized error handling
+30/-0   
Tests
13 files
listRegisteredSchemas.test.ts
Integration Tests for List Registered Schemas                       

packages/test/src/schemaRegistry/listRegisteredSchemas.test.ts

  • Integration test suite for listRegisteredSchemas client method
  • Tests filtering by version ID, name prefix, and schema tags
  • Validates optional schema definition inclusion in responses
  • Verifies correct metadata (version number, data format, compatibility
    mode, timestamps)
  • Includes edge case testing for non-matching filters
+153/-0 
createSchema.test.ts
Schema Creation Integration Tests                                               

packages/test/src/schemaRegistry/createSchema.test.ts

  • Tests schema creation with metadata only and with initial definitions
  • Validates creation with different data formats and tags
  • Tests error handling for duplicate schema names
+114/-0 
updateSchema.test.ts
Schema Update Integration Tests                                                   

packages/test/src/schemaRegistry/updateSchema.test.ts

  • Tests updating schema description and tags independently
  • Validates combined updates of both description and tags
  • Tests error handling for non-existent schemas
+106/-0 
deleteSchema.test.ts
Schema Deletion Integration Tests                                               

packages/test/src/schemaRegistry/deleteSchema.test.ts

  • Tests deletion of schemas with and without versions
  • Validates that deleted schemas cannot be retrieved
  • Tests error handling for non-existent schemas
+79/-0   
getSchema.test.ts
Schema Retrieval Integration Tests                                             

packages/test/src/schemaRegistry/getSchema.test.ts

  • Tests retrieval of schema metadata with all properties
  • Validates timestamp population and latest version tracking
  • Tests error handling for non-existent schemas
+93/-0   
listSchemas.test.ts
Schema Listing Integration Tests                                                 

packages/test/src/schemaRegistry/listSchemas.test.ts

  • Tests listing all schemas and filtering by name prefix
  • Validates tag-based filtering and combined prefix/tag filters
  • Tests empty result handling for non-matching filters
+98/-0   
lookupSchemaName.test.ts
Schema Name Lookup Integration Tests                                         

packages/test/src/schemaRegistry/lookupSchemaName.test.ts

  • Tests schema name lookup by version ID from created and registered
    versions
  • Validates reverse lookup functionality
  • Tests error handling for non-existent version IDs
+77/-0   
registerSchemaVersion.test.ts
Schema Version Registration Integration Tests                       

packages/test/src/schemaRegistry/registerSchemaVersion.test.ts

  • Tests registering new versions for existing schemas
  • Validates version number incrementation
  • Tests registration with Uint8Array definitions
+105/-0 
deleteSchemaVersions.test.ts
Schema Version Deletion Integration Tests                               

packages/test/src/schemaRegistry/deleteSchemaVersions.test.ts

  • Tests deletion of single and multiple schema versions
  • Validates error handling for non-existent versions
  • Tests partial failure scenarios with mixed valid/invalid versions
+142/-0 
getSchemaVersion.test.ts
Schema Version Retrieval Integration Tests                             

packages/test/src/schemaRegistry/getSchemaVersion.test.ts

  • Tests retrieval of latest and specific schema versions
  • Validates schema definition inclusion and timestamp population
  • Tests error handling for non-existent versions and schemas
+151/-0 
getSchemaVersionById.test.ts
Schema Version Retrieval by ID Integration Tests                 

packages/test/src/schemaRegistry/getSchemaVersionById.test.ts

  • Tests retrieval of schema versions by unique ID
  • Validates schema definition content and metadata
  • Tests retrieval of different versions by their IDs
+109/-0 
listSchemaVersions.test.ts
Schema Versions Listing Integration Tests                               

packages/test/src/schemaRegistry/listSchemaVersions.test.ts

  • Tests listing all versions of a schema
  • Validates optional schema definition inclusion
  • Tests version metadata correctness
+126/-0 
checkSchemaCompatibility.test.ts
Schema Compatibility Checking Integration Tests                   

packages/test/src/schemaRegistry/checkSchemaCompatibility.test.ts

  • Tests compatibility checking by schema name and version ID
  • Validates compatible and incompatible definitions with different
    compatibility modes
  • Tests error details and error handling for non-existent
    schemas/versions
+249/-0 
Additional files
2 files
groups_pb.js +3593/-0
schemas_pb.js +6463/-0

@qodo-code-review
Copy link

qodo-code-review bot commented Dec 18, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Dynamic code evaluation

Description: Generated protobuf files use Function('return this')() to obtain the global object (also
present in other generated files like .../registry/service_pb.js), which relies on dynamic
code evaluation and may violate CSP policies or enable sandbox escapes in constrained
runtimes if this bundle is executed in such environments.
validation_pb.js [16-22]

Referred Code
var global = (function() {
  if (this) { return this; }
  if (typeof window !== 'undefined') { return window; }
  if (typeof global !== 'undefined') { return global; }
  if (typeof self !== 'undefined') { return self; }
  return Function('return this')();
}.call(null));
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
Logging not visible: The provided diff mostly contains generated gRPC/protobuf bindings and export wiring, and
does not show whether schema registry operations add audit logging with user ID,
timestamp, action, and outcome.

Referred Code
export * from "./persistentSubscription";
export * from "./projections";
export * from "./schemaRegistry";
export * from "./streams";

export {

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Error handling unseen: While generated serializers throw on incorrect argument types, the diff does not include
the new client method implementations where network/validation edge cases and actionable
error contexts would be handled.

Referred Code
function serialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasRequest(arg) {
  if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest)) {
    throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasRequest(buffer_arg) {
  return kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasResponse(arg) {
  if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse)) {
    throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasResponse(buffer_arg) {
  return kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse.deserializeBinary(new Uint8Array(buffer_arg));
}


 ... (clipped 22 lines)

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status:
Error exposure unclear: The generated code throws errors containing internal type names, but the diff does not
show whether such errors can propagate to end users versus being wrapped into safer
user-facing messages.

Referred Code
function serialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasRequest(arg) {
  if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest)) {
    throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.BulkRegisterSchemasRequest');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasRequest(buffer_arg) {
  return kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasRequest.deserializeBinary(new Uint8Array(buffer_arg));
}

function serialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasResponse(arg) {
  if (!(arg instanceof kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse)) {
    throw new Error('Expected argument of type kurrentdb.protocol.registry.v2.BulkRegisterSchemasResponse');
  }
  return Buffer.from(arg.serializeBinary());
}

function deserialize_kurrentdb_protocol_registry_v2_BulkRegisterSchemasResponse(buffer_arg) {
  return kurrentdb_protocols_v2_registry_schemas_pb.BulkRegisterSchemasResponse.deserializeBinary(new Uint8Array(buffer_arg));
}


 ... (clipped 16 lines)

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status:
Logging not shown: The diff does not show any logging additions (structured or otherwise) in the schema
registry client operations, so it cannot be validated that logs avoid including schema
definitions or other sensitive payloads.

Referred Code
// source: kurrentdb/protocols/v2/registry/validation.proto
/**
 * @fileoverview
 * @enhanceable
 * @suppress {missingRequire} reports error on implicit type usages.
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
  if (this) { return this; }
  if (typeof window !== 'undefined') { return window; }
  if (typeof global !== 'undefined') { return global; }
  if (typeof self !== 'undefined') { return self; }
  return Function('return this')();


 ... (clipped 14 lines)

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Validation not visible: The diff only shows exports for schema registry utilities and generated protocol code, not
the schema registry client methods where external input validation, auth/metadata
handling, and sensitive data handling would be implemented.

Referred Code
export * from "./mappers";

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link

qodo-code-review bot commented Dec 18, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Avoid committing auto-generated code

Instead of committing auto-generated Protobuf/gRPC files, commit the source
.proto files and generate the client code as part of the build process. This
improves reviewability, reduces repository size, and simplifies merges.

Examples:

packages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_pb.js [1-6463]
// source: kurrentdb/protocols/v2/registry/schemas.proto
/**
 * @fileoverview
 * @enhanceable
 * @suppress {missingRequire} reports error on implicit type usages.
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!

 ... (clipped 6453 lines)
packages/db-client/generated/kurrentdb/protocols/v2/registry/groups_pb.js [1-3593]
// source: kurrentdb/protocols/v2/registry/groups.proto
/**
 * @fileoverview
 * @enhanceable
 * @suppress {missingRequire} reports error on implicit type usages.
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!

 ... (clipped 3583 lines)

Solution Walkthrough:

Before:

# .gitignore
# (does not include the 'generated' directory)

# Project Structure
/packages/db-client/
  /generated/
    /kurrentdb/protocols/v2/registry/
      - schemas_pb.js       # Committed to repo
      - groups_pb.js        # Committed to repo
      - service_grpc_pb.js  # Committed to repo
      - ... (many other generated files)
  /src/
    # code uses files from /generated

After:

# .gitignore
/packages/db-client/generated/

# package.json (or similar build config)
"scripts": {
  "build": "generate-proto-clients && other-build-steps",
  "generate-proto-clients": "protoc --proto_path=... --js_out=... --grpc_out=..."
}

# Project Structure
/packages/db-client/
  /protos/
    - schemas.proto       # Source file, committed to repo
    - groups.proto        # Source file, committed to repo
    - service.proto       # Source file, committed to repo
  /generated/             # Excluded from repo via .gitignore
    ...
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical maintainability issue by advising against committing large, auto-generated files, which is a widely accepted best practice.

High
  • Update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants