Skip to content

Fix release-line Skia sync state preservation - #4660

Merged
mattleibow merged 7 commits into
mainfrom
mattleibow-fix-release-version-preservation
Aug 4, 2026
Merged

Fix release-line Skia sync state preservation#4660
mattleibow merged 7 commits into
mainfrom
mattleibow-fix-release-version-preservation

Conversation

@mattleibow

@mattleibow mattleibow commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Release-line Skia syncs begin on the workflow revision and later create product branches from a servicing line. Two independent state bugs were exposed by run 30937099860:

  1. Switching the SkiaSharp checkout to release/4.150.x replaced main's current update-skia phase documents and Python helpers with the release branch's older skill. That legacy helper rewrote servicing versions from 4.150.2 to 4.150.0 before recognizing the same-milestone bug-fix sync.
  2. Changing the parent branch changed its gitlinks without moving initialized submodule worktrees. Validation run 30942491593 consequently left docs at main's SHA while the release parent expected its release SHA.

The workflow now copies the complete triggering update-skia skill to runner-temporary storage before the agent starts and uses that staged copy after product checkout changes. Phase 04 delegates fresh branch setup to a deterministic helper that consumes the workflow-resolved parent and Skia SHAs, refuses dirty or existing branches, verifies both commits against their expected bases, creates the parent feature branch, recursively synchronizes every submodule to the selected parent gitlinks, and only then creates the mutable mono/skia feature branch.

Phase 06 now hydrates the merged Skia DEPS directly through tools/git-sync-deps before version review, so checked-out source evidence exists without first running the full native build. The version helper preserves servicing version surfaces while allowing source-backed skia_dependency provenance to be backfilled on unchanged legacy registrations, making supported release branches progressively compliant. Semantic versions still cannot change unless the matching DEPS identity changed.

The same investigation confirmed why mono/skia sync PRs must retain merge ancestry: squash-merging preserves the resulting files but discards the upstream commit relationship used by future sync detection. Generated mono/skia PR bodies now place a GitHub note at the top requiring merge-commit merging.

Related issues

N/A. This fixes deterministic automation failures observed in runs 30937099860 and 30942491593; there is no GitHub issue.

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update
  • Views & integrations
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None. This changes synchronization automation only; it does not alter public API, ABI, package versions, rendering, or product behavior.

Testing

  • test_release_line_preserves_servicing_version_surfaces proves 4.150.2 remains byte-identical across VERSIONS.txt, pipeline variables, and SK_C_INCREMENT while intended Skia provenance changes.
  • test_release_branch_realigns_all_submodules_before_branching_skia recreates differing main/release gitlinks for docs and externals/skia, starts with a stale mixed checkout, and verifies every submodule lands on the exact release base before Skia becomes mutable.
  • test_unchanged_legacy_dependency_requires_compliance_evidence proves unchanged legacy entries retain their semantic version while entering the source-evidence compliance gate.
  • The servicing regression also verifies existing non-ASCII cgmanifest text is preserved without unrelated serialization churn.
  • Complete update-skia helper suite: 26 tests passed across fork auditing, branch preparation, binding regeneration, and version reconciliation.
  • Changed Python helpers compile successfully.
  • skia-sync-push-prs.sh passes bash -n.
  • gh aw compile auto-skia-sync --validate completes with 0 errors and 0 warnings.
  • Exact-final live m150 run 30956446553 executed commit 9a93a6a4ea5 and passed every job. It hydrated dependencies before version review, source-verified and backfilled all 15 legacy skia_dependency registrations, preserved every semantic and servicing version, recursively aligned release submodules, built native Linux x64 from source, regenerated bindings, passed the full unfiltered test solution, and created draft PRs mono/SkiaSharp#4663 and mono/skia#341.
  • The generated parent PR changes only cgmanifest.json and the Skia gitlink; VERSIONS.txt, pipeline variables, and SK_C_INCREMENT remain byte-identical to release/4.150.x.
  • mono/skia PR SKCanvasView PaintSurface event never invoked in iOS physical device #341 contains the required two-parent merge (7395928969 + a81173f17b) and no tree delta.
  • No native source or generated binding files changed in this automation-fix PR; externals-download was not run.

Checklist

  • Tests added or updated
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? N/A - no public API changes
  • Native change? N/A - no native changes

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 24af5aca-a723-40ef-817c-c356a106ed0b
@mattleibow mattleibow added the copilot Created by GitHub Copilot label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4660

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4660"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4660/packages --name skiasharp-pr-4660
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4660

