tooling: make upstream delta tracking reconcile-complete - #30
Merged
Conversation
upstream_coverage.py now classifies each tracked upstream into mechanical
outcome classes (coverage_gap, wire_conflict, upstream_overlap,
non_proto_commit_only) and emits them as a JSON delta via --dump-delta,
independent of whether schema coverage happens to be complete. This closes
the case where upstream re-publishes a symbol we already carry as a local
extension: coverage findings stay at zero, but the pin is still stale, so
the old exit-code-only signal reported "No drift" and never advanced. The
delta's reconcile_needed field now drives that decision instead.
A field whose upstream type is Tesla's empty-placeholder convention (e.g.
Void {}) no longer overrides an already-concrete local definition at that
number - a void never replaces a concrete definition.
update_upstream_pin.py only advances an upstream's commit/fetched/files when
its tracked file bytes actually changed, so HEAD movement outside the
tracked path prefix never produces a pin diff or a reconcile PR.
upstream-drift.yml is rewired accordingly: the PR-opening step now gates on
the delta's reconcile signal rather than the coverage exit code, and the
"No drift" step requires both to be clear.
Verified end-to-end against live upstream HEAD: vehicle-command's HEAD has
moved since the pin with no change under its tracked path, and the new
non_proto_commit_only classification correctly reports nothing to reconcile.
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.
Intent
upstream_coverage.pynow classifies each tracked upstream into four mechanical outcome classes:coverage_gap(upstream has something ours doesn't),wire_conflict(name/number/type mismatch, upstream wins names),upstream_overlap(a marked local extension that now also exists upstream, unchanged - a candidate for dropping the marker), andnon_proto_commit_only(upstream HEAD moved but the tracked proto bytes didn't).--dump-deltawrites this as JSON, including areconcile_neededflag per upstream and overall. That flag - not the process exit code, which still reflects schema coverage only, unchanged for both CI modes - is what decides whether a reconcile should advance.message Void {}) no longer overrides an already-concrete local field at that number; a void never replaces a concrete definition. Covered by a fixture.update_upstream_pin.pyonly advances an upstream'scommit/fetched/fileswhen its tracked file bytes actually changed, so HEAD movement outside the tracked path prefix never produces a pin diff or a PR on its own.upstream-drift.yml: the reconcile-branch/PR step now gates on the delta'sreconcile_neededoutput instead of the coverage exit code; the "No drift" step requires both the coverage and reconcile signals to be clear. The drift issue step is unchanged (still gated on genuine coverage findings).scripts/test_upstream_coverage.py(stdlibunittest, no new dependency): fixtures for a missing symbol, a new upstream file, a rename/type conflict, no movement, the upstream-overlap case above, and void-masking.vehicle-command's HEAD has moved since the pin with no change underpkg/protocol/protobuf, and the newnon_proto_commit_onlyclassification correctly reports nothing to reconcile for it.proto/or either published package.