Repository navigation
ci(upstream): report how far the fork differs from upstream - #698
Merged
Merged
Conversation
Compare fork commits with upstream at the in-order tip, excluding .repos/ and pnpm-lock.yaml, and separate upstream files the fork changes or removes from fork-only files. The daily lag report charts it, promotion validation projects the candidate's change, and a new workflow posts the change on each fork pull request.
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.
Intake reports show how far the fork trails upstream, but not how much the fork differs from it. This adds
scripts/upstream/divergence-report.ts, which compares a fork commit with upstream at the in-order tip, so upstream work the fork has not taken in yet does not count. It excludes.repos/andpnpm-lock.yamland keeps upstream files the fork changes or removes separate from fork-only files, since changed upstream files are what cause intake conflicts.The report appears in three places:
mainwith the candidate SHA, next to the projected lag report.pull_request_target): a single comment on each fork pull request, updated in place, showing the change from its base. It runs the report from the base branch and reads the PR's commits only as git data.Example comment for fork #695:
Below the table, the comment lists upstream files that start to differ, files that match upstream again, and files upstream deleted that the fork keeps. Per-file changes are in a collapsed table. Run against the last intake batch (
5a4df64447..7abfa49110), the promotion comparison listedscripts/lint-restyle-ceiling.tsand its test as deleted upstream by pingdotgg#13210 and kept by the fork, which the fork feature ledger records as intentional until Fork CI stops calling them.Today fork
mainchanges 1,188 upstream files (+51,421 −12,343 lines) and removes 37, which is 27.4% of upstream's files and 5.3% of its lines. It also has 341 fork-only files (+47,373 lines).Validation
divergence-report.test.tsbuilds disposable git repositories. It checks that the counts split into changed, removed and fork-only files with the excluded paths ignored, and that comparisons list files that start to differ, return to upstream, or survive an upstream deletion.git diffoutput.pull_request_targetuses the base branch's workflow, this PR will not get a comment; the first comment appears on the next fork PR after merge.Written by an agent (Claude Code, claude-opus-5-5).