Stage the triggering update-skia skill outside mutable product checkouts so release-line syncs retain current phase docs and helpers. Route version and audit operations through the immutable copy, and cover servicing-version preservation plus checkout replacement.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 24af5aca-a723-40ef-817c-c356a106ed0b
@mattleibow
mattleibow marked this pull request as ready for review August 4, 2026 19:02
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #4660

this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 2 slower · 🟢 1 faster

  • 🔴 ColorParseBenchmark.Parse(Iterations: 1000) · Windows · 75.14 µs → 84.23 µs (+12%)
  • 🔴 ColorParseBenchmark.Parse(Iterations: 1000) · macOS · 64.78 µs → 70.82 µs (+9%)
  • 🟢 ColorParseBenchmark.Parse(Iterations: 1000) · Linux · 76.54 µs → 72.60 µs (-5%)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.151.0-nightly.124)

Benchmark baseline this PR Δ
ColorParseBenchmark.Parse(Iterations: 1000) 76.54 µs 72.60 µs 🟢 -5%

Windows

⏱️ Time (vs 🌙 nightly 4.151.0-nightly.124)

Benchmark baseline this PR Δ
ColorParseBenchmark.Parse(Iterations: 1000) 75.14 µs 84.23 µs 🔴 +12%

macOS

⏱️ Time (vs 🌙 nightly 4.151.0-nightly.124)

Benchmark baseline this PR Δ
ColorParseBenchmark.Parse(Iterations: 1000) 64.78 µs 70.82 µs 🔴 +9%

📈 Full interactive perf-dashboard & run details →

@mattleibow
mattleibow marked this pull request as draft August 4, 2026 19:02
@mattleibow
mattleibow marked this pull request as ready for review August 4, 2026 19:04
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

The documentation for this PR has been deployed and is available at:

🔗 View Staging Site
🔗 View Staging Docs
🔗 View Staging Gallery (Blazor)
🔗 View Staging Gallery (Uno Platform)
🔗 View Staging SkiaFiddle

This preview will be updated automatically when you push new commits to this PR.


This comment is automatically updated by the documentation staging workflow.

@mattleibow
mattleibow marked this pull request as draft August 4, 2026 20:03
Realign immutable parent submodules after the agent switches to a release base, while preserving the mutable Skia merge workspace. Make mono/skia PRs explicitly require merge commits so upstream ancestry survives.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 24af5aca-a723-40ef-817c-c356a106ed0b
@mattleibow mattleibow changed the title Fix release-line Skia version preservation Fix release-line Skia sync state preservation Aug 4, 2026
Create matched parent and mono/skia branches from workflow-resolved SHAs, recursively align every submodule, and keep the staged update-skia skill authoritative after checkout changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 24af5aca-a723-40ef-817c-c356a106ed0b
@mattleibow
mattleibow marked this pull request as ready for review August 4, 2026 20:43
@mattleibow
mattleibow marked this pull request as draft August 4, 2026 21:23
Sync merged DEPS source before Phase 06 so semantic-version evidence is available without a native build, and preserve unchanged legacy release registrations instead of backfilling dependency metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 24af5aca-a723-40ef-817c-c356a106ed0b
Require source-backed compliance metadata for unchanged legacy Skia dependencies while preserving semantic versions unless their DEPS identity changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 24af5aca-a723-40ef-817c-c356a106ed0b
Serialize cgmanifest metadata as UTF-8 without escaping existing non-ASCII text so Skia provenance updates do not introduce unrelated formatting churn.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 24af5aca-a723-40ef-817c-c356a106ed0b
@mattleibow
mattleibow marked this pull request as ready for review August 4, 2026 22:19
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📦 Artifact size report

Packages from this PR (build 1540047) vs the latest nightly baseline 4.151.0-nightly.124 (observed 2026-08-04).

Total .nupkg size: 569.4 MB → 569.3 MB (−129.0 KB, -0.0%)

Packages

⚠️ marks growth over 500.0 KB or 2%. Changes under 50.0 KB are treated as noise.

Package baseline this PR Δ Δ%
SkiaSharp.NativeAssets.WinUI 109.1 MB 108.5 MB 🟢 −601.2 KB -0.5%
SkiaSharp.NativeAssets.WebAssembly 69.6 MB 69.7 MB 🔴 +136.8 KB +0.2%
SkiaSharp.NativeAssets.Win32 85.6 MB 85.7 MB 🔴 +118.1 KB +0.1%
SkiaSharp.NativeAssets.Linux 63.1 MB 63.2 MB 🔴 +73.0 KB +0.1%
SkiaSharp.NativeAssets.Linux.NoDependencies 63.0 MB 63.0 MB 🔴 +70.3 KB +0.1%

+35 package(s) unchanged (< 50.0 KB).

Per-file changes

SkiaSharp.NativeAssets.Linux

File Size
🧬 linux-arm64 (runtimes/linux-arm64/native/libSkiaSharp.so) 12.2 MB → 12.2 MB (🔴 +18.2 KB)
🧬 linux-musl-arm64 (runtimes/linux-musl-arm64/native/libSkiaSharp.so) 12.3 MB → 12.3 MB (🔴 +18.1 KB)
🧬 linux-loongarch64 (runtimes/linux-loongarch64/native/libSkiaSharp.so) 11.8 MB → 11.8 MB (🔴 +17.2 KB)
🧬 linux-bionic-arm64 (runtimes/linux-bionic-arm64/native/libSkiaSharp.so) 12.4 MB → 12.5 MB (🔴 +17.0 KB)
🧬 linux-musl-loongarch64 (runtimes/linux-musl-loongarch64/native/libSkiaSharp.so) 12.0 MB → 12.0 MB (🔴 +17.0 KB)
🧬 linux-riscv64 (runtimes/linux-riscv64/native/libSkiaSharp.so) 11.2 MB → 11.2 MB (🔴 +17.0 KB)
🧬 linux-musl-riscv64 (runtimes/linux-musl-riscv64/native/libSkiaSharp.so) 11.3 MB → 11.3 MB (🔴 +16.8 KB)
🧬 linux-arm (runtimes/linux-arm/native/libSkiaSharp.so) 8.8 MB → 8.8 MB (🔴 +11.8 KB)
🧬 linux-musl-arm (runtimes/linux-musl-arm/native/libSkiaSharp.so) 8.8 MB → 8.8 MB (🔴 +11.6 KB)
🧬 linux-x86 (runtimes/linux-x86/native/libSkiaSharp.so) 13.3 MB → 13.3 MB (🔴 +3.5 KB)
🧬 linux-x64 (runtimes/linux-x64/native/libSkiaSharp.so) 12.3 MB → 12.3 MB (🔴 +3.4 KB)
🧬 linux-musl-x64 (runtimes/linux-musl-x64/native/libSkiaSharp.so) 12.4 MB → 12.4 MB (🔴 +3.3 KB)
🧬 linux-bionic-x64 (runtimes/linux-bionic-x64/native/libSkiaSharp.so) 12.3 MB → 12.3 MB (🔴 +2.3 KB)

SkiaSharp.NativeAssets.Linux.NoDependencies

File Size
🧬 linux-arm64 (runtimes/linux-arm64/native/libSkiaSharp.so) 12.2 MB → 12.2 MB (🔴 +18.2 KB)
🧬 linux-musl-arm64 (runtimes/linux-musl-arm64/native/libSkiaSharp.so) 12.3 MB → 12.3 MB (🔴 +18.2 KB)
🧬 linux-loongarch64 (runtimes/linux-loongarch64/native/libSkiaSharp.so) 11.8 MB → 11.8 MB (🔴 +17.1 KB)
🧬 linux-bionic-arm64 (runtimes/linux-bionic-arm64/native/libSkiaSharp.so) 12.4 MB → 12.5 MB (🔴 +17.0 KB)
🧬 linux-musl-loongarch64 (runtimes/linux-musl-loongarch64/native/libSkiaSharp.so) 12.0 MB → 12.0 MB (🔴 +17.0 KB)
🧬 linux-riscv64 (runtimes/linux-riscv64/native/libSkiaSharp.so) 11.1 MB → 11.1 MB (🔴 +17.0 KB)
🧬 linux-musl-riscv64 (runtimes/linux-musl-riscv64/native/libSkiaSharp.so) 11.3 MB → 11.3 MB (🔴 +16.8 KB)
🧬 linux-arm (runtimes/linux-arm/native/libSkiaSharp.so) 8.7 MB → 8.7 MB (🔴 +11.8 KB)
🧬 linux-musl-arm (runtimes/linux-musl-arm/native/libSkiaSharp.so) 8.8 MB → 8.8 MB (🔴 +11.6 KB)
🧬 linux-x64 (runtimes/linux-x64/native/libSkiaSharp.so) 12.3 MB → 12.3 MB (🔴 +3.5 KB)
🧬 linux-x86 (runtimes/linux-x86/native/libSkiaSharp.so) 13.3 MB → 13.3 MB (🔴 +3.5 KB)
🧬 linux-musl-x64 (runtimes/linux-musl-x64/native/libSkiaSharp.so) 12.4 MB → 12.4 MB (🔴 +3.3 KB)
🧬 linux-bionic-x64 (runtimes/linux-bionic-x64/native/libSkiaSharp.so) 12.3 MB → 12.3 MB (🔴 +2.3 KB)

SkiaSharp.NativeAssets.WebAssembly

File Size
🧬 wasm 5.0.6/st,simd · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/5.0.6/st,simd/libSkiaSharp.a) 18.2 MB → 18.2 MB (🔴 +25.4 KB)
🧬 wasm 5.0.6/st · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/5.0.6/st/libSkiaSharp.a) 17.9 MB → 18.0 MB (🔴 +25.4 KB)
🧬 wasm 5.0.6/mt,simd · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/5.0.6/mt,simd/libSkiaSharp.a) 18.2 MB → 18.2 MB (🔴 +25.2 KB)
🧬 wasm 5.0.6/mt · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/5.0.6/mt/libSkiaSharp.a) 17.9 MB → 17.9 MB (🔴 +25.2 KB)
🧬 wasm 3.1.56/st · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/3.1.56/st/libSkiaSharp.a) 17.8 MB → 17.8 MB (🔴 +22.4 KB)
🧬 wasm 3.1.56/mt · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/3.1.56/mt/libSkiaSharp.a) 17.7 MB → 17.8 MB (🔴 +22.4 KB)
🧬 wasm 3.1.56/st,simd · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/3.1.56/st,simd/libSkiaSharp.a) 18.0 MB → 18.1 MB (🔴 +21.8 KB)
🧬 wasm 3.1.56/mt,simd · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/3.1.56/mt,simd/libSkiaSharp.a) 18.0 MB → 18.0 MB (🔴 +21.7 KB)
🧬 wasm 3.1.34/st,simd · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/3.1.34/st,simd/libSkiaSharp.a) 15.9 MB → 15.9 MB (🔴 +20.7 KB)
🧬 wasm 3.1.34/st · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/3.1.34/st/libSkiaSharp.a) 15.6 MB → 15.6 MB (🔴 +20.7 KB)
🧬 wasm 3.1.34/mt · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/3.1.34/mt/libSkiaSharp.a) 15.5 MB → 15.6 MB (🔴 +20.5 KB)
🧬 wasm 3.1.34/mt,simd · libSkiaSharp.a (buildTransitive/netstandard1.0/libSkiaSharp.a/3.1.34/mt,simd/libSkiaSharp.a) 15.8 MB → 15.8 MB (🔴 +20.5 KB)

SkiaSharp.NativeAssets.Win32

File Size
runtimes/win-x64/native/libSkiaSharp.pdb 94.1 MB → 94.3 MB (🔴 +244.0 KB)
runtimes/win-x86/native/libSkiaSharp.pdb 96.8 MB → 97.1 MB (🔴 +244.0 KB)
runtimes/win-arm64/native/libSkiaSharp.pdb 91.0 MB → 91.2 MB (🔴 +220.0 KB)
🧬 win-arm64 (runtimes/win-arm64/native/libSkiaSharp.dll) 11.0 MB → 11.0 MB (🔴 +17.5 KB)
🧬 win-x64 (runtimes/win-x64/native/libSkiaSharp.dll) 12.8 MB → 12.8 MB (🔴 +4.5 KB)
🧬 win-x86 (runtimes/win-x86/native/libSkiaSharp.dll) 11.1 MB → 11.1 MB (🔴 +3.5 KB)

SkiaSharp.NativeAssets.WinUI

File Size
runtimes/win-arm64/native/libGLESv2.pdb 64.5 MB → 64.4 MB (🟢 −112.0 KB)
runtimes/win-x64/native/libGLESv2.pdb 66.6 MB → 66.5 MB (🟢 −112.0 KB)
runtimes/win-x86/native/libGLESv2.pdb 67.3 MB → 67.2 MB (🟢 −96.0 KB)

Informational only — this never blocks the PR. Native binaries are labelled by os/arch.

@mattleibow
mattleibow merged commit e45784c into main Aug 4, 2026
117 of 122 checks passed
@mattleibow
mattleibow deleted the mattleibow-fix-release-version-preservation branch August 4, 2026 23:49
@mattleibow mattleibow added this to the 4.152.0-preview.1 milestone Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot Created by GitHub Copilot

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant