Fix release-notes classifier mis-tagging skia-sync PRs; make path tags data-driven#4410
Merged
Merged
Conversation
_files_by_commit() prefixed each commit with a \x1e record separator and parsed by matching a leading \x1e per line. But run() returns stdout.strip(), and \x1e is whitespace to Python's str.strip(), so the first record's leading separator was stripped. Since git log lists commits newest-first, the newest commit in every range lost its file list and was classified as 'internal' by _pr_category() (empty file set). On an active line the newest commit is very often the latest automated [skia-sync] submodule bump, so those product PRs (they touch externals/skia) were repeatedly mis-tagged 'internal' and dropped from release notes. Parse by splitting on \x1e instead, which recovers every record whether or not its leading separator survived strip(). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
📦 Try the packages from this PRWarning 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 -- 4410PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4410"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4410/packages --name skiasharp-pr-4410More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4410 |
mattleibow
force-pushed
the
mattleibow-skia-sync-internal-label
branch
from
July 12, 2026 06:11
dfe8928 to
061e602
Compare
Contributor
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: 🔗 View Staging Site This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
…to skia The classifier tags each PR product / mixed / internal by touched files. Refine the package-affecting-but-not-API paths and the externals/ split: - product is the strong signal: binding/ + source/ (managed API & Views) and externals/skia (the native Skia submodule, with its vendored HarfBuzz). The prefix is exact 'externals/skia', not 'externals/', so it does NOT sweep in the sibling externals/depot_tools build-toolchain submodule or externals/.gitignore. - native/ (per-platform build config: compile flags / gn args) shapes the shipped native binaries, so it is not internal — but a native/-only PR is usually infra, not a consumer-facing change, so it is 'mixed' (Polish judges from the title) rather than firm 'product'. Also covers the shipped WinUI native subtree under native/winui/. - docs (the SkiaSharp-API-docs submodule, mdoc XML) ships as the packages' IntelliSense docs, so it is not internal — but a docs bump is doc content, not an API/behaviour change, so it is 'mixed' too (moved up from internal). A submodule bump appears in the parent as the bare 'docs' gitlink, so the prefix is slash-less (like externals/skia) and does not collide with 'documentation/' (the docs site, still internal). - externals/depot_tools (build toolchain) and externals/.gitignore are build infra that never ships and does not shape the binary, so they stay internal. Docs (SKILL.md, dev spec) updated to match. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
mattleibow
force-pushed
the
mattleibow-skia-sync-internal-label
branch
from
July 12, 2026 09:54
061e602 to
fc98373
Compare
The product/mixed/internal path mapping was hardcoded in release-notes-data.py as _SHIP_PATH_PREFIXES / _BUILD_PATH_PREFIXES tuples. Move it into a committed, data-driven config so the mapping is edited in one deterministic place instead of in script logic. - scripts/infra/docs/release-notes-paths.json: ordered tiers (each a tag + patterns) plus a default. Self-documenting via description/why/notes fields. - release-notes-data.py: _pr_category now loads the tiers (cached) and returns the first tier with a matching file, else the default. A pattern matches by prefix (str.startswith, unchanged behaviour) or, if it contains a glob metacharacter (* ? [), by fnmatch.fnmatchcase — so paths, prefixes, and wildcards are all supported. A missing/malformed config is a hard error (no silent fallback to a guessed mapping). Behaviour is identical to the previous hardcoded tuples (verified across the prefix cases and real sync/docs/depot_tools PRs). Dev spec updated with the config-file inventory entry and a pointer to the JSON as the edit surface. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
mattleibow
added a commit
that referenced
this pull request
Jul 12, 2026
PR #4410 added 'import fnmatch' to release-notes-data.py but the edit replaced 'import argparse' instead of adding alongside it, so main() crashes at startup: NameError: name 'argparse' is not defined release-notes-data.py is only ever run as a script (via prepare.sh), so py_compile and import-time checks pass — the NameError only fires when main() builds its ArgumentParser. This broke the 'Sync - Release Notes & API Diffs' workflow on main (run 29204563881: Prepare step exit code 1). Re-add 'import argparse' in alphabetical order. Verified with 'python3 scripts/infra/docs/release-notes-data.py --help' (exit 0). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Problem
The release-notes generator (
scripts/infra/docs/release-notes-data.py) tags every merged PRproduct/mixed/internalfrom the files it touched, so the Polish phase can focus on product changes. Automated[skia-sync]submodule bumps — which change the shipped native Skia — kept coming outinternaland being dropped from the notes (e.g.4.151.0-unreleased.data.jsontags #4382 and4.148.1-unreleasedtags #4262 internal, despite both bumpingexternals/skia).Root cause (commit 1)
_files_by_commit()runsgit log --format=%x1e%H --name-onlyand parsed each record by matching a leading\x1eper line. But:run()returnsresult.stdout.strip(), and\x1e(record separator) is whitespace to Python'sstr.strip(), so the leading\x1eon the first record is stripped off.git loglists commits newest-first, so that first, separator-less record is the newest commit in the range — very often the latest[skia-sync]bump.The
line.startswith("\x1e")check then missed that commit, its file list was dropped, and an empty file set falls through tointernal.Fix: parse by splitting on
\x1e, which recovers every record regardless of the stripped leading separator.Sharpen the path tiers (commit 2)
product(real API/behaviour/native change):binding/+source/(managed API & Views) andexternals/skia— exact, notexternals/, so it no longer sweeps in the siblingexternals/depot_toolsbuild toolchain orexternals/.gitignore.mixed(affects the package, judged from the title):native/(per-platform build config; incl. the shipped WinUI native subtree undernative/winui/) anddocs(themono/SkiaSharp-API-docssubmodule XML — moved up frominternal; slash-less prefix to match the bare gitlink without colliding withdocumentation/).internal: CI, workflows, agent skills, the docs site (documentation/), tests, samples, build/meta, andexternals/depot_tools.Make the mapping data-driven (commit 3)
The path→tag mapping is no longer hardcoded in the script. It now lives in
scripts/infra/docs/release-notes-paths.json— ordered tiers (tag+patterns) plus adefault— the single deterministic place to edit it:{ "tiers": [ { "tag": "product", "patterns": ["binding/", "source/", "externals/skia"] }, { "tag": "mixed", "patterns": ["native/", "docs"] } ], "default": "internal" }_pr_categoryloads the tiers (cached) and returns the first tier with a matching file, else the default. A pattern matches by prefix (str.startswith, unchanged behaviour) or, if it contains a glob metachar (* ? [), byfnmatch.fnmatchcase— so paths, prefixes, and wildcards are all supported. A missing/malformed config is a hard error (no silent fallback). Behaviour is identical to the previous hardcoded tuples.Verification
[skia-sync] Merge upstream chrome/m151[skia-sync] Update Skia to milestone m151Update docs submodule to latest mainexternals/depot_tools-only /externals/.gitignorenative/native/-onlydocs: … site page(documentation/)Config loads from disk, glob patterns work (
fnmatch), a broad ~40-commit range stays a healthy mix, and the module compiles clean.Notes
*.data.jsonself-correct as pages regenerate on the nextprepare.sh/ scheduled release-notes run. No_DATA_JSON_FORMAT_VERSIONbump (schema unchanged).documentation/dev/release-notes-and-api-diffs.md(incl. the config-file inventory) and.agents/skills/release-notes/SKILL.md.Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com