Skip to content

tooling: make upstream delta tracking reconcile-complete - #30

Merged
Bre77 merged 1 commit into
mainfrom
fm/o4-e41-s2-delta
Aug 13, 2026
Merged

tooling: make upstream delta tracking reconcile-complete#30
Bre77 merged 1 commit into
mainfrom
fm/o4-e41-s2-delta

Conversation

@Bre77

@Bre77 Bre77 commented Aug 13, 2026

Copy link
Copy Markdown
Member

Intent

  • The weekly upstream-drift job used total coverage-finding count as its only "did anything change" signal, so when upstream re-publishes a symbol we already carry as a local extension, schema coverage stays at zero findings and the whole reconcile path silently reported "No drift" - the pin never advanced even though the upstream file bytes had changed.
    • upstream_coverage.py now 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), and non_proto_commit_only (upstream HEAD moved but the tracked proto bytes didn't).
    • --dump-delta writes this as JSON, including a reconcile_needed flag 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.
    • A field whose upstream type is Tesla's own empty-placeholder convention (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.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 PR on its own.
    • upstream-drift.yml: the reconcile-branch/PR step now gates on the delta's reconcile_needed output 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).
    • Added scripts/test_upstream_coverage.py (stdlib unittest, 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.
    • Verified end-to-end against live upstream HEAD: vehicle-command's HEAD has moved since the pin with no change under pkg/protocol/protobuf, and the new non_proto_commit_only classification correctly reports nothing to reconcile for it.
  • No changeset: tooling/CI only, doesn't touch proto/ or either published package.

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.
@Bre77 Bre77 added the fm Opened by a Firstmate crewmate label Aug 13, 2026
@Bre77
Bre77 merged commit 98ba2dc into main Aug 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fm Opened by a Firstmate crewmate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant