Repository navigation
docs(wire): add wire-stability commitment + CI guard (#693 Phase 1) - #737
Merged
Merged
Conversation
Phase 1 of #693: docs + CI groundwork that protects the zccache protobuf wire from accidental field renumbering, renames, type changes, and removals. ## Deliverables - `docs/WIRE_STABILITY.md` — the social-contract: scope, what's frozen vs. what's allowed (additive changes), v1/v2 versioning posture, references. - `ci/check_wire_stability.py` — Python-only parser that extracts `(message_or_enum, field_number) -> (field_name, field_type)` tuples from `crates/zccache/proto/zccache_v1.proto` and `crates/zccache/src/artifact/rust_plan_manifest.proto`, then diffs against the snapshot. Stdlib-only; no protoc / buf dependency. Fails closed on syntax it does not model. - `ci/wire_stability_snapshot.txt` — baseline of the current wire (260 fields across 53 message/enum types) frozen as the canonical contract. Regenerate intentionally with `--write-snapshot`. - `.github/workflows/wire-stability.yml` — runs the guard on PRs touching the proto files, the snapshot, the guard itself, or the doc. Small Python-only job (~seconds, no Rust toolchain). ## What lands later Phases 2-4 of #693 — the `Hello`/`HelloReply` handshake, daemon self-identifying version on every connect, and the `MaintenanceRequest` surface — depend on this commitment being in writing. They will plug into the broker connection path already being built by #720. Refs #693, #735
2 tasks
This was referenced Jun 14, 2026
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.
Phase 1 of #693. Adds the social-contract document, a stdlib-only Python guard that diffs the current protobuf shape against a frozen snapshot, the baseline snapshot itself, and a small GitHub Actions job that runs the guard on every PR touching the wire.
What it protects
For every
(message_or_enum, field_number)tuple that has ever shipped:What is still freely allowed (and does not require touching the snapshot):
Files
docs/WIRE_STABILITY.md— the contract: scope, frozen vs. additive rules, v1/v2 versioning posture, references (D-Bus, Docker API negotiation, sccache anti-pattern).ci/check_wire_stability.py— Python stdlib parser + diff. Reads bothcrates/zccache/proto/zccache_v1.protoandcrates/zccache/src/artifact/rust_plan_manifest.proto. Fails closed on syntax it does not model.ci/wire_stability_snapshot.txt— baseline (260 fields across 53 message/enum types). Regenerate intentionally with--write-snapshot..github/workflows/wire-stability.yml— fires on PRs that touch the proto, the snapshot, the guard, or the doc. Pure Python; ~seconds, no Rust toolchain needed.Acceptance
uv run python ci/check_wire_stability.py—wire stability OK: 260 fields across 53 message/enum typesLookup.cache_key→CHANGED field: Lookup.1: ('cache_key', 'string') -> ('cache_key_RENAMED', 'string')Lookup.cache_key→REMOVED field: Lookup.1 (cache_key: string)actions/checkout@v6+astral-sh/setup-uv@v6, matches the project's other Python-tooling jobs).What lands later
Phases 2-4 of #693 — the
Hello/HelloReplyhandshake, daemon self-identifying its version on every connect, and theMaintenanceRequestsurface — sit on top of this commitment and slot into the broker connection work already being built for #720.Test plan
260 fields / 53 types).Refs #693, #735