Skip to content

ci: Regenerate font fallback maps on a schedule - #24941

Merged
MartinZikmund merged 3 commits into
masterfrom
dev/mazi/fontfallback-pin
Oct 2, 2026
Merged

MartinZikmund merged 3 commits into
masterfrom
dev/mazi/fontfallback-pin

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes #24940

PR Type:

🏗️ Build or CI related changes

What changed? 🚀

The Setup - Font Fallback Maps Validation stage regenerated FontFallback.Maps.cs from notofonts main on every PR and failed on any difference. Since notofonts changes on its own schedule, one upstream commit (2026-10-02, 01:48 UTC: Noto Sans Mongolian coverage) failed every open PR at once. None of those PRs had touched the generator.

The check now follows the same "dependency update" pattern as docs-updater.yml:

  • Removed the per-PR ADO stage (build/ci/setup/.azure-devops-setup-font-fallback.yml and its include in .azure-devops-stages.yml).
  • Added .github/workflows/font-fallback-update.yml. Every Monday (or on demand via workflow_dispatch), it regenerates the maps against master. When the coverage changed, it opens or updates a PR on chore/font-fallback-update, labelled dependencies. There is no auto-merge, so someone reviews the coverage diff before it lands.
  • Regenerated FontFallback.Maps.cs, which picks up today's Mongolian coverage change: 7 ranges.

A stale map is harmless at runtime. The fallback lists are ordered, and Noto Sans or CJK cover these codepoints first. So skipping a week of upstream drift costs nothing.

Open PRs that failed this stage need a fresh build once this merges (/azp run). Re-running only the failed job reuses the original merge commit, which still has the old stage.

Possible follow-up, not in this PR: the generated runtime download URLs also point at notofonts main. Pinning them to a commit SHA would make fallback downloads in shipped WebAssembly apps immune to upstream renames.

PR Checklist ✅

Validation: I ran the generator locally (dotnet run --project src/FontFallbackPreprocessor -c Release -- --summary-only -o …). It produced exactly the 7-range diff that the failing CI job reported (build 236881). The new workflow hasn't run yet; trigger it with workflow_dispatch after merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G7PsEU6gSpLZXrYuK8WWpt

MartinZikmund and others added 2 commits October 2, 2026 12:20
Replace the per-PR validation, which failed every PR whenever notofonts
changed upstream, with a weekly workflow that opens an update PR.

Refs #24940

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01G7PsEU6gSpLZXrYuK8WWpt
Copilot AI balanced review requested due to automatic review settings October 2, 2026 10:20
@github-actions github-actions Bot added the area/build Categorizes an issue or PR as relevant to build infrastructure label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 26s —— View job


Claude's review of PR #24941

Todo list

  • Gather context (diff, changed files, AGENTS.md rules)
  • Review new GitHub Actions workflow (font-fallback-update.yml)
  • Review removed ADO stage files
  • Review regenerated FontFallback.Maps.cs
  • Post inline comments for findings
  • Summarize review verdict

Verdict: ✅ Ship

No inline findings — 0 blocking, 0 minor.

Summary

This is a well-scoped CI change: it swaps a per-PR blocking validation stage for a scheduled regeneration workflow, mirroring the existing docs-updater.yml "dependency update" pattern almost exactly (same peter-evans/create-pull-request action pinned by SHA, same permissions/concurrency shape, same add-paths-scoped commit). I checked:

  • Workflow correctness: font-fallback-update.yml runs on the same regeneration command the deleted ADO stage used, writes directly to the target file, and lets create-pull-request detect the diff (no-op when nothing changed) — consistent with how docs-updater.yml already behaves in this repo.
  • Clean removal: the ADO stage deletion and its include in .azure-devops-stages.yml leave no dangling references (checked build/ and repo-wide for setup-font-fallback/FontFallback mentions).
  • Regenerated data file: the FontFallback.Maps.cs diff is consistent with the stated 7-range Mongolian coverage change (additions/removals/merges of adjacent ranges) — looks like pure generator output, no hand-edits.
  • Commits: both follow Conventional Commits (ci: …, chore(fonts): …).

Cross-cutting (non-blocking) observation: removing the per-PR stage means there's no longer a CI gate catching drift if a future PR changes FontFallbackPreprocessor's generation logic itself without regenerating FontFallback.Maps.cs — that class of drift would only surface on the next Monday run (or sooner via manual workflow_dispatch), not at PR time. The PR body's rationale (stale maps are runtime-harmless) covers upstream notofonts drift well, but doesn't fully cover self-inflicted generator-logic drift. Worth confirming this tradeoff is acceptable, but not a reason to block this change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The automation lacks required permissions and workflow-triggering credentials, and removes relevant-change validation entirely.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Moves font-fallback map updates from per-PR validation to scheduled automation and incorporates current Noto Mongolian coverage.

Changes:

  • Removes Azure DevOps fallback-map validation.
  • Adds a weekly GitHub Actions updater.
  • Regenerates font coverage mappings.
File Description
.github/​workflows/​font-fallback-update.yml Adds scheduled map regeneration and PR creation.
build/​ci/​.azure-devops-stages.yml Removes the validation-stage reference.
build/​ci/​setup/​.azure-devops-setup-font-fallback.yml Deletes the former validation stage.
src/​Uno.UI.Composition.Drawing/​FontFallback.Maps.cs Updates Mongolian coverage ranges.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread build/ci/.azure-devops-stages.yml Resolved
Copilot AI balanced review requested due to automatic review settings October 2, 2026 10:26
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 40s —— View job


Claude's review of PR #24941

Todo list

  • Gather context (diff, changed files, AGENTS.md rules)
  • Review new GitHub Actions workflow (font-fallback-update.yml)
  • Review removed ADO stage files
  • Review regenerated FontFallback.Maps.cs
  • Post inline comments for findings
  • Summarize review verdict

Verdict: ✅ Ship

No new inline findings from this pass — 0 blocking, 0 minor.

Summary

Re-reviewed after the latest commit (de148153, "Grant label permission to the font fallback updater"). I independently verified the full diff against origin/master rather than relying on the earlier pass:

  • Workflow permissions: font-fallback-update.yml now declares issues: write alongside contents/pull-requests, which is required for create-pull-request's labels: dependencies input to succeed. This resolves Copilot's earlier medium-severity finding on this point.
  • Issue traceability: the generated PR body now includes **GitHub Issue:** related to #24940. This resolves Copilot's low-severity finding.
  • Clean removal: confirmed via git diff that .azure-devops-stages.yml no longer references the deleted setup/.azure-devops-setup-font-fallback.yml, and a repo-wide grep turns up no other dangling references.
  • Generated diff fidelity: diffed FontFallback.Maps.cs directly — the 7 range changes are exactly what the deleted ADO stage's regeneration command would produce (new Mongolian coverage entries added/merged into adjacent ranges), consistent with pure generator output.
  • SDK/TFM match: FontFallbackPreprocessor.csproj targets $(NetPrevious), which resolves to net10.0 in the current Directory.Build.props — matching the workflow's dotnet-version: '10.0.x'. (Note: .claude/rules/build-system.md's example mapping, net9.0/net10.0, is stale relative to the repo's current net10.0/net11.0 previous/current pair — worth refreshing separately, unrelated to this PR.)
  • Token pattern: the workflow uses the default GITHUB_TOKEN for create-pull-request, same as the docs-updater.yml workflow it's modeled after — not a new regression, just an existing accepted repo pattern.

Cross-cutting (non-blocking, already raised by Copilot and the prior review pass): deleting the per-PR ADO stage removes the only CI signal that would catch a future PR changing FontFallbackPreprocessor's generation logic itself without regenerating the checked-in map — that class of drift now only surfaces on the next scheduled run or a manual workflow_dispatch. The PR's stated rationale (stale maps are runtime-harmless) covers upstream notofonts drift well but doesn't fully cover self-inflicted generator-logic drift. Worth a conscious call on whether that tradeoff is acceptable; not a reason to block.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The scheduled workflow correctly replaces upstream-sensitive PR validation, and no unresolved issues were found.

Review effort: Balanced
Findings: None

Resolved since last review (4)

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 236941 found UI Test snapshots differences: skia-linux-screenshots: 116, skia-windows-screenshots: 153

Details
  • skia-linux-screenshots: 116 changed over 2454

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • ClipboardTests.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Examples.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
  • skia-windows-screenshots: 153 changed over 2454

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DisplayInformation.png-dark
    • Examples.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • Grid_Multi_Column_Span.png-dark
    • Grid_Multi_Column_Span.png
    • ImageBrush_Stretch.png-dark
    • ImageBrush_Stretch.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png

@MartinZikmund
MartinZikmund merged commit 80710aa into master Oct 2, 2026
61 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/fontfallback-pin branch October 2, 2026 11:53
@MartinZikmund

Copy link
Copy Markdown
Member Author

@mergify backport release/stable/6.7

@mergify

mergify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

backport release/stable/6.7

✅ Backports have been created

Details

Cherry-pick of 0e1ebd7 has failed:

On branch mergify/bp/release/stable/6.7/pr-24941
Your branch is up to date with 'origin/release/stable/6.7'.

You are currently cherry-picking commit 0e1ebd7.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   .github/workflows/font-fallback-update.yml
	modified:   build/ci/.azure-devops-stages.yml

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by them: build/ci/setup/.azure-devops-setup-font-fallback.yml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@MartinZikmund

Copy link
Copy Markdown
Member Author

@mergify backport servicing/6.8

@mergify

mergify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

backport servicing/6.8

✅ Backports have been created

Details

Cherry-pick of 0e1ebd7 has failed:

On branch mergify/bp/servicing/6.8/pr-24941
Your branch is up to date with 'origin/servicing/6.8'.

You are currently cherry-picking commit 0e1ebd7.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   .github/workflows/font-fallback-update.yml
	modified:   build/ci/.azure-devops-stages.yml

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by them: build/ci/setup/.azure-devops-setup-font-fallback.yml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

agneszitte added a commit that referenced this pull request Oct 2, 2026
…r-24941

ci: Regenerate font fallback maps on a schedule (backport #24941)
agneszitte added a commit that referenced this pull request Oct 28, 2026
…6.7/pr-24941

ci: Regenerate font fallback maps on a schedule (backport #24941)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Font Fallback Maps Validation fails on every PR when notofonts changes upstream

5 participants