Skip to content

ci: add reply-coverage guard for CarServer.Response#11

Merged
Bre77 merged 1 commit into
mainfrom
fm/proto-reply-coverage-guard
Jul 22, 2026
Merged

ci: add reply-coverage guard for CarServer.Response#11
Bre77 merged 1 commit into
mainfrom
fm/proto-reply-coverage-guard

Conversation

@Bre77

@Bre77 Bre77 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Intent

  • scripts/upstream_coverage.py only enforces upstream (subset) ours; it has no visibility into server->app reply payloads, since neither Tesla's public repo nor our upstream mirror declares them. That's the blind spot that let GetChargeOnSolarFeatureResponse sit unmodelled with a green CI, until command: fill in the CarServer.Response reply-payload oneof #10 filled in the rest of the reply oneof.
    • Add scripts/check_reply_coverage.py: a CI gate that compiles car_server.proto to a descriptor set and checks a fixed, hand-maintained set of known CarServer.Response.response_msg field numbers - every one must be either present in the oneof or reserved with a reason comment. A field that's neither, or a reserved entry with no comment, fails the build with the offending field number named.
    • Wired in right after the existing upstream coverage gate step in ci.yml.
    • Fields 12, 17 and 19 were previously absent from the proto with no marker at all; now reserved with the same exclusion reasons already documented in AGENTS.md (12: namespace-publish decision pending; 17/19: app-only namespaces).
  • Verified the gate fails correctly: removing a reserved line or an oneof entry for a known field number reproduces the exact silent-omission bug this guard exists to catch.
  • buf lint, buf breaking, the existing upstream coverage gate, both language builds, and twine check are all green against this branch.
  • Adds a patch changeset (reserved-field annotations only, no wire change).

scripts/upstream_coverage.py only enforces upstream subset ours, which
is blind to server-to-app reply payloads since neither public repo
declares them - that blind spot let GetChargeOnSolarFeatureResponse sit
unmodelled with no CI failure. Add scripts/check_reply_coverage.py: it
verifies every known Response.response_msg field number is either
modelled in the oneof or reserved with a reason comment, and fails CI
otherwise. Mark fields 12, 17 and 19 reserved with their exclusion
reasons so the closed set is fully accounted for.
@Bre77
Bre77 merged commit b6ce3b2 into main Jul 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant