Content Deep Dive

gRPC Mocks, Tests and Contract Checks From a .proto

Blog post from Speedscale

Post Details
Company
Date Published
Author
Matt LeRay
Word Count
1,565
Company Posts That Month
14
Language
English
Hacker News Points
-
Post removed?
No
Summary

Protobuf wire compatibility can conceal breaking schema changes, such as changing a response field from `double` to `string`, because clients may silently place incompatible bytes in unknown fields and expose only a zero value rather than an error. The post demonstrates using proxymock version 2.5.1249 or later with a unary gRPC fraud-check service to generate mocks and inbound tests from a `.proto` file, serve those mocks to clients, edit generated placeholder requests, and record real service responses as durable regression baselines. It explains that recordings can be analyzed for schema coverage across RPCs, statuses, and response fields, while preserving raw protobuf bytes even when fields are displayed ambiguously without schema information. Running `proxymock validate` against recorded traffic and an updated contract detects wire-level violations that standard protobuf unmarshalling may miss, including incompatible types, invalid enum values, unknown field numbers, and missing proto2 required fields, with CI-oriented exit codes. The workflow currently supports unary RPCs end to end, while streaming RPCs are skipped during generation and are not yet suitable for regression baselines.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
AI Coding Assistant 4 1,961 544 148 +23%
Real-time 4 4,181 1,110 242 -14%
MCP 1 11,921 1,232 235 +12%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.