Skip to content

Add guarded Skia update landing workflow - #4918

Merged
mattleibow merged 19 commits into
mainfrom
mattleibow-merge-skia-update-skill
Sep 2, 2026
Merged

mattleibow merged 19 commits into
mainfrom
mattleibow-merge-skia-update-skill

Conversation

@mattleibow

@mattleibow mattleibow commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a dedicated merge-skia-update skill for the small amount of mechanical work needed after a maintainer has reviewed and approved a paired mono/skia and mono/SkiaSharp update.

The skill first discovers reciprocal native/parent PR pairs. It presents the exact pair before requesting landing confirmation and asks the maintainer to select one when multiple pairs are open. The preparation script then determines the release action from the parent target: when targeting main, it reads the current product version from that exact base commit and derives the previous release/A.B.x line; when targeting an existing release/A.B.x, it recognizes a servicing sync and creates nothing. The maintainer remains responsible for both GitHub merges.

Two self-contained PowerShell helpers make the deterministic changes safely:

  • Prepare-SkiaReleaseBranches.ps1 automatically derives and preserves the current main product line in matching native and parent release branches. It defaults to read-only output, no-ops for servicing targets, and creates/pushes refs only with -Push.
  • Update-SkiaSharpSkiaCommit.ps1 verifies the actual two-parent native merge, confirms its tree matches the reviewed native head, updates only externals/skia and the matching cgmanifest hash, and commits/pushes only with -Push.

For the parent repin, the skill first checks whether the current checkout is already clean, on the parent PR branch, and at its remote tip. If so, it uses that checkout directly. If the maintainer does not want to check out the branch, the skill can dispatch the existing submodule-sync workflow to open a dependent PR targeting the parent branch, then verifies that PR captured the exact reviewed merge SHA before the maintainer merges it.

The skill generates the mono/skia merge-commit message, pauses for the maintainer's manual merge, performs the parent repin, generates the mono/SkiaSharp merge message, and pauses again for the manual parent merge. Because the native merge tree is proven identical to the reviewed head, it does not require another parent PR CI wait solely for the identity-only repin; final validation occurs on main.

This PR also moves the reusable update_versions.py helper and tests into the update-skia skill and restores focused publishing-test coverage for high HarfBuzzSharp milestone buckets.

Related issues

Related to #4833

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 (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None — workflow, validation tooling, and test coverage only; no public API or observable runtime behavior changes.

Testing

  • python3 .agents/skills/skill-creator/scripts/quick_validate.py .agents/skills/merge-skia-update
  • python3 .agents/skills/skill-creator/scripts/quick_validate.py .agents/skills/update-skia
  • python3 .agents/skills/update-skia/scripts/update_versions_test.py — 17 tests passed
  • python3 -m json.tool .agents/skills/merge-skia-update/evals/evals.json
  • PowerShell parser validation for both new helper scripts
  • Native-command failure propagation on PowerShell 7.4+
  • pwsh -NoLogo -NoProfile -File ./scripts/infra/publishing/tests/Test-PublishingScripts.ps1 — 71 tests passed
  • git diff --check
  • Read-only review of the final delta — no significant issues found
  • Live default-mode main dry run automatically derived release/4.152.x without mutating refs
  • Live servicing dry run recognized an existing release/A.B.x target and created no refs

No rendering behavior changed, so screenshots are not applicable.

Checklist

  • Tests added or updated (10 focused landing scenarios, update helper tests, and publishing bucket assertions)
  • 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 C API or externals/skia changes

@github-actions

github-actions Bot commented Sep 2, 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 -- 4918

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4918/packages --name skiasharp-pr-4918
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-4918

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #4918

⭐ 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) · Linux · 74.23 µs → 41.18 µs (-45%)
  • 🔴 ColorParseBenchmark.Parse(Iterations: 1000) · macOS · 76.69 µs → 91.15 µs (+19%)
  • 🔴 ColorParseBenchmark.Parse(Iterations: 1000) · Windows · 75.42 µs → 86.15 µs (+14%)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
ColorParseBenchmark.Parse(Iterations: 1000) 74.23 µs 41.18 µs 🟢 -45%

Windows

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
ColorParseBenchmark.Parse(Iterations: 1000) 75.42 µs 86.15 µs 🔴 +14%

macOS

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
ColorParseBenchmark.Parse(Iterations: 1000) 76.69 µs 91.15 µs 🔴 +19%

📈 Full interactive perf-dashboard & run details →

@github-actions

github-actions Bot commented Sep 2, 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.

Copilot AI added 19 commits September 2, 2026 22:42
Capture the two-repository landing sequence, upstream and review gates, required mono/skia merge ancestry, parent gitlink refresh, final CI/package validation, and supported-line rotation decision.

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Require durable review evidence, competing-work disposition, cross-platform and post-merge CI gates, final repin ordering, and explicit support rotation decisions.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Add pre-merge tree protection, schema-valid eval expectations, remaining safety scenarios, and high HarfBuzz bucket publishing assertions.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Preserve the previous milestone in paired release branches and avoid false blockers from unrelated DEPS work, valid nested CG evidence, or expected draft state.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Preflight paired servicing refs, recheck both base tips before landing, and cover servicing-sync and draft-state readiness behavior.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Exercise destination-ref conflicts and base-tip drift before an irreversible milestone merge.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Validate source-pair compatibility before creating refs, require completed dispositions for demonstrated competitors, and test missing nested CG evidence.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Prevent confirmed release split plans from creating immutable refs after either source base advances.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Make merge-skia-update consume an exact-head maintainer approval instead of repeating the deep readiness audit. Preserve the transactional release-branch, native-first merge, actual-SHA repin, refreshed parent approval, and post-merge CI checks.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Refocus the post-review workflow on preserving the previous release line, generating manual merge messages, and safely repinning the parent PR with dry-run-first PowerShell helpers.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Use the exact parent base version when targeting main and no-op automatically for servicing updates targeting an existing release branch.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Reflow prose toward a 160-character limit so the workflow remains compact and readable.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Document that branch preparation always starts read-only and is rerun with identical inputs plus -Push after approval.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Use a suitable current checkout when available, or dispatch the existing sync workflow and verify its dependent PR captured the exact reviewed merge SHA.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Set each script's active repository explicitly and keep Invoke-Native focused on command execution and error handling.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Require PowerShell 7.4, remove the custom native-command wrapper, and use Out-Null for intentionally discarded command output.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
Discover and present candidate update pairs first, require selection when multiple pairs exist, and verify supplied PRs reciprocally link before asking for landing confirmation.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: fa719937-8d24-4ece-a482-59fe2d48639f
@mattleibow
mattleibow force-pushed the mattleibow-merge-skia-update-skill branch from f41e1bb to 4255633 Compare September 2, 2026 20:52
@mattleibow
mattleibow merged commit bb4ab85 into main Sep 2, 2026
82 of 87 checks passed
@mattleibow
mattleibow deleted the mattleibow-merge-skia-update-skill branch September 2, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants