{
  "id": 8493633,
  "title": "The Contract Is a .proto File",
  "url": "https://urgent.news/2026/09/19/the-contract-is-a-proto-file",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-19T16:36:38.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/anton_brilliantov/the-contract-is-a-proto-file-48g9"
  },
  "original_language": "en",
  "account": "One shared contract repository holds the schema file, which declares every service-to-service call in the system. The build then converts this schema file into typed clients and servers for both sides of the call, while also producing the HTTP role of a handle. The claim is that the contract is declared in the schema and nowhere else. Each aspect of the interface - messages, calls, field meanings, required fields, value bounds, and refusal codes - is all defined within the .proto file. This approach may initially seem like a style preference, but it becomes clear when considering the alternative of two documents that remain in sync by a person's memory. The case study demonstrates that both environment variables and metrics, which were previously described manually in code-specific files, are now kept as repository artifacts. For variables declared by the service configuration, the catalog records the defined_in file and line of the declaration. For metrics declared by the platform, they are also recorded in the catalog. The metrics snapshot includes an entry per metric, plus a dynamic row for the runtime metric registration. The check process runs the generator in check mode whenever any relevant files change, ensuring that any drift is caught as a build failure. Certain resources, like variables with runtime-generated names, are not included in the catalog. The conclusion is that a manually written description drifts, while a derived and checked description remains consistent. The HTTP handle is not considered a separate interface but rather the same contract with its role explicitly marked using an annotation, with the HTTP specification derived from the schema.",
  "summary": "One handle, one source of truth - the HTTP spec is derived, not written. 👋 Hi, I'm Anton - a software engineer working mostly in PHP/Symfony and Go, currently carving a live PHP monolith into Go services. This series is about the road from a requirement to a contract: what has to be true before anybody writes code. This part is the short one, with a single claim in it. Running notes live on my…",
  "key_points": [
    "Contract defined in .proto schema file",
    "Build converts schema to typed clients and servers",
    "Drift caught as build failure in check process"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}