Skip to content

fix(ci): check protobuf compatibility against the pull request's merge base - #1781

Merged
HuiJun merged 2 commits into
developfrom
chore/proto-breaking-merge-base
Oct 30, 2026
Merged

HuiJun merged 2 commits into
developfrom
chore/proto-breaking-merge-base

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What and why

The pull-request workflow's Check the protobuf schema for breaking changes step ran make proto-breaking against origin/<base branch> — the base branch's tip at run time. A field another pull request adds to api/proto/sysml.proto after a branch was cut therefore read as a deleted field on that branch, and its Go static and integrity checks (and the Build and test aggregate over it) went red until the branch merged the base, with nothing wrong on either side. #1561 hit this when #1558 added inherited to RenderNode/RenderPort.

The baseline is now the schema the pull request started from: git merge-base origin/<base> <pull_request.head.sha> for a pull request, and the merge group's own base_sha for a queue commit (the merge-group payload already names it). The shallow checkout gets the history for merge-base from a blob-free fetch (--filter=tree:0 --unshallow; the archive the Makefile target takes lazily fetches the one subtree it needs), so the job fetches no more content than before. docs/project/releasing.md says the same where it describes the release PR's comparison; the Makefile target and its origin/develop default are unchanged.

Every read of the pull-request payload keeps its merge_group branch, as TestPRWorkflowPullRequestReadsHaveMergeGroupBranch requires; the new TestPRWorkflowProtoBaselineIsTheMergeBase pins the baseline to the merge base / base_sha so the step cannot drift back to the branch tip.

How it was verified

  • go test ./tests/hygiene -run 'TestPRWorkflow|TestRaceShard|TestMergeGroup' ok (new test included); go vet, gofmt -l clean; python3 scripts/changelog.py check ok.
  • actionlint .github/workflows/pr.yml and shellcheck -s bash on the step body: no findings on the changed step (the two actionlint style notes in the file are pre-existing, on other steps).
  • The step's shell run by hand in a fresh --depth 1 clone of develop against GitHub with BASE_REF=refs/heads/develop HEAD_SHA=<a pull request head>: the blob-free fetch takes about 2 s and 36 MB, merge-base resolves, git archive of <baseline>:api/proto works on the partial history, make proto-breaking reports ✓ No breaking schema changes.
  • This pull request's own run of the step is the first in CI.

Checklist

  • make test and make lint pass locally (the affected package, tests/hygiene; no Go production code changed)
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build) — none moved
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/4b77801c1b7a447cb2c91401b67b47d7
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/4b77801c1b7a447cb2c91401b67b47d7?variant=devin
Requested by: @HuiJun

…e base

The breaking-change step diffed api/proto against the base branch's tip, so a field another pull request added after a branch was cut failed that branch as a deleted field until it merged the base. The baseline is now the merge base with the base branch (a merge group's base_sha), reached by a blob-free history fetch; a hygiene test pins it.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 30, 2026 19:42
devin-ai-integration[bot]

This comment was marked as resolved.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@HuiJun
HuiJun merged commit f47768a into develop Oct 30, 2026
30 checks passed
@HuiJun
HuiJun deleted the chore/proto-breaking-merge-base branch October 30, 2026 22:00
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