Skip to content

chore(scripts): add upstream-sync-check.sh for monthly sync cadence - #44

Merged
songkuan-zheng merged 1 commit into
ship/v1.83.10from
fix/upstream-sync-check-script
Jun 4, 2026
Merged

chore(scripts): add upstream-sync-check.sh for monthly sync cadence#44
songkuan-zheng merged 1 commit into
ship/v1.83.10from
fix/upstream-sync-check-script

Conversation

@songkuan-zheng

Copy link
Copy Markdown
Collaborator

Tier classification

  • A — Company-specific logic (litellm_extras/ only)
  • B — Internal infra / branding (CI, Dockerfile, e2e, internal navbar version)
  • C — Universal bug fix in litellm/ core
  • D — Universal mechanism + company opinion in litellm/ core

If Tier C or D, did you try upstream first?

  • N/A — Tier B (internal sync workflow). Will not be PR'd upstream.

Relevant issues

None — closes the "(TODO)" placeholder added in #43.

Summary

Implements scripts/upstream-sync-check.sh, the read-only diagnostic
referenced by CLAUDE.md → "Upstream sync cadence". Without this, the
monthly sync ritual has nothing to run.

Reports four things:

  1. Missed backports on the pinned minor line.patch.N tags on
    the exact pin tag plus newer vX.Y.W (and their .patch.N) on the
    same minor.
  2. Newer minor lines stabilized since our pin, with the latest
    stable tag on each (quarterly bump candidates).
  3. Commit volume on upstream/main since the pin, with a 5-commit
    recent sample.
  4. Security-flagged subjects since the pin. Regex covers
    [SECURITY], fix(auth), fix(security), CVE-N, SSRF, IDOR,
    bypass, injection, sandbox, hijack, traversal,
    disclosure, VERIA-.

Pin is auto-discovered from CLAUDE.md → "Current pinning". Future
version bumps don't need to touch this script.

Verification (run locally)

scripts/upstream-sync-check.sh --help       # prints inline usage
scripts/upstream-sync-check.sh --no-fetch   # uses existing local state
scripts/upstream-sync-check.sh              # fetches upstream first

Sample output on the current state of ship/v1.83.10:

== 1. Missed backports on v1.83.x ==
⚠ 5 tag(s): v1.83.10-stable.patch.1, v1.83.14-stable + 3 patches

== 2. Newer minor lines stabilized since pin ==
⚠ 4: v1.84.x (1.84.5), v1.85.x (1.85.4), v1.86.x (1.86.3), v1.87.x (1.87.0)

== 3. Volume on upstream/main since v1.83.10-stable ==
Commits not in v1.83.10-stable: 1991

== 4. Security-flagged commits on upstream/main since v1.83.10-stable ==
⚠ 37 security-flagged commit(s)

This output matches and extends the manual A+B+C audit done earlier
(the script surfaced extra VERIA-39 / VERIA-43 / VERIA-8 items the
manual list missed).

Pre-Submission checklist

Type

🚄 Infrastructure

Implements the script referenced by CLAUDE.md "Upstream sync cadence".
Read-only diagnostic that reports:

1. Missed backports on the pinned minor line — .patch.N tags on the
   exact pin tag plus newer vX.Y.W (and their .patch.N) on the same
   minor line.
2. Newer minor lines stabilized since our pin, with the latest stable
   tag on each.
3. Commit volume on upstream/main since the pin, with a 5-commit
   recent sample.
4. Security-flagged subjects since the pin (regex covers [SECURITY],
   fix(auth)/fix(security), CVE-N, SSRF, IDOR, bypass, injection,
   sandbox, hijack, traversal, disclosure, VERIA-).

Auto-discovers the pin from CLAUDE.md "Current pinning" so a version
bump only requires updating that block — the script picks up the new
pin with no other changes.

Verified locally:
- --help renders inline usage from the script header
- --no-fetch reports 5 backports, 4 newer minors, 1991 main commits,
  37 security-flagged subjects (matches and extends the manual A+B+C
  audit done earlier in CLAUDE-driven planning).

Removes the "(TODO)" marker on the script reference in CLAUDE.md.

Tier: B (internal infra — script for our sync workflow, not pushed
upstream).
@songkuan-zheng
songkuan-zheng merged commit a89e003 into ship/v1.83.10 Jun 4, 2026
@songkuan-zheng
songkuan-zheng deleted the fix/upstream-sync-check-script branch June 4, 2026 09:05
songkuan-zheng added a commit that referenced this pull request Jun 4, 2026
The historical description ("Upstream-sync working branch | collects
upstream commits") implied a continuous mirror that internal/* must
serve. In practice we never used it that way — internal/v1.83.10-stable
just passively accumulated 1700+ upstream commits we never consumed.

Now that scripts/upstream-sync-check.sh (added in #44) covers routine
sync visibility, internal/<pin>-stable's remaining value is as a
sandbox to test-merge upstream/main before a version bump (catches
conflicts without polluting the ship branch).

Updates:
- Branching strategy table row: mark branch as Optional, describe the
  actual bump-preview use case, drop "Upstream-sync working branch"
  framing.
- Paragraph under the table: point at scripts/upstream-sync-check.sh
  for routine awareness; explicitly note the internal/<pin>-stable
  sandbox is opt-in, not a continuous mirror.

No code or other docs touched.

Tier: B (internal infra / policy doc, not pushed upstream).
songkuan-zheng added a commit that referenced this pull request Jun 4, 2026
…ning (#55)

Ports the current state of ` CLAUDE.md`, ` scripts/upstream-sync-check.sh`,
and ` .github/pull_request_template.md` from ship/v1.83.10 to
ship/v1.87.0, and flips the Current pinning block to point at v1.87.0.

Before this PR the policy doc was orphaned: Wave 2 (#47) cherry-picked
an OLD version of CLAUDE.md from f67766f (when our policy doc was a
50-line skeleton). PRs #43, #45 added the Tier classification, Current
pinning, and Upstream sync cadence sections on ship/v1.83.10, but they
never crossed over to ship/v1.87.0. PR #44 added
` scripts/upstream-sync-check.sh` on ship/v1.83.10 only.

After this PR, ship/v1.87.0 has the full policy state, and the
sync script auto-discovers ` v1.87.0` from CLAUDE.md (verified locally
— reports 100 commits on upstream/main since the new pin, 0 missed
backports, 0 newer minor lines).

## Changes

- ` CLAUDE.md`
  - Current pinning block flipped to v1.87.0 (Upstream pin, Ship
    branch, Upstream-sync branch, Internal release tag pattern).
  - Branching strategy table examples updated to ` v1.87.0` /
    ` ship/v1.87.0` / ` internal/v1.87.0-stable`. The pin tag column
    notes the historical ` vX.Y.Z-stable` form (used pre-1.84.0) so
    older grep results still resolve.
  - Cutting an internal release example updated to
    ` v1.87.0-internal.1` (N restarts at 1 under the new pin per the
    release-tag.sh contract).
  - Upstream sync cadence example covers both the new ` vX.Y.W` and
    the legacy ` .patch.N` patch-tag conventions.
  - ` git tag -l 'v1.87.0-internal.*'` for the latest-release lookup.
- ` scripts/upstream-sync-check.sh` — copied verbatim from
  ship/v1.83.10. Re-reads the new pin without any code change.
- ` .github/pull_request_template.md` — copied verbatim from
  ship/v1.83.10 (Tier classification checkbox section).

Tier: B (internal policy / branding doc; not pushed upstream).
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