From 0bee740a2421b67828fcbbd0d25489f56e48264d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 13 Jun 2026 12:08:01 +0000 Subject: [PATCH] ci: pin grpcio-tools==1.81.1 + regenerate stubs to fix proto stub drift The 'proto stub drift' CI job (and thus the README CI badge on main) was red because grpcio-tools was installed from a loose range (>=1.65,<2.0) in both requirements.txt and ci.yaml. The range floated from 1.81.0 (when the stubs were committed) up to 1.81.1, and the generated stub embeds the generator version as GRPC_GENERATED_VERSION, so regeneration produced a one-line diff (1.81.0 -> 1.81.1) that failed the byte-identical drift gate. Fix (durable): pin grpcio-tools to the EXACT version in both places and regenerate the committed stub so it matches. Future generator bumps now require a deliberate pin change. - requirements.txt: grpcio-tools>=1.65,<2.0 -> ==1.81.1 (+ rationale comment) - .github/workflows/ci.yaml: install grpcio-tools==1.81.1 (+ rationale comment) - runtime_pb2_grpc.py: GRPC_GENERATED_VERSION 1.81.0 -> 1.81.1 (regenerated) Verified locally: drift check (git diff --exit-code after regenerate) PASSES; proto stubs import OK. Co-authored-by: FluffyAIcode --- .github/workflows/ci.yaml | 11 ++++++----- .../server/proto_gen/kakeya/v1/runtime_pb2_grpc.py | 2 +- requirements.txt | 8 +++++++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 10ad2b74..a1a3254c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -267,11 +267,12 @@ jobs: - name: Install grpcio-tools run: | python -m pip install --upgrade pip - # Pin the same grpcio-tools range as requirements.txt so the - # stubs we regenerate match what production uses. If - # grpcio-tools updates and starts producing different stub - # bytes, this job catches it as a drift before merge. - pip install 'grpcio>=1.65,<2.0' 'grpcio-tools>=1.65,<2.0' + # Pin grpcio-tools to the EXACT version in requirements.txt. The + # generated stub embeds the generator version + # (GRPC_GENERATED_VERSION), so a loose range lets a patch release + # float (e.g. 1.81.0 -> 1.81.1) and fail this drift gate on a + # version string alone. Keep this in lockstep with requirements.txt. + pip install 'grpcio>=1.65,<2.0' 'grpcio-tools==1.81.1' - name: Set up Node.js (for ts-proto plugin) uses: actions/setup-node@v4 diff --git a/inference_engine/server/proto_gen/kakeya/v1/runtime_pb2_grpc.py b/inference_engine/server/proto_gen/kakeya/v1/runtime_pb2_grpc.py index ef06a464..46142215 100644 --- a/inference_engine/server/proto_gen/kakeya/v1/runtime_pb2_grpc.py +++ b/inference_engine/server/proto_gen/kakeya/v1/runtime_pb2_grpc.py @@ -5,7 +5,7 @@ from . import runtime_pb2 as kakeya_dot_v1_dot_runtime__pb2 -GRPC_GENERATED_VERSION = '1.81.0' +GRPC_GENERATED_VERSION = '1.81.1' GRPC_VERSION = grpc.__version__ _version_not_supported = False diff --git a/requirements.txt b/requirements.txt index 04cacfd2..6e007e09 100644 --- a/requirements.txt +++ b/requirements.txt @@ -51,8 +51,14 @@ prometheus-client>=0.20,<1.0 # file because (a) we want CI to be able to drift-check the # committed stubs, and (b) the install footprint is small and there # is no separate dev-requirements file in this project today. +# +# grpcio-tools is PINNED to an EXACT version: the generated stub embeds +# the generator version as `GRPC_GENERATED_VERSION = ''`, +# so a loose range lets a patch release (e.g. 1.81.0 -> 1.81.1) silently +# change the committed bytes and fail the `proto stub drift` CI gate. +# Bump this pin (and re-run scripts/regenerate_proto_stubs.sh) deliberately. grpcio>=1.65,<2.0 -grpcio-tools>=1.65,<2.0 +grpcio-tools==1.81.1 # K2.A KakeyaLattice K/V cache compression (ADR 0008 ยง11.11). # Pinned to >= 1.5 (the tested Mac M4 release; see PR-K2.A.0