Repository navigation
[release] Move publishing automation to repository-owned PowerShell - #4889
Conversation
📦 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 -- 4889PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4889"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4889/packages --name skiasharp-pr-4889More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4889 |
|
📖 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. |
📊 SkiaSharp benchmarks — PR #4889No ⭐ source-build ( |
[CI] Backport Arcade release infrastructure to 4.151.x (#4863) Context: #4802 Context: 46ea724 Context: #4842 Context: 398bcdd Context: #4803 Context: 2dd5087 Context: #4846 Context: #4877 Context: 6386960 Context: #4859 Context: #4889 Context: #4883 Context: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1571474 Context: https://github.com/mono/SkiaSharp/actions/runs/32862258889 Context: https://github.com/mono/SkiaSharp/actions/runs/33122720179 Complete the 4.151.x release line's move from its legacy split pipelines to repository-owned dnceng pipelines and a standard Arcade V3 package flow. Keep public validation free of protected side effects while giving trusted internal release builds the signing, API Scan, BAR registration, and promotion inputs needed to produce 4.151.3. Preserve the branch's product, runtime, managed API, C API, native source, Skia submodule, preview-workload, Xcode, and test topology. Do not add the Apple symbol production from #4846, `SkiaSharp.Vulkan.Silk.NET`, new product or container families, generated bindings or documentation, or unrelated release automation. #4859 supplied historical compatibility constraints, but its manual release-skill design is superseded by #4889 and is not backported. This change does not register, promote, publish, or otherwise release the PR build. ~~ Connected dnceng release topology ~~ The old Native, Package, and Tests definitions exchanged independently numbered artifacts, which obscured source, package, and test provenance. Make the package root use `buildPipelineType: 'build'` so one Build owns Prepare, Native, and Package, and make the connected Tests definition consume the folder-qualified `\dotnet\skiasharp\skiasharp-package` resource. Use the same repository stage templates in public validation through the local 1ES output adapter. Expand signing, API Scan, and publishing stages only for non-PR builds in the internal project, so public and PR template expansion cannot acquire protected release side effects. Retain the branch's native-only pipeline role rather than importing the newer main-only topology wholesale. Trigger the Build directly for `main` and `release/*` path changes instead of waiting for a separate Native pipeline to finish. Keep the branch's `azure-pipelines-complete-internal.yml` and native-only root compatible with the shared stages because other historical entry points still consume them. ~~ dnceng execution policy ~~ The internal root still extended the DevDiv MicroBuild 1ES template and loaded shared stages from `DevDiv/Xamarin.yaml-templates`, neither of which is available to a dnceng-owned pipeline. Move it to the released `v1/1ES.Official.PipelineTemplate.yml` and remove that repository dependency. Configure Armory, BinSkim, CredScan, ESLint, PoliCheck, and PSScriptAnalyzer to break the build, and run CodeQL on non-default branches. Keep network isolation in Audit while permanent mirrors and allowlisting are completed; the policy is intentionally not presented as fully enforced. Build and merge the MSVC Win32 artifacts without the old `System.TeamProject == 'devdiv'` condition. That predicate cannot match in dnceng, and retaining it would remove the `native_msvc` input required by API Scan. ~~ Exact 4.151.3 build identity ~~ Feature names and loosely parsed downstream counters could assign different identities to producing and consuming runs. Derive the product build number from Arcade's `yyyyMMdd.revision` OfficialBuildId, normalize GitHub and Azure Repos source identity, and make Tests inherit the Build run name. PR builds use `pr.<number>`, schedules use `nightly`, and ordinary builds keep their configured preview label. Only an internal `release/*` producer may use the `stable` sentinel to clear the suffix and emit exact 4.151.3 packages. Emit `DOTNET_FINAL_VERSION_KIND=release` for that case and reject malformed or incomplete source identities instead of manufacturing a plausible version. Require exact Build run IDs when downloading pipeline artifacts and reject the mutable `latestFromBranch` mode. Shared package downloaders use the branch transport alias and no longer fall back to a commit alias, matching the one transport version registered for each package ID. Keep this historical branch fail-closed on its existing downloader shape rather than taking the broader dead-code removal still under review in #4883. The Prepare gate exercises GitHub and Azure Repos PRs, downstream run-name inheritance, exact releases, and malformed identities. Build 1571474 used the resulting `4.151.3-pr.4863.26427.5` identity. ~~ One package and transport family ~~ The historical graph packed stable and preview products separately and then created stable, preview, symbol, branch, and commit transport variants. Pack one coherent product family and create one PR transport family for PR validation or one branch transport family otherwise. Keep commit aliases out of NonShipping so BAR cannot receive multiple versions of the same transport package ID. Run normal and transport packing in one `package_windows` job. Publish the raw `nuget` and `nuget_special` artifacts beside deterministic `arcade_shipping`, `arcade_nonshipping`, and `PdbArtifacts` views. Remove the separate `nuget_preview` and `nuget_symbols` pipeline artifacts. Mark transport projects non-shipping and give `_NuGets`, `_NativeAssets`, and `_Dependencies` the Microsoft copyright, MIT expression, and project URL required by Arcade. Documentation and generated sample jobs now select the build's single package family instead of assuming stable and preview packages coexist. Package jobs no longer restore from the shared build cache because package versions and the transport family depend on run identity rather than repository inputs alone. Shared consumers resolve transport packages from the dnceng transport feed. ~~ Real loose PDB artifacts ~~ Arcade V3 requires a `PdbArtifacts` input, but cloning customer packages into manufactured fallback symbol packages would create false package identities. Keep existing explicit symbol packages in Shipping. For product packages without one, extract implementation and runtime PDBs under their original package, version, TFM, and RID paths. Skip `ref/**`, reject archive entries that escape the package extraction root, and avoid loose-PDB duplication when an explicit symbol package owns the symbols. Emit `.empty` only when no eligible PDB exists. A Package-stage gate exercises both transport families, explicit-symbol ownership, reference-symbol exclusion, empty output, and traversal rejection. Build 1571474 published byte-identical raw and prepared package sets and a path-safe `PdbArtifacts` payload containing only the intended loose PDBs. ~~ Explicit signing and BAR inputs ~~ Arcade's broad signing defaults do not describe SkiaSharp's mixed first-party, Mac developer, generated JavaScript, WebGPU, and transport payloads. Replace them with an explicit repository policy. Sign Shipping NuGets and their classified first-party contents, preserve Mac developer signing, and classify source payloads that must retain their existing bytes as `CertificateName=None`. Keep NonShipping transport packages unsigned and prevent SignCheck from unpacking them. `DO-NOT-SIGN` exclusions make validation fail if a transport or listed source payload is unexpectedly signed. Do not add `SkiaSharp.Vulkan.Silk.NET` to the policy because that package is absent from 4.151.x, and do not manufacture or consume the Apple symbol packages added by #4846. Retain the source contract's `scripts/infra/signing` cache-input category even though no such helper directory exists yet, so the cache configuration stays aligned with main without importing additional tooling. Generate the Arcade V3 manifest from signed Shipping and prepared NonShipping assets. Main and release branches select real signing and BAR publication; other trusted branches test-sign unless explicitly forced, and forced BAR side effects additionally require `registerInBar`. Post-build validation keeps `publishAssetsImmediately: false` and requires default channels before promotion. ~~ Fail-closed API Scan coverage ~~ The legacy inline scan extracted packages without proving that its binaries, PDBs, surrogates, or configured targets existed. Add a repository-owned stage that downloads the current `nuget` and `native_msvc` artifacts, activates the dedicated WIF identity, runs API Scan in release mode, and reports at Note severity. Prepare checked Win32, NanoServer, and WinUI mappings. Use x64 MSVC surrogates for Win32 and HarfBuzzSharp ARM64 targets, and staged x64 package binaries for WinUI ARM64 targets. Fail when packages, binaries, PDBs, surrogate files, or target matches are absent, and make PostAnalysis fail at Note severity. Run the focused preparation suite during Prepare so input drift fails before a protected scan stage is requested. ~~ Historical SDK and pipeline compatibility ~~ The repository's 10.0.108 SDK was too old for Arcade package download, while the branch's Apple and WinUI jobs could not simply adopt every newer tool. Move repository-owned builds and the existing checkout-consuming native containers to SDK 10.0.203 with `latestPatch` roll-forward. Pin workload set 10.0.202 for the branch's macOS 15 and Xcode 26.3 combination. Visual Studio MSBuild 17.x cannot load the 10.0.2xx SDK used by Cake and managed builds. Install the retained 10.0.108 SDK side by side for the WinUI and WinUI ANGLE jobs. Update only Dockerfiles already present and consumed on 4.151.x; do not import absent container families or main's later product and toolchain changes. ~~ Servicing-pool runtime prerequisites ~~ The branch still used Microsoft-hosted and `Maui-1ESPT` defaults, so it did not inherit Arcade's release-aware dnceng routing. Move the Windows and Linux defaults to `DncEngPublicBuildPool` or `DncEngInternalBuildPool`, which select servicing pools for `release/*`, while retaining queue-time object overrides and hosted Apple jobs. The lean public servicing Linux image exposed two assumptions hidden by the general pool. Managed Linux builds Android libraries but did not install the Android SDK because the bootstrapper installed it only on non-Linux agents. Provision the SDK, platform tools, build-tools 35.0.0 and 36.0.0, and configured API levels for every Android-installing agent, then pass `AndroidSdkDirectory` into Cake. Both Linux WASM jobs also assumed Chrome was preinstalled. Download the pinned Chrome package, verify its SHA-256, package name, version, and architecture, install it, and export `CHROME_PATH` before running product tests. Build 1571474 completed the public release topology on the final head, including managed Android and the WASM product-test paths. The artifact and test outputs demonstrated that the servicing images now provide the tools these branch-native jobs require. ~~ Tracking benchmark feed compatibility ~~ The nightly resolver selects versions from the dnceng EAP feed, but the nested tracking benchmark configuration still restored from the legacy Xamarin feed. The nightly benchmark paths in run 32862258889 therefore failed package restore before BenchmarkDotNet could run. Align the nested benchmark source with dnceng; do not change benchmark logic or product code. Current-head run 33122720179 confirmed that the selected nightly packages restore and the existing benchmark workflows run without changing benchmark or product behavior. Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot App <[email protected]>
📦 Artifact size reportPackages from this PR (build Total Packages
+39 package(s) unchanged (< 50.0 KB). Per-file changes
|
| File | Size |
|---|---|
runtimes/win-arm64/native/libGLESv2.pdb |
64.5 MB → 64.4 MB (🟢 −96.0 KB) |
runtimes/win-x64/native/libGLESv2.pdb |
66.6 MB → 66.6 MB (🟢 −80.0 KB) |
runtimes/win-x86/native/libGLESv2.pdb |
67.3 MB → 67.2 MB (🟢 −80.0 KB) |
Informational only — this never blocks the PR. Native binaries are labelled by os/arch.
Extract the exact-shipment release-note data model, reviewed GitHub Release summary updater, workflow integration, tests, and documentation from the broader release tooling migration. Co-authored-by: Copilot App <[email protected]>
Introduces a first-class, modular Python package implementing the deterministic Prepare/Finish release-automation planning and execution logic described in the release-automation-v2 plan, with a stable release.py entry point: - release_common: subprocess runner, canonical plan digesting, and JSON-schema validated plan read/write (tamper detection via digest). - release_model: the release-version/branch/tag grammars, HarfBuzzSharp increment, and base + label + build-revision public-version composition (preview/RC/stable/hotfix, four-part versions). - release_git: a real Git working-copy wrapper used by both the SkiaSharp checkout and the externals/skia submodule checkout. - release_prepare: ports/refactors release-branch version detection and paired mono/skia + mono/SkiaSharp branch planning/apply from create-release-branches.py and detect-release-version.py, adding first-prerelease maintenance-branch creation and guarded stable recovery when the maintenance branch is missing, plus stable bump PR planning. Removes the old executionCommand/nextCommand handoffs; apply consumes a schema-validated plan file directly. - release_nuget: the NuGet.org public release receipt: V3 registration/catalog and flat-container clients, bounded indexing-lag polling, catalog packageHash/listed verification, nuspec parsing, fingerprint-pinned dotnet-nuget-verify signature checks for the SkiaSharp/SkiaSharp.HarfBuzz/HarfBuzzSharp anchors, multi-TFM HarfBuzzSharp dependency collapsing, and full package-family consistency checks (public-packages.json + trusted-signing- certificates.json). - release_github: tag/draft/release helpers ported from release_github.py, including previous-tag ordering across channels and the managed SKIASHARP:RELEASE-SUMMARY/GITHUB-GENERATED-NOTES markers ported from the reviewed-summary prototype, plus tag/release conflict detection. - release_finish: finish plan/create-draft/plan-publication/publish orchestration built on the NuGet receipt and GitHub helpers, with no AzDO/BAR dependency. - release_milestones: milestone shipped-tag detection, closeout planning/apply (move open items to the next unshipped milestone, close the shipped one, idempotent on rerun), and PR/issue reconciliation, ported from milestone_common.py, advance-release-milestones.py, and reconcile-release-assignments.py. Drops the generated reconcile-release-assignments.py --dry-run command string. All GitHub/NuGet/dotnet access goes through typed client interfaces (GitHubClient, NuGetClient, SignatureVerifier) so tests never touch the network; Git-repository tests run against real temporary repositories created with git init. 155 unit tests cover version grammar and composition, digest tampering, partial-state recovery, maintenance- branch creation, stable bump plans, NuGet catalog hash/listed state, catalog/nuspec mismatches, repeated-TFM dependency collapsing, reused HarfBuzzSharp commits, mixed SkiaSharp commits, missing packages, tag/draft/release conflicts, and milestone idempotency. Also negates the repository's generic build-output [Rr]elease/ .gitignore rule for scripts/infra/release/, matching the existing documentation/docfx/releases/ precedent, since otherwise none of this package could ever be tracked. Co-authored-by: Copilot <[email protected]>
release.py render-plan --plan <file> [--output <file>] reads an already schema-validated, digest-verified prepare or finish plan and projects a small, flat, schema-versioned summary (schemas/plan-summary.schema.json) with exactly the fields a thin GitHub Actions workflow needs to expose as job outputs: the trusted tooling SHA, the normalized release identity (the exact release version/branch without the CI build revision, safe to use as a repository-wide concurrency key), the exact release branch and version, and the source plan's own canonical digest. A tampered or unrecognized plan file is rejected the same way apply/create-draft/etc. would reject it, before any field is projected. release_summary.py implements the two-plan-shape projection (_summarize_prepare/_summarize_finish) as pure functions over already-validated plan dicts. Every other subcommand that previously only printed its JSON report to stdout (prepare apply, finish create-draft/plan-publication/publish/ closeout, inspect) now also accepts an optional --output <file>; when given, release_common.emit() writes the exact same JSON object to that path. prepare plan/finish plan already wrote their plan artifact to --output; that is unchanged. Adds 18 tests: prepare/finish summary field derivation (including that the reported release branch comes from the verified receipt, not a naive reconstruction), unknown/missing-operation rejection, plan-summary schema validation, CLI parser wiring for every new/changed --output flag, and an end-to-end render-plan execution test that writes a real digest-stamped plan file and reads back the rendered summary file. Co-authored-by: Copilot <[email protected]>
Standardizes the JSON surface every plan and command result exposes so
a thin GitHub Actions workflow can read the same fields regardless of
which command produced the file:
- Renamed the plan digest field "digest" -> "planDigest"
(release_common.DIGEST_FIELD) so it never collides with an unrelated
command-specific field and reads unambiguously as a job output name.
- Added a required top-level "nextAction" to both prepare-plan.schema.json
and finish-plan.schema.json: what the workflow should do next
("apply"/"await-merge"/"done"/"blocked" for prepare;
"create-draft"/"plan-publication"/"closeout" for finish), derived from
operation statuses (prepare) or draft/publish state (finish).
- Standardized the nested "release" object on every plan to always carry
"identity" (the normalized concurrency key -- exact release
version/branch, never including the CI build revision), "version"
(exact version; for finish, the exact published public version
including the build revision), and "branch" (exact release branch).
Renamed prepare's "release.releaseBranch" -> "release.branch" for
consistency with finish.
Added release_common.build_envelope()/validate_result_envelope() and
schemas/result-envelope.schema.json: every non-plan command result
(prepare apply; finish create-draft/plan-publication/publish/closeout)
now carries the identical standardized envelope (toolingSha, planDigest
passed through from the source plan, nextAction, release
identity/version/branch) alongside its own command-specific fields.
finish closeout now requires --plan <file> (the finish-plan.json from
earlier in the pipeline), matching apply/create-draft/plan-publication/
publish, so every write-side subcommand takes --plan --output
consistently; the plan supplies envelope context while the actual
closure operations are still recomputed from live milestone/tag state.
release_finish.plan_closeout/apply_closeout take that plan as their
first positional argument.
inspect is the one documented exception: it has no plan input, so its
report omits toolingSha/planDigest/nextAction, but it now reports the
same "release" object shape ({branch, version, identity}) for naming
consistency, and its GitHub-release payload is renamed "release" ->
"githubRelease" to remove the key collision with the new standardized
object.
release_summary.py is simplified from two per-operation summarizer
functions to one generic summarize_document(): since every plan and
every result now share the identical envelope shape, render-plan needs
no special-casing to tell them apart. release.py render-plan --plan
FILE now accepts either a full plan (schema+digest verified, exactly as
before) or a command-result file (validated against
result-envelope.schema.json instead, since results carry a pass-through
digest rather than their own) and produces the same flat summary either
way.
Updates existing tests for the renamed/added fields and adds coverage
for: nextAction derivation (apply/await-merge/done/blocked for prepare;
create-draft/plan-publication/closeout for finish), build_envelope/
validate_result_envelope, generic summarize_document over both plan and
result shapes, and release_finish.plan_closeout/apply_closeout
(idempotent rerun, blocked-without-raising, envelope fields) which had
no direct test coverage before. 189 tests pass.
Co-authored-by: Copilot <[email protected]>
…ture Adds release_nuget.extract_versions_txt_families(), a structure-aware parser of scripts/VERSIONS.txt's "# nuget versions" section: it groups each "<id> nuget <version>" line by the "# SkiaSharp"/"# HarfBuzzSharp" sub-header it actually falls under, rather than inferring family membership from a bare `<PackageId>`/prefix match. This is the authoritative manifest source the task specified: scripts/VERSIONS.txt lines 92-133 currently enumerate exactly 31 SkiaSharp-family and 10 HarfBuzzSharp-family public NuGet IDs (41 package lines, plus the "# HarfBuzzSharp" sub-header itself on line 123 inside that range; the "# nuget versions"/"# SkiaSharp" headers that make the block parseable sit just above it on lines 90-91). PublicPackagesManifestTests.test_public_packages_manifest_matches_versions_txt now validates public-packages.json exactly against this parser's output per family instead of a flat regex scan, and a new VersionsTxtFamilyExtractionTests class exercises the parser directly: family grouping, ignoring non-nuget/comment lines, missing-section and package-before-any-header rejection, and an explicit check that a lines-92-133 slice (re-attached to the section header) reproduces the same families as parsing the whole file with counts of 31/10. The checked-in public-packages.json was already exactly in sync (31 SkiaSharp + 10 HarfBuzzSharp); its header comment now documents the authoritative source and parser explicitly. release_nuget.py's public receipt verification already downloaded/hash/signature-verified only the three anchor packages (SkiaSharp, SkiaSharp.HarfBuzz, HarfBuzzSharp) via download_package(), while every other required package -- anchor or not -- is checked via its lightweight standalone nuspec plus catalog entry (_fetch_and_verify_nuspec()/get_nuspec()); no change was needed there, confirmed by re-reading verify_public_receipt(). 195 tests pass. Co-authored-by: Copilot <[email protected]>
trusted-signing-certificates.json previously only pinned NuGet.org repository-signing fingerprints, on the (incorrect) assumption that author signatures should never be trusted here. Live signature data for SkiaSharp 4.151.1 via ./eng/common/dotnet.sh nuget verify --all shows SkiaSharp packages are dual-signed: an author signature (Microsoft Corporation, SHA256 566A31882BE208BE4422F7CFD66ED09F5D4524A5994F50CCC8B05EC0528C1353, expires 2026-10-18) and a repository signature (NuGet.org, SHA256 1F4B311D9ACC115C8DC8018B5A49E00FCE6DA8E2855F9F014CA6F34570BC482D, expires 2027-05-19, already present). --all verifies every signature on the package, so a trusted fingerprint of each role is required or verification fails on whichever signature has no match. Adds the author fingerprint and corrects the file's guidance accordingly. Each certificate entry now records "role" (author|repository), "subject", and "validFrom"/"validUntil" (informational/audit only -- an expired certificate does not invalidate packages already signed with it, so verification never filters by validity at runtime). release_nuget.py: - Adds CertificateInfo and load_certificates(), which structurally validates the reviewed list (fingerprint format, known role, duplicate detection, date format) and accepts any number of certificates per role, so a future rotation is purely additive (keep the old fingerprint, add the new one) and never requires touching validation logic. - load_fingerprints() is now a thin wrapper returning every reviewed fingerprint regardless of role, unchanged for existing callers. - DotNetSignatureVerifier takes an explicit dotnet_command (defaulting to a bare "dotnet") so callers can point it at this repository's pinned Arcade wrapper instead of relying on whatever "dotnet" is on PATH; it also now rejects an empty fingerprint list explicitly. release.py adds _dotnet_command(), which resolves eng/common/dotnet.sh (or dotnet.cmd on Windows) relative to the repository root -- matching exactly how this was live-validated -- and falls back to PATH only when that wrapper is absent. `finish plan` now uses it. Tests deliberately avoid hardcoding a fixed fingerprint or count: TrustedCertificatesTests asserts structural properties of the real file (valid hex, unique, known roles, at least one author + one repository certificate) that remain true across any future rotation. LoadCertificatesValidationTests and DotNetSignatureVerifierTests use synthetic fixtures (including an explicit 3-generation additive rotation case) to pin down load_certificates()'s and the verifier's own behavior precisely without depending on the real reviewed list. 212 tests pass. Co-authored-by: Copilot <[email protected]>
1. prepare apply no longer takes/constructs an unused skia_repo. It was
rooted at externals/skia but never read: the mono/skia counterpart
ref is created entirely through the GitHub refs API
(github.create_ref), never by checking out or cloning the submodule.
Removed the parameter from apply_prepare_plan, cmd_prepare_apply, and
test call sites, and documented in apply_prepare_plan's docstring
that this is why a workflow checkout may use submodules: false.
2. render-plan gains --format json|markdown (default json, unchanged
behavior). release_summary.render_markdown() builds a deterministic,
human-readable report from the same validated plan/result document
used for the JSON summary: a fixed section order (Summary, Warnings,
Operations, Results, Receipt/Packages, Tag, Draft, Stable bump, then
any unrecognized top-level fields under "Additional fields" so
nothing is silently dropped) regardless of the source document's own
(alphabetically sorted, since plan files are written with
sort_keys=True) key order. Table/field rendering escapes '|' and
newlines for safety. Input validation (schema+digest for a plan,
result-envelope schema for a result) is identical regardless of
--format.
While building this, found and fixed a real bug it would have
surfaced: finish create_draft()'s result envelope reused "tag" for a
redundant always-"done" status string (shadowing the actual tag
name) and "draft" for a plain status string (colliding with the
source plan's nested draft object of the same key). Renamed to
tag/tagStatus/draftStatus so "tag" is consistently the real tag name
and "draft" is never overloaded with two incompatible shapes.
3. finish closeout now completes the originally planned behavior:
- Reconciles merged PRs (and the issues they close) for the exact
shipped release into that release's own milestone (titled
release.identity) before any advancement/closure, via
release_milestones.plan_reconcile/apply_reconcile. The commit
range is previousTag..sourceCommit (first-parent PR-number
extraction); resolve_reconciliation_range() fails explicitly
(ConflictError) when that boundary is ambiguous -- the previous
tag has no resolvable commit, or is not an ancestor of the shipped
commit -- rather than guessing. A missing target milestone is a
warning (nothing to reconcile against), not a hard failure.
- Dispatches update-release-notes.lock.yml (the real "Sync - Release
Notes & API Diffs" workflow) with source_branch=main and
min_version=max_version equal to the release's numeric base
(receipt.base), force=false.
- Dispatches auto-update-issue-template-versions.yml when the
release is stable (issue templates only offer stable versions as
choices).
- Idempotent: dispatches only fire when this invocation actually
reconciled or advanced something; a rerun that finds nothing
pending skips both dispatches and reports "skipped-no-new-work".
- Both plan_closeout and apply_closeout now take repo (for the git
range) and, for apply, github (for dispatch); `finish closeout`
always requires --plan, matching apply/create-draft/publish.
4. Audited every GhCliMilestoneClient `gh api` call: `gh api` silently
switches its default HTTP method from GET to POST as soon as any
`-f`/`-F` flag is present. milestones() and open_milestone_items()
used `-f` for pagination/query parameters without an explicit
method and were therefore silently POSTing against read-only list
endpoints. Added explicit `-X GET`, and to the two new read methods
(pull_request_milestone, issue_milestone) for consistency. Existing
writes (create_milestone, update_item_milestone, close_milestone)
already had explicit methods. Added direct argv-shape tests for
every method, plus the two new dispatch_workflow calls used by
closeout (which go through `gh workflow run`, not raw `gh api`, so
they are unaffected by this quirk, but are pinned exactly too).
5. release.py's module docstring and every finish create-draft/
plan-publication/publish/closeout subparser's --plan help text now
state explicitly that --plan is the *original* finish-plan.json
(schema-validated against finish-plan.schema.json), never a result
file a previous step wrote. Added tests asserting the help text and
that a result-envelope file is rejected when read with
finish.FINISH_SCHEMA.
6. Did not touch any workflow, documentation, or skill file. Ran the
complete scripts/infra/release test suite: 253 tests pass.
Co-authored-by: Copilot <[email protected]>
scripts/infra/release must run on a stock GitHub-hosted runner with no
"pip install" step and no network access, but release_common.py imported
the third-party jsonschema package for JSON Schema validation and the
workflows install nothing to provide it. Replace it with an in-repo,
standard-library-only validator.
- Added release_schema.py: a small, deterministic JSON Schema validator
implementing exactly the keyword subset the four checked-in schemas/
*.json files actually use (type incl. null/list-of-types, properties/
required/additionalProperties, items, const, enum, pattern, format
"date-time", minLength -- plus the purely descriptive $schema/$id/
title/description, which are ignored). It is not a partial/best-effort
general JSON Schema implementation: if a schema file is ever edited to
use a keyword, type name, or shape this validator does not implement
(oneOf/anyOf, schema-valued additionalProperties, tuple-form items,
etc.), validate() raises SchemaError immediately rather than silently
ignoring it, so keyword drift in the schema files is always caught
loudly instead of quietly under-validating.
- release_common.py no longer imports jsonschema at all (the previous
try/except ImportError block advising "pip install jsonschema" is
gone). validate_against_schema() now calls release_schema.validate()
and raises the same ValidationError shape as before
("plan failed schema validation (<name>): <path>: <message>; ..."),
so every existing caller (write_plan, read_plan, build_envelope,
validate_result_envelope, render-plan) is unaffected.
- Added tests/test_release_schema.py: focused unit tests for every
supported keyword (type/const/enum/pattern/format/minLength/
properties/required/additionalProperties/items), deterministic
path-sorted ordering of multiple issues, and that every checked-in
schemas/*.json file is fully expressible in the supported subset
(SchemaError is never raised for our own schema files).
- Added tests/test_no_third_party_dependency.py: this repo's own dev/CI
environment has jsonschema installed, so an in-process import test
would pass even if release_common still required it. These tests
instead spawn a real subprocess with a sys.meta_path finder that makes
importing "jsonschema" raise ImportError -- as if the package were not
installed -- and then exercise real behaviour inside that subprocess:
importing release_common/release_schema, validating a well-formed and
a malformed result envelope through release_common's public API, and
running the actual release.py CLI entry point's --help for the top
level, "prepare plan", and "render-plan" subcommands via runpy. All of
it succeeds with jsonschema fully blocked.
No workflow, documentation, or skill file was modified. Full suite:
295 tests pass (was 253; +42 for the new validator and isolation
proof), run via
`cd scripts/infra/release && python3 -m pytest tests/ -q`.
Co-authored-by: Copilot <[email protected]>
…gate
release-branching, release-tag, and release-publish environments do not
exist yet on mono/SkiaSharp. If a workflow's `environment:` names one that
does not exist, GitHub silently auto-creates an unprotected environment on
first use and runs the job anyway -- no required reviewers, no branch
restriction, no self-review prevention. Add a shared, injectable-client
validator workflows can call as the first step inside every protected job,
before any write or auth operation, so an absent/misconfigured environment
can never silently bypass approval.
- Added release_environment.py:
- EnvironmentClient Protocol (get_environment(name) -> EnvironmentSnapshot
| None) plus GhCliEnvironmentClient, the real gh-CLI-backed
implementation. Both of its reads (GET .../environments/{name} and GET
.../environments/{name}/deployment-branch-policies) pass -X GET
explicitly for the same reason every other client in this package
does: gh api silently switches its default HTTP method to POST as
soon as a -f/-F query-string flag is present (used here for
per_page). Confirmed the exact JSON response shapes (protection_rules
entry types "wait_timer"/"required_reviewers"/"branch_policy",
deployment_branch_policy's protected_branches/custom_branch_policies,
and the paginated deployment-branch-policies branch_policies list)
against GitHub's published OpenAPI schema and live gh api calls
against real repositories (mono/SkiaSharp, dotnet/sdk).
- check_environment(snapshot, *, name, default_branch) ->
EnvironmentCheckResult: the pure policy. Fails (ok=False, with an
explicit human-readable reason per problem, never just the first one)
unless the environment exists, has a required_reviewers protection
rule with at least one reviewer configured, that rule's
prevent_self_review is true, custom deployment branch policies are
enabled (not "protected branches" mode and not "any branch"), there
are no tag deployment policies at all, and the exact allowed branch
set is exactly {default_branch} -- no more, no fewer. A misconfigured
environment is an expected, well-formed "fail" outcome (never an
exception); only a genuine query failure (auth/network/unexpected
shape) or an empty default_branch argument raises EnvironmentError.
- Wired `release.py check-environment --name NAME --default-branch BRANCH
[--output FILE]`: read-only, prints/writes the same JSON report either
way (name/exists/ok/reasons/defaultBranch/protectionRuleTypes/
allowedBranches/reviewerCount/preventSelfReview/customBranchPolicies)
and exits 0 only when ok is true, matching every other subcommand's
--output convention. Documented in the top module docstring and the
subcommand's own --help.
- Added tests/test_release_environment.py: the pure check_environment()
policy (missing environment, missing/empty/self-review-disabled
required_reviewers rule, protected-branches-instead-of-custom,
unrestricted deployment_branch_policy, extra/wrong/missing allowed
branch, a tag policy present, multiple simultaneous failures, empty
default_branch), _parse_environment() against realistic GitHub API
payloads, check_result_to_dict()'s exact key shape, and
GhCliEnvironmentClient's exact argv (-X GET on both calls, environment
name URL-encoding, multi-page deployment-branch-policies merging,
404-vs-genuine-failure handling via a scripted fake CommandRunner
mirroring test_release_nuget.py's FakeCommandRunnerForVerify pattern).
- Added parser-wiring and end-to-end CLI tests to
tests/test_release_cli.py (GhCliEnvironmentClient swapped for a fake via
the same injection point a workflow test would use): a well-configured
environment exits 0 and writes the report; a missing environment exits
1 and still writes the report; a misconfigured environment exits 1 with
no --output given.
Live-smoke-tested against the real mono/SkiaSharp repository: correctly
fails for a genuinely nonexistent environment ("release-tag") and for a
real, existing-but-under-protected one ("github-pages": no
required_reviewers rule, three allowed branches instead of exactly
"main").
No workflow, documentation, or skill file was modified. Full suite:
322 tests pass (was 295; +27), run via
`cd scripts/infra/release && python3 -m pytest tests/ -q`.
Co-authored-by: Copilot <[email protected]>
Fresh-ports the durable architecture of the reviewed-summaries prototype (planning ref 5bb3346) onto current main, without importing its generated historical pages or its broader format churn: - scripts/infra/docs/release_notes/ -- a new, independently unit-tested package: common.py (the exact-release tag grammar + the shared release_github import glue), shipments.py (the pure collect_shipments() model and its structural validators), safety.py (the prose-safety gate, ported from the retired release-publish skill's GitHub Release "teaser" guard: no code fence, no CVE/security/vulnerability wording, no unwritten placeholder, plus a new managed-marker-injection guard this design needs and the teaser never did), render_summary.py (the deterministic renderer: scripts own every heading/link/@handle, the agent supplies only a headline/body prose pair), and update_github_summaries.py (the classic workflow's entry point: preflight, a race barrier immediately before the first write, then write + post-write verification, all per exact tag). - The updater imports -- never redefines -- the managed markers and body helpers from scripts/infra/release/release_github.py, so it can never diverge from what Finish uses to compose a new release's initial body. - scripts/infra/docs/release-notes-data.py: the smallest compatible format bump (3 -> 4) to add data.json's new "shipments" field on released pages, via a thin collect_shipments_for_page() wrapper around the new package. _data_json_unchanged() now deliberately excludes "format" and "shipments" from its change-detection comparison, so this bump alone never discards a historical page's already-reviewed prose or forces a mass re-author -- verified against this repository's own real tag history and committed data.json files. - .github/workflows/update-github-release-summaries.yml: the classic, non-agentic workflow (pinned actions, contents:write only) that runs the updater on push/release/dispatch. - .agents/skills/release-notes/SKILL.md and .github/workflows/update-release-notes.md (+ recompiled update-release-notes.lock.yml via `gh aw compile --strict`): the agent may now also write an optional, per-shipment-tag release_summaries prose slot that converges independently of the website page and never blocks it. - documentation/dev/release-notes-and-api-diffs.md: a new §4.8 documents the exact-summary contract. 115 new unit tests cover tag parsing (stable/hotfix/preview/rc), exact shipment/delta selection, prose safety (placeholders, CVE/security claims, code fences, marker injection), old-format data (silently skipped, or a loud error when explicitly requested), unmarked historical releases, marker replacement with byte-for-byte generated-notes preservation, preflight/race/post-write verification, and idempotency. All 460 tests across scripts/infra/docs/release_notes and scripts/infra/release pass, and update-release-notes.md strictly recompiles cleanly. No generated documentation/docfx/releases/** content was regenerated or committed as part of this change. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
1. Critical: HttpNuGetClient._get_json pointed at nuget.org's registration5-gz-semver2 resource, which always compresses its response body (confirmed live: Content-Encoding: gzip, magic bytes 1f8b), but urllib.request never transparently decompresses a response the way e.g. requests does. Every registration read was silently getting raw gzip bytes decoded as UTF-8. Fixed _get_json to gzip-decompress when Content-Encoding says so (or the body's magic bytes say so, defensively), then parse JSON, each failure mode raising an explicit NuGetError. There is no non-gz SemVer2 registration resource to fall back to -- nuget.org's real service index only publishes registration5-semver1 (SemVer1, which omits our SemVer2-shaped "-preview.N.NNNNN" versions) and the two "-gz-" resources -- so this must be handled here. 2. Critical: get_catalog_entry's "if 'listed' not in entry and '@id' in entry" dereference condition was dead in practice: nuget.org's real inlined registration catalogEntry always includes "listed" (verified live), so the full catalog leaf -- which is the only place packageHash/packageSize/repository actually live -- was never fetched. Every real verify_catalog_entry call was silently failing on a missing SHA512 hash. Removed the conditional; the catalogEntry's "@id" is now always dereferenced to the leaf. 3. Critical: real NuGet.org catalog leaves for some already-published versions (observed live for SkiaSharp 3.119.0) expose "repository" as an empty string even though the same package's nuspec has full repository metadata -- confirmed by querying the live catalog for several versions. The nuspec/catalog repository cross-check (verify_repository_metadata) was therefore unsatisfiable for real historical releases. Replaced it with verify_nuspec_repository, which validates and extracts (commit, branch) from the nuspec alone; verify_catalog_entry no longer requires catalog repository metadata at all. Catalog listed/hash/size/dependencyGroups are still required; only the (unreliable) catalog "repository" field is no longer trusted or required, matching item 7 below for how source-commit equality is now derived per-package from each package's own nuspec instead. 4. High: apply_prepare_plan treated any release branch that already existed under the expected name as "done" without revalidating it. Added _verify_existing_release_branch: confirms the approved base SHA is still an ancestor of the live branch head (catching a force-push or an unrelated branch created under the same name after the plan was approved) and that PREVIEW_LABEL/SKIASHARP_VERSION at that head still match the plan -- both a hard GitHubError otherwise, never silently accepted. 5. High: `finish publish` used to call finish.plan_publication itself and immediately act on the fresh result in the same process, so the human/environment-approval gate that is supposed to review a plan-publication report before publish runs was never actually binding on anything -- a single process could compute and approve its own decision. Changed the CLI contract: `finish publish` now requires both --plan and --publication, where --publication is the exact, previously *persisted* result of a separate `finish plan-publication --output <file>` run; it never recomputes plan-publication itself. release_finish.publish() now validates (_validate_publication_binding) that the given publication document is schema-valid, carries the same planDigest as the given plan, is for the same tag, has hasManagedMarkers and readyToPublish set, and only then compares the *current* draft body hash to the approved report's bodySha256. Added release_common.read_result_envelope() for loading+validating a persisted result file. Updated release.py's module docstring, the publish subparser's help text, and every affected test. 6. Medium: an existing *unpublished* draft without managed markers (created by hand, or by an older tool version) made create-draft and plan-publication oscillate forever: create-draft treated any existing draft as already done (-> plan-publication), but plan-publication saw no markers and sent control back to create-draft. create_draft now migrates such a draft in place -- wraps its existing body with the managed-marker template (preserving the original notes instead of discarding them), writes it, and re-reads the release to verify the migration actually took effect -- which lets plan-publication/publish converge. A published release (marked or not) is still never rewritten here. 7. Medium: SkiaSharp.HarfBuzz is a "SkiaSharp"-family anchor package, but the source-commit-equality check against the SkiaSharp anchor's own commit was only ever applied in the non-anchor code path, so it was silently skipped for every anchor including SkiaSharp.HarfBuzz. The families["SkiaSharp"] loop in verify_public_receipt now calls verify_nuspec_repository and checks commit equality for every package in that family, anchor or not. 8. Medium: apply_prepare_plan hardcoded next_action="done" even immediately after opening (or finding) an unmerged stable-bump PR. It now returns next_action="await-merge" whenever a stable-bump PR was just opened/found and is not yet merged, while still marking the "open-stable-bump-pr" *operation* itself "done" (opening it is complete; the release process is not). Regression tests added across release_nuget/release_prepare/ release_finish/release.py's test files, including: a real local http.server-backed HttpNuGetClient test class proving gzip decompression and leaf dereferencing against an actual socket/response (not a mocked transport) for items 1 and 2; an empty-string catalog-repository integration test and a mismatched-HarfBuzz-wrapper- anchor-commit test for items 3 and 7; branch-drift and version-state- drift apply tests, plus a stable-bump await-merge test, for items 4 and 8; publication-binding tests (different plan, different tag, missing markers, hand-built stand-in) plus an end-to-end CLI test with a fake GhCliGitHubClient for item 5; and a marker-less-draft migration test plus a published-release-is-never-rewritten test for item 6. catalog listed=true and SHA512-hash requirements are unchanged and still enforced by verify_catalog_entry; no workflow-facing result schema changes were needed (nextAction/tag/draft/migrated already render generically and correctly through release_summary.py's existing JSON/Markdown surfaces -- spot-checked with a synthetic migrated=true result envelope). No workflow, documentation, or skill file was modified (this worktree's unrelated concurrent changes to .agents/skills/release-*, AGENTS.md, etc. were left untouched and unstaged). Full suite: 348 tests pass (was 322), run via `cd scripts/infra/release && python3 -m pytest tests/ -q`. Co-authored-by: Copilot <[email protected]>
The blanket !scripts/infra/release/** negation (needed so the package itself isn't excluded by the generic [Rr]elease/ build-output rule) also unignored test/runtime __pycache__ directories and .pyc files under that path, so they started appearing in git status after running the test suite. Added two narrower ignore rules immediately after the negation -- scripts/infra/release/**/__pycache__/ and scripts/infra/release/**/*.py[cod] -- which take precedence again since git honors the last matching pattern in .gitignore. Verified with 'git check-ignore -v' and by running the full test suite and confirming 'git status' stays clean afterward (348 tests still pass). Co-authored-by: Copilot <[email protected]>
Review found a correctness bug in _data_json_unchanged: excluding "shipments" from change detection meant a newly published preview/RC tag could be the only fact that changed (the branch/PR bucket already existed), so the page was silently skipped -- never written -- and its new shipment never reached data.json for the GitHub summary updater to converge. Split change detection three ways instead of two: - _data_json_unchanged() is now the genuine no-op check again: strict equality, INCLUDING "format"/"shipments". Only this gates whether an unforced run skips a page entirely. - _website_content_unchanged() (renamed from the old _data_json_unchanged) ignores "format"/"shipments" -- true whenever the PRs/roster/previews/ links/companions a rendered page and its required prose depend on have not moved. - _classify_data_write(), a new pure decision table, combines the two (plus --force) into what _write_page must actually do. A page whose website content is unchanged but whose shipments moved is now ALWAYS written, regardless of --force, while still preserving existing prose and never adding the page to files-to-polish. A genuine website-content change still always writes, discards prose, and returns the page for polish. A truly unchanged page still skips entirely without --force, and --force on a truly unchanged page still preserves the exact pre-shipments behavior (returned for polish, prose untouched). _classify_data_write is deliberately decoupled from git/file I/O so this three-way split is directly unit testable without a real repository. Added regression tests (scripts/infra/docs/release_notes/tests/test_common.py): only a new shipment tag, only a format bump, shipment removal/change, a website PR fact change still deleting prose, and an end-to-end (file-system, no real git) simulation proving a shipment-only patch still writes data.json (has_changes) while leaving the polish list empty and prose untouched. Verified against this repository's own real committed data.json (4.150.0): computing its shipments now correctly reports "write, keep prose, no polish" instead of the previous "skip, nothing written". Updated documentation/dev/release-notes-and-api-diffs.md's §4.8 to describe the corrected three-way compatibility contract. 128 tests in scripts/infra/docs/release_notes and 352 in scripts/infra/release pass; release-notes-render.py still renders a real committed page byte-identical to what's on disk; update-release-notes.md recompiles cleanly via `gh aw compile --strict` with no lock-file drift. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
…mmit Live end-to-end `finish plan --version 4.151.1` exposed a critical bug: verify_public_receipt used public-packages.json's *current* family lists to decide which packages a release requires, but at 4.151.1's embedded source commit (279f93f...), scripts/VERSIONS.txt only ever listed the older family -- SkiaSharp.Vulkan.Silk.NET was introduced well after 4.151.1 shipped. Polling NuGet.org for a version of a package that was never published for that release eventually raised NotReadyError after 10 attempts even though the release itself is perfectly valid. - Added release_nuget.read_family_ids_at_commit(reader, commit): reads scripts/VERSIONS.txt at an exact commit and parses it with the existing extract_versions_txt_families(), returning the authoritative SkiaSharp/HarfBuzzSharp package-ID lists exactly as that release's own VERSIONS.txt declared them. - verify_public_receipt now bootstraps with the SkiaSharp anchor to resolve and validate the source commit (unchanged), then calls read_family_ids_at_commit at that commit and uses its result for both family loops instead of manifest["families"]. manifest["anchorPackages"] is untouched (current tooling policy: which three packages are always downloaded/hash/signature-verified does not change per release). public-packages.json's *current* family lists remain exactly as useful as before for their existing purpose -- validating the checked-in manifest against the current tree (PublicPackagesManifestTests) -- they are just never used to decide what a historical release requires. - Extended tests/test_release_nuget.py's FakeVersionsFileReader.seed() to write a properly family-structured VERSIONS.txt (the "# nuget versions" / "# SkiaSharp" / "# HarfBuzzSharp" section shape extract_versions_txt_families expects) instead of two bare version lines, defaulting to exactly the packages _seed_family() publishes to the fake NuGet client so every existing test's "historical" and "actually published" package sets agree unless a test deliberately diverges them. - Added test_current_manifest_package_absent_at_source_commit_is_ignored: a manifest with an extra later-added package that is registered nowhere (not on the fake NuGet client, not in the historical VERSIONS.txt) must not be requested at all, and the receipt still succeeds with exactly the historical package set. Also added test_read_family_ids_at_commit_matches_historical_versions_txt. Two further bugs were found and fixed while live-validating `finish plan --version 4.151.1` to actual completion, as required, both only reachable by really running against nuget.org/GitHub (existing fake- based unit tests never touch real paths or real historical release metadata): - DotNetSignatureVerifier.verify() appended a *relative* nupkg_path to argv while also setting cwd to that same relative path's (also relative) parent, so once the subprocess resolved the argv path against the new cwd, the download directory doubled (observed live: "Could not find a part of the path '.../finish-downloads/ finish-downloads/SkiaSharp.4.151.1.nupkg'"). Fixed by making the path absolute with Path.absolute() (not .resolve(), which would silently rewrite an already-absolute path via symlink resolution, e.g. macOS's /tmp -> /private/tmp) before building argv/cwd. Added test_relative_nupkg_path_does_not_double_the_download_directory and test_already_absolute_nupkg_path_is_passed_through_unchanged. - check_release_conflict compared an existing release's target_commitish for strict equality against the exact package source SHA, but the real, already-published mono/SkiaSharp release v4.151.1 has targetCommitish == "main" (confirmed via `gh release view v4.151.1`) -- GitHub's target_commitish is only a fallback target used if the named tag doesn't exist yet; once the tag exists (verified independently via check_tag_conflict against the exact source commit), it is authoritative and target_commitish is no longer a trustworthy second opinion. check_release_conflict now only treats a target_commitish disagreement as a real conflict when it is itself a full 40-hex SHA that disagrees, or when the release is still an unpublished draft (which this tool always creates with an exact SHA). Added tests for: a published legacy branch-name target being tolerated, a published release with a genuinely different SHA still conflicting, and a draft with a branch-name target still conflicting. Live-validated end-to-end (read-only) after all three fixes: `python3 scripts/infra/release/release.py finish plan --version 4.151.1` completed successfully against the real mono/SkiaSharp repository and nuget.org -- correctly reconciling the existing tag/release (nextAction "closeout") and reporting exactly the historical 40-package receipt (no SkiaSharp.Vulkan.Silk.NET). No workflow, documentation, or skill file was modified. Full suite: 355 tests pass (was 350), run via `cd scripts/infra/release && python3 -m pytest tests/ -q`. Co-authored-by: Copilot <[email protected]>
… work
apply_closeout only dispatched update-release-notes.lock.yml/
auto-update-issue-template-versions.yml when reconcile_ops or pending
was non-empty. Two real recovery gaps followed from that:
- A first closeout for a release with no milestone reconcile or
advance work at all (nothing to reassign, nothing to close) never
generated release notes, even though the release had just been
published and unambiguously needs them.
- If a prior invocation completed its milestone writes (reconcile
reassignment, milestone closure) but then failed before reaching the
dispatch call -- a crash, a network blip, an expired token -- a rerun
would see no new milestone work left to do (everything already
reconciled/advanced) and silently skip the dispatch too, leaving a
published release with no notes and no way to recover except by
hand.
apply_closeout now dispatches update-release-notes.lock.yml
unconditionally on every successful invocation, and
auto-update-issue-template-versions.yml unconditionally whenever the
release is stable -- in both cases regardless of whether there was any
new milestone reconcile/advance work, and regardless of whether
milestone advancement fully succeeded (a "blocked" milestone, e.g. no
eligible target for its open items, no longer withholds the dispatch:
a published release still needs its notes even if milestone closeout
itself is blocked). Both dispatch targets are themselves convergent/
idempotent workflows, so a repeated dispatch is always safer than
silently missing one. The "skipped-no-new-work" dispatch status is
gone; every apply_closeout invocation now reports both dispatches as
"dispatched" (or omits the issue-template one for a non-stable
release). Milestone reconciliation/advancement itself remains
only-write-what's-needed idempotent -- only the *dispatch* gating
changed. plan_closeout (the read-only --dry-run preview) already
reported releaseNotesDispatch/issueTemplateRefreshNeeded unconditionally
and needed no change.
Updated tests/test_release_finish.py:
- FakeGitHubClient gained fail_next_dispatch_for: a workflow name in
that set makes the *next* dispatch_workflow call for it raise (then
clears itself), so a test can simulate a transient dispatch failure
and then retry.
- Replaced test_apply_closeout_skips_dispatch_when_no_new_work (tested
the old, now-removed gating) with:
- test_apply_closeout_dispatches_release_notes_even_with_no_milestone_work:
a first closeout with nothing to reconcile or advance still
dispatches both workflows.
- test_apply_closeout_redispatches_on_rerun_with_no_new_work: a
second, no-op rerun after everything is already reconciled/advanced
still redispatches both workflows (4 total dispatch calls across
two runs).
- test_apply_closeout_dispatch_recovers_after_a_transient_failure:
the release-notes dispatch raises on the first call (after the
milestone reconcile write has already landed); the second call,
with no new milestone work left, still successfully redispatches
both workflows, proving the recovery path.
Kept in scope to scripts/infra/release/**; did not touch or stage the
concurrent session's new scripts/infra/release/tests/
test_release_workflows.py (workflow-file assertions, a different
scope). Full suite: 363 tests pass (was 355), run via
`cd scripts/infra/release && python3 -m pytest tests/ -q`.
Co-authored-by: Copilot <[email protected]>
Code review found a real cross-workflow race: update_releases() never inspected Release.is_draft, so a prose-merge-triggered run could patch an unpublished draft while `finish publish` is still waiting on its own environment approval. Finish persists a hash of the exact draft body it created and verifies against it before publishing; a summary patch in the meantime would silently invalidate that hash out from under Finish and force an unrelated reapproval with no actual content problem. Fix: update_releases()'s preflight now checks existing.is_draft immediately after fetching the release, before the managed-markers check, and skips (never errors on, never patches) any unpublished draft with an explicit "skipped" result and a detail naming it as a draft. This is a normal, expected preflight outcome, not a batch-aborting error -- it converges once GitHub's `release` (published) event fires (already one of update-github-release-summaries.yml's triggers) or on the workflow's next scheduled/dispatched run, whichever comes first. Added regression tests in scripts/infra/docs/release_notes/tests/test_update_github_summaries.py: - is_draft=True skips with no PATCH sent. - the draft's body (including its generated-notes region) is left byte-for-byte unchanged. - the same candidate/client later converges successfully once the release is published (is_draft flips to False, nothing else changes). FakeGitHubClient/_release_info gained an is_draft/draft_tags parameter and a publish() helper to simulate this lifecycle without any real gh/network access. Updated documentation/dev/release-notes-and-api-diffs.md's §4.8 with a "Drafts" paragraph documenting the race and the fix. 131 tests in scripts/infra/docs/release_notes pass; scripts/infra/release's own 367 tests (unmodified by this change) still pass; update-release-notes.md recompiles cleanly via `gh aw compile --strict` with no lock-file drift. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
…shed `finish closeout` is a public CLI. It must not close/advance milestones merely because a caller supplied a schema-valid, digest-verified finish plan -- the plan alone proves nothing about whether the release it describes actually shipped: it could be stale, hand-built/tampered, or simply generated before create-draft/publish ever ran. Added release_finish._require_release_is_shipped(plan, repo, github), called at the very start of both plan_closeout and apply_closeout, before milestone_client is touched for anything (not even a read): - The plan's exact tag must exist on the remote and resolve to exactly plan["receipt"]["sourceCommit"] -- missing or moved is a ConflictError, never silently tolerated (unlike an already-published legacy release's target_commitish, which is allowed to be a branch name; the tag itself is the one thing this tool never force-updates). - A matching GitHub Release must exist for that tag. - That release must be published, not still a draft. Any failure raises ConflictError immediately, before milestone_client.milestones() or any other milestone/github call. plan_closeout now also takes a `github: GitHubClient` parameter (it previously had no way to check release-publish state at all) to run the same check for its read-only preview -- a --dry-run must never show a misleadingly "safe" closeout plan for a release that hasn't actually shipped. Updated release.py's cmd_finish_closeout to construct GhCliGitHubClient once and pass it to both the --dry-run and real branches. tests/test_release_finish.py: - Rewrote every existing CloseoutTests fixture to use a real commit from _repo_with_history() as the plan's source_commit (an arbitrary fake SHA can never be pushed as a real git tag) and added a shared _ship_plan(repo, github, plan) helper that pushes the plan's exact tag to its exact source commit and registers a matching, published GitHub release -- every plan_closeout/apply_closeout test now calls it before exercising closeout. - FakeMilestoneClient.milestones() now counts its own calls (milestones_call_count), so tests can assert the milestone client was never touched at all when the shipped-state gate rejects a plan. - Added four regression tests: a missing tag, a tag that resolves to a different (moved/conflicting) commit than the receipt, a missing GitHub release, and a draft-only (unpublished) release -- each asserts both plan_closeout and/or apply_closeout raise ConflictError with a specific message and that milestones_call_count stays 0. Kept in scope to scripts/infra/release/**; did not touch or stage the concurrent session's scripts/infra/release/tests/test_release_workflows.py (workflow-file assertions, a different scope). Full suite: 367 tests pass (was 363), run via `cd scripts/infra/release && python3 -m pytest tests/ -q`. Co-authored-by: Copilot <[email protected]>
Consolidating the retired `advance-release-milestones.py` skill regressed schedule maintenance: the new `release_milestones.py` only reconciled and closed existing milestones, but never created/updated the upcoming preview/RC/stable milestones from the Chromium/Skia schedule. This restores that capability, deterministically and injectably, inside the new CLI. release_milestones.py: - `Milestone` gains `due_on`/`description` fields (both default-empty, so existing callers/tests are unaffected). - `MilestoneClient` Protocol gains `update_milestone` alongside the existing `create_milestone`. - `plan_closeout` gains a `creatable_titles: frozenset[str]` parameter so a dry-run preview can treat a milestone that is about to be created by a pending schedule "create" operation as a valid reconciliation move-target (with `move_to_number=None`, since it has no real number yet). A real `apply_closeout` never needs this: it creates milestones for real first, then re-fetches milestones before reconciling/closing. - New `ScheduleClient` Protocol + `HttpChromiumScheduleClient`: a standard-library-only (urllib) read-only client for `https://chromiumdash.appspot.com/fetch_milestone_schedule`. - New `DesiredMilestone`, `desired_milestones()`, `parse_current_major_and_milestone()`: port the retired script's deterministic due-date/title calculation for the next N (default 3) preview/RC/stable milestones from the current SkiaSharp nuget major and libSkiaSharp Chromium milestone number. A desired milestone whose due date is more than 30 days in the past is skipped rather than created after the fact (ported verbatim as `_SCHEDULE_CREATE_CUTOFF_DAYS`). - New `ScheduleOperation`, `plan_schedule_operations()`, `apply_schedule_operations()`: diff desired vs. existing milestones into create/update/none operations (comparing only the YYYY-MM-DD portion of `due_on`, since desired dates are always synthesized at midnight UTC), and apply them idempotently via the injected `MilestoneClient`. release_finish.py: - `plan_closeout`/`apply_closeout` gain `schedule_client`/`schedule_count=3` parameters and run schedule planning/application *before* PR/issue reconciliation and milestone rollover, matching the retired skill's ordering (upcoming milestones must exist before a release can roll forward into them). - New `_read_current_major_and_milestone()` reads `scripts/VERSIONS.txt` from `refs/remotes/origin/main` (never the release branch being closed out) since schedule maintenance for upcoming milestones is a main-line concern independent of any specific release being finished. - `_plan_schedule_operations_for_release()` treats a Chromium schedule fetch failure as an explicit warning, never a hard failure: docs dispatch and PR/issue reconciliation are not coupled to schedule success. `apply_closeout` likewise records failed schedule writes as warnings and continues. - `apply_closeout` re-fetches `milestone_client.milestones()` after applying schedule operations so newly created milestones become real move targets for the subsequent reconciliation/closure step. - The existing hard preconditions (tag resolves to `receipt.sourceCommit`, matching published non-draft GitHub Release exists) and the unconditional release-notes/issue-template dispatch behavior are unchanged; schedule maintenance is additive and ordered strictly before them. release.py: - `GhCliMilestoneClient.milestones()`/`create_milestone()` capture the `due_on`/`description` fields from `gh api`; new `update_milestone()` issues a `gh api -X PATCH` with explicit fields (title stays put unless changed by policy elsewhere; only `due_on`/`state`/`description` as needed). - `cmd_finish_closeout` constructs a `milestones.HttpChromiumScheduleClient()` and passes it through to both the plan and apply code paths. release_summary.py: - New "## Schedule" and "## Schedule results" Markdown sections surface the planned/applied create/update/none operations (title, due date, action, status) for thin-workflow visibility. Tests: - tests/test_release_milestones.py: new coverage for `parse_current_major_and_milestone()` (valid, missing fields, malformed file), `desired_milestones()` (preview/RC/stable due-date derivation, the 30-day-in-the-past cutoff), a real-local-HTTP-server-backed `HttpChromiumScheduleClientTests` (mirrors the existing NuGet HTTP test pattern: valid response, HTTP error, empty `mstones`, missing fields, malformed JSON -- no mocking of the transport), `plan_schedule_operations`/ `apply_schedule_operations` (create, update due date, no-op when already correct, client error surfaced per-operation), and `plan_closeout`'s new `creatable_titles` preview behavior. - tests/test_release_finish.py: all existing `plan_closeout`/`apply_closeout` call sites updated to pass an explicit no-op `schedule_client`/ `schedule_count=0` (via `_NULL_SCHEDULE_CLIENT`) so pre-existing behavior is unchanged and unaffected by the new parameters. `FakeMilestoneClient` gains `create_milestone`/`update_milestone` tracking. New `FakeScheduleClient` simulates the Chromium endpoint (seeded schedules or simulated fetch failure). New `ScheduleMaintenanceIntegrationTests` (5 tests) exercise the full `apply_closeout` path end-to-end: creating missing upcoming milestones, updating a due date that drifted, an idempotent no-op rerun, a Chromium-fetch failure that still allows PR reconciliation and both dispatches to proceed (only a warning is recorded), and a dry-run `plan_closeout` preview that reports the create operation without writing anything. Full suite: `cd scripts/infra/release && python3 -m pytest tests/ -q` -> 394 passed. Co-authored-by: Copilot <[email protected]>
…ance
Three CLI defects found in a final full-system review.
1. Critical: GhCliGitHubClient.ref_sha used GitHub's plural, prefix-matching
"list matching references" endpoint (`git/refs/{ref}`) instead of the
singular "get a reference" endpoint (`git/ref/{ref}`). The plural
endpoint matches by ref-name *string* prefix, not git tree hierarchy, so
once a release's stable/RC branch exists alongside a longer sibling that
shares its prefix (e.g. `release/6.0.x` next to `release/6.0.x-preview`
or `release/6.0.x-rc.1`, created for an earlier channel of the same
release), GitHub returns a JSON array instead of a single object and
`.get("object", {})` crashes on it. Switched to the singular endpoint
(stripping the leading `refs/` from the ref, as its path requires), and
kept defensive exact-match-by-name handling for the unlikely case a
response still comes back as a list. Added `RefShaTests` covering an
exact match, a 404 (missing ref), and a prefix-list payload both with
and without an exact match present.
2. High: the `operations[].status` enum in the prepare-plan schema was
missing `"awaiting-user"`, even though `plan_stable_bump` emits exactly
that status for the `open-stable-bump-pr` operation once a bump PR is
already open, and `_prepare_next_action` maps it to `nextAction:
"await-merge"`. Since `write_plan` schema-validates every plan before
writing it, `prepare plan` would raise `ValidationError` and hard-fail
the instant a stable release's bump PR was already open -- the
`stableBump.status` enum (a separate field) already allowed the value,
masking the gap in ad hoc unit tests that build the in-memory dict
directly without going through `write_plan`. Added `"awaiting-user"` to
the `operations[].status` enum and extended the existing
`test_apply_stable_release_returns_await_merge_while_bump_pr_is_open`
regression to round-trip both the pending and awaiting-user plans
through `release_common.write_plan` (the actual boundary that enforces
the schema), confirming it fails without the fix and passes with it.
3. Medium: `finish plan-publication` and `finish publish` open-coded a
strict `existing.target_commitish == plan["receipt"]["sourceCommit"]`
equality check, contradicting `check_release_conflict`'s deliberate
tolerance (added for the real, already-published `v4.151.1` release,
whose `target_commitish` is the legacy branch name `"main"`) for an
already-*published* release once its tag is independently verified.
Extracted the shared rule into a new
`release_github.target_commitish_conflicts(existing, expected_target)`:
drafts remain strict (any disagreement conflicts); a published release's
target_commitish is only compared strictly when it is itself a full
40-hex SHA, otherwise (a legacy branch name) it is tolerated since the
tag is authoritative. `check_release_conflict` now calls this helper
instead of its own inline copy of the same logic, and both
`plan_publication`'s draft-target check and `publish`'s
already-published short-circuit now call it too. Added
`TargetCommitishConflictTests` in `test_release_github.py` covering the
helper directly, and `test_plan_publication_tolerates_published_release_
with_legacy_branch_target`, `test_publish_tolerates_already_published_
release_with_legacy_branch_target`, and
`test_publish_still_rejects_already_published_release_with_a_different_
exact_sha` in `test_release_finish.py` exercising the tolerance and its
boundary through the actual `plan_publication`/`publish` entry points.
Full suite: `cd scripts/infra/release && python3 -m pytest tests/ -q`
-> 406 passed (up from 394; +12 new/extended regression tests).
Co-authored-by: Copilot <[email protected]>
Publish normal GitHub-generated release notes from Finish, remove marker ownership from PowerShell, and let the summary updater add managed regions around the preserved release body when reviewed prose is available. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
Remove unused release metadata, share one reconciliation apply loop, de-duplicate linked issues, and normalize GitHub milestone dates in UTC for reliable local and CI behavior. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
Pass the explicit push input when Finish triggers the simplified Issue Template Versions workflow after a stable release. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
Adopt unmarked published releases, validate exact shipment metadata from tags, and document the final repository-owned summary flow. Co-authored-by: Copilot App <[email protected]>
Remove the reviewed GitHub Release summary implementation from this publishing PR now that PR #4895 owns the complete independent feature. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
Remove the optional public-package smoke-testing implementation from this publishing PR and narrow its test workflow to the release skills it owns. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
Make the publishing workflow the second native stack layer without changing its review scope. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
Keep this stack layer focused on Prepare, Finish, and issue-template publishing automation. Preserve milestone maintenance for a dedicated follow-up and move independent pipeline/feed alignment to its own main-based PR. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac29ebee-ee4d-4e73-98ff-d3bb79b07281
|
Suggested squash/merge commit message: |
[release] Add reviewed GitHub Release summaries (#4895) Context: #4889 Add an exact-shipment layer to release-note generation so reviewed prose can converge on each tagged GitHub Release without delaying publication or requiring publishing automation to prepare body markers. Keep Markdown structure, links, contributor credit, marker ownership, and writes deterministic; the release-notes agent supplies only short reviewed prose. ~~ Exact shipment facts ~~ Bump release data to format 4 and record one shipment for every strict preview, RC, stable, or hotfix tag whose core version matches a released page. Derive the core/public versions, channel, label, target commit, date, previous tag in global release order, exact compare URL, and PR delta from repository facts. Ignore decorative legacy tags instead of classifying them, fail loudly on inconsistent committed data, and accept two-part Arcade prerelease build revisions such as `-rc.1.26426.14` alongside single-part revisions. The generator now requires Python 3.10 or later. Broad convergence skips data from older formats, while an explicit request for one of those tags fails with regeneration guidance. Split strict data equality from website-content equality. Shipment-only additions, removals, and changes now rewrite `data.json` without discarding reviewed website prose or requesting another polish pass. Website-facing fact changes still invalidate prose, while `--force` requests polish without discarding prose for fully unchanged pages. This prevents a new tag from being skipped when its shipment is the only changed fact. Regression coverage exercises exact tag ordering, tag-derived metadata and changelog endpoints, falsey non-array rejection, and shipment-only writes. ~~ Reviewed prose and deterministic rendering ~~ Add optional `release_summaries` prose keyed by exact shipment tag. An omitted entry remains ineligible until its reviewed headline and optional body are ready, allowing tags to converge independently. Point the release-notes skill and the `update-release-notes` agentic workflow at the new slot, with the downstream updater rather than the website renderer owning its safety checks and application; regenerate the compiled lock file to match. Render the shipment label, vetted contributor handles, and deterministic NuGet, website release-notes, and exact changelog links outside agent-authored prose. Reject code fences, managed sentinels, raw HTML comments, security claims, placeholders, structural openers, unknown fields, and overlong prose before a release write can begin. Drop contributor logins that are not syntactically valid GitHub handles from the credits line. Regression coverage exercises each rejection rule, login filtering, and deterministic link and credit rendering. ~~ Published Release convergence ~~ Add a classic workflow for scoped main pushes, published-release events, and manual dispatches. Release and manual events read reviewed facts from trusted `main`; the workflow does not create, tag, or publish releases. Own the four body markers and a minimal GitHub REST client in Python, with no `gh` CLI dependency. The first reviewed update adopts an unmarked published Release by wrapping and preserving its existing GitHub-generated body; later updates replace only the managed summary region. This lets publishing create an ordinary GitHub-generated Release without sharing the marker contract. Missing releases and unpublished drafts are skipped, and an already-current body is left untouched. Preflight the full candidate batch, then re-read every planned body before the first PATCH because the REST API offers no conditional body update. Abort before any write when validation fails or a concurrent edit is detected, and re-read each updated Release to require the stored body to match exactly. Regression coverage exercises adoption, generated-body preservation, draft convergence, idempotence, race detection, unsafe-batch rejection, and failed write verification. Document the format-4 shipments field, package layout, and updater preflight, race-barrier, and verification flow in the release-notes development guide. Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot App <[email protected]>
[release] Move milestone maintenance to PowerShell (#4908) Requires: #4889 Replace the skill-local Python implementation with repository-owned PowerShell entry points and a thin dispatch workflow. Keep release assignment reconciliation separate from schedule advancement, and make both operations read-only unless a maintainer explicitly supplies `-Push`. ~~ Shipped release assignments ~~ Release assignments need to follow the release where a change actually shipped, rather than the first branch on which it was planned. The reconciler orders the release branches for one numeric line, accepts only exact public tags as shipped boundaries, and rolls an unshipped preview or RC forward to the next shipped milestone. It finds the most recent earlier stable tag, compares each shipped tag from its merge base, and reads first-parent subjects ending in `(#N)`. GitHub closing references and closing keywords in the pull request body add linked issues. Missing tags, boundaries, or milestones remain warnings in a dry run and become hard blockers with `-Push`, so incomplete release evidence cannot write assignments. Every mutation uses the shared guarded GitHub helper and is verified after a push. A live read-only run for 4.151.0 identified #4480 for 4.151.0-rc.1 and found 103 assignments already correct without changing GitHub state. ~~ Milestone schedule and closure ~~ Milestone dates need to stay aligned with Chromium while shipped milestones must not close over unfinished work. The updater reads the repository major and Skia milestone, maps the six Chromium schedule fields to preview.1, preview.2, RC, and stable dates and descriptions, and maintains three milestone cycles by default. Missing historical entries more than 30 days past due are not recreated. An open milestone is eligible for closure only when its exact release tag exists. Open work moves to the next unshipped open or planned milestone; a missing destination blocks closure. Push mode synchronizes milestone metadata first, verifies each move, waits for the old milestone to empty, rejects newly arrived items, then closes the milestone and verifies its final state. The dispatch validates its selected operations, requires a version for reconciliation, serializes milestone runs, and leaves push disabled by default. The release-tooling gate parses every publishing script, validates entry-point help, and runs 69 publishing plus 25 focused milestone checks. A live read-only schedule run planned no creates, updates, or closures. Co-authored-by: Copilot App <[email protected]>
[release] Move milestone maintenance to PowerShell (#4908) Requires: #4889 Replace the skill-local Python implementation with repository-owned PowerShell entry points and a thin dispatch workflow. Keep release assignment reconciliation separate from schedule advancement, and make both operations read-only unless a maintainer explicitly supplies `-Push`. ~~ Shipped release assignments ~~ Release assignments need to follow the release where a change actually shipped, rather than the first branch on which it was planned. The reconciler orders the release branches for one numeric line, accepts only exact public tags as shipped boundaries, and rolls an unshipped preview or RC forward to the next shipped milestone. It finds the most recent earlier stable tag, compares each shipped tag from its merge base, and reads first-parent subjects ending in `(#N)`. GitHub closing references and closing keywords in the pull request body add linked issues. Missing tags, boundaries, or milestones remain warnings in a dry run and become hard blockers with `-Push`, so incomplete release evidence cannot write assignments. Every mutation uses the shared guarded GitHub helper and is verified after a push. A live read-only run for 4.151.0 identified #4480 for 4.151.0-rc.1 and found 103 assignments already correct without changing GitHub state. ~~ Milestone schedule and closure ~~ Milestone dates need to stay aligned with Chromium while shipped milestones must not close over unfinished work. The updater reads the repository major and Skia milestone, maps the six Chromium schedule fields to preview.1, preview.2, RC, and stable dates and descriptions, and maintains three milestone cycles by default. Missing historical entries more than 30 days past due are not recreated. An open milestone is eligible for closure only when its exact release tag exists. Open work moves to the next unshipped open or planned milestone; a missing destination blocks closure. Push mode synchronizes milestone metadata first, verifies each move, waits for the old milestone to empty, rejects newly arrived items, then closes the milestone and verifies its final state. The dispatch validates its selected operations, requires a version for reconciliation, serializes milestone runs, and leaves push disabled by default. The release-tooling gate parses every publishing script, validates entry-point help, and runs 69 publishing plus 25 focused milestone checks. A live read-only schedule run planned no creates, updates, or closures. Co-authored-by: Copilot App <[email protected]>
[release] Resolve BAR packages for release approval (#4907) Context: #4889 Context: appium/appium-mac2-driver#411 Make release testing the human approval gate between a completed Build/Tests BAR and team publication. Bind the test plan to one immutable package family, propagate its exact source through the platform matrix, and report approval without publishing packages or changing BAR state. ~~ BAR package identity ~~ The previous planner depended on the removed release-status handoff and a global preview feed. A package version is not enough to identify a release candidate because multiple BARs can produce the same version on separate Darc feeds. Take the exact SkiaSharp package version and resolve its producing build with `darc get-asset`. Require `--bar-id` when the result is ambiguous and reject already released builds, incomplete source metadata, and BARs without exactly one NuGet location. Resolve that location through its single `PackageBaseAddress` resource to obtain the build-specific GUID feed. Download SkiaSharp and SkiaSharp.HarfBuzz from that feed, derive the bridge's one concrete HarfBuzzSharp dependency, and download it from the same source. Require each archive to contain one nuspec with its exact ID, version, branch, and 40-character commit. The three packages must agree on branch and commit, and the SkiaSharp metadata must match the selected BAR. Typed Darc and NuGet adapters isolate command, feed, and package parsing from matrix construction. ~~ Exact restore source ~~ Put the selected SkiaSharp version, HarfBuzzSharp version, and GUID feed in every generated runner command. The integration project requires those values, uses the BAR feed plus dotnet-public for restore, and passes the feed into the test runtime. Generated console, Blazor, MAUI, and Linux Docker projects write the same source pair instead of using the global EAP feed and NuGet.org. This prevents another build's copy of the same package version from satisfying a restore. Tests round-trip each planned command through its runner parser and verify that the checked-in integration sources propagate the BAR feed to root and generated projects. ~~ Approval workflow ~~ Keep pipeline and package responsibilities separate. The release owner first confirms that Build and Tests succeeded and that Tests consumed the selected Build resource; the planner then verifies BAR and package identity. The skill requires approval of the exact host matrix before preparation, executes all selected items while collecting independent failures, preserves artifacts and retries, combines cross-host reports, and treats missing required coverage as blocking unless the owner records an override. Planning remains read-only. A guarded PowerShell preparation script restores repository tools and clears only `output/logs/testlogs/integration` after approval. Python remains the runner runtime so subprocess heartbeats, command round-tripping, interrupts, and temporary-device cleanup share one testable implementation. The planner emits only the release, host, matrix, missing coverage, and package-source data consumed by the runbook. Release-tooling CI now covers the skill scripts, preparation guard, and integration harness. The workflow never queues release pipelines, publishes packages, changes BAR state, creates tags or releases, or merges code. ~~ Automation compatibility and ownership ~~ Treat Appium and its platform drivers as minimum-version prerequisites rather than exact pins, accepting stable compatible updates while rejecting missing, older, and prerelease versions. Both prerequisite validation and the test fixture invoke `npm exec --no -- appium` from the repository root. This follows Appium's project-local and Extension CLI resolution rules without downloading software or depending on an extension's filesystem path. Mac2 4.1.1 is the minimum because upstream PR #411 added Xcode 27 support. Remove the process-local Xcode 26 selection workaround while retaining the generated MAUI build's workload-version override. Without `--device-id`, Android creates a uniquely named release-owned AVD on the next free supported emulator port, leaves existing devices untouched, and deletes only that AVD. Explicit `--device-id` is the only reuse path and never deletes the selected device. iOS continues to create a fresh simulator and falls back to its unique name for cleanup when creation returns no UDID. Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot App <[email protected]> Copilot-Session: bf377a3e-d82e-4169-a3ea-7062901896c7
[infra] Align release ecosystem references with dnceng (#4910) Context: #4803 Context: #4889 Context: #4907 Context: 086f728 Context: https://github.com/mono/SkiaSharp/actions/runs/33565525986 Build on #4907's merged BAR-specific approval implementation with the current dnceng observer and shared-feed model. Keep the shared channel destinations for ordinary CI and nightly consumers distinct from the selected BAR asset's GUID-backed per-build feed; NuGet.org remains a later team publication step. The dnceng observer state and the versioning, shared.cake, and building-samples feed URLs were extracted from #4889 before that merged PR dropped these paths. The pinned commit above is that stack's last state before the drop; its tree still holds those files at this revision, apart from three building-samples naming lines refreshed here. Its own diff covers unrelated release-notes work. The README, benchmark/perf, writing-docs, and repository release-framing updates are new here. ~~ dnceng pipeline observers ~~ Since #4803 moved release builds to dnceng, the DevDiv Native -> Managed -> Tests definitions no longer describe them and ci-status reported a chain that no longer runs. Query the `mono-SkiaSharp` validation definition 345 in `dnceng-public/public` alongside skiasharp-package 1642 and skiasharp-tests 1630 in `dnceng/internal`. The cascade model becomes Build -> Tests: because 1642 owns native and managed work in one run, treat a red Tests run as a cascade only when the exact Build run it consumed also failed, rather than inferring the relationship from position in a three-stage chain. Query Component Governance from skiasharp-package alone because that combined Build owns native and managed assets, signing, API Scan, and BAR registration. Drop the now-meaningless `--pipeline native|managed|both` selector, reject an explicit security-audit build whose definition is not 1642, and point report examples and the viewer at the dnceng/internal CG registration and Build. With #4889 removing release-status, route build-progress and chain-tracing questions to ci-status, and package-readiness checks to a release-publish dry run. Skill metadata, representative report validators, Python compilation, and JSON/XML parsing passed. Build-cache dependency validation covered 4,800 tracked files with none uncovered. * `SkiaSharp-Tests` in `scripts/infra/tests/tests-apple.cake` remains a simulator instance name, not a stale pipeline reference. ~~ Shared channels and BAR-specific approval ~~ The old skiasharp-transport service index returns HTTP 404, while the `aka.ms/skiasharp-eap` alias resolves to the old skiasharp feed and does not expose current nightlies. Point wrapper downloads and documentation at dotnet-libraries-transport, document both shared destinations in versioning, and point README, benchmark, and size-tracking sources at dotnet-libraries. The merged #4907 implementation asks Maestro which BAR produced the selected version, then resolves that BAR asset's GUID-backed V3 and flat-container feed through Darc. Its planner downloads SkiaSharp, SkiaSharp.HarfBuzz, and the derived HarfBuzzSharp dependency from that exact feed, requires matching source branch and commit, and pins the same feed in every runner command, with dependencies from dotnet-public. Keep #4907's integration root, project, and generated-config propagation inherited from main and outside this PR's direct diff. In `documentation/dev/releasing.md` record that Arcade routes `IsShipping=true` packages to dotnet-libraries and `IsShipping=false` build inputs to dotnet-libraries-transport, then draw the shared-channel versus per-build BAR feed boundary. Because #4907 merged only implementation and integration files, this layer renders the complete operator flow in `documentation/dev/releasing.md`. It also replaces the three stale public-smoke references in `AGENTS.md` and the release skill descriptions in the AI index with pre-publication BAR package approval guidance. The guide records that release-testing physically smoke-tests the exact selected CI artifacts on the approved host/device targets and excludes NuGet.org from planner and runner sources, while the AI index explains that repository-owned workflows and PowerShell scripts perform release mutations and the skills remain thin guidance and observation layers. The release-testing contract inherited from #4907 governs the gate: failed required coverage blocks human release approval, but release-testing never publishes packages or changes BAR state, and only after approval does the team publish the selected BAR to NuGet.org. The live planner resolved SkiaSharp 4.150.3 through BAR 329644 to GUID feed 8bf0dc6d-5564-4f8e-8ff2-8167b63c6306 and matched all three anchors to source commit f8a404f. Both shared feed indexes returned HTTP 200, all 38 Python tests and the guarded PowerShell suite passed, and GUID-feed restore passed all three SmokeTests with HarfBuzzSharp 14.2.1.3. End-to-end transport validation also passed. Externals-download fetched 18 wrappers and produced 462 native files (3.2 GB); docs-download-output fetched four wrappers and produced 41 NuGet packages (570 MB). The linked benchmark run completed successfully with all 20 jobs passing on this exact head. * `scripts/infra/package/manage-nuget-feed.ps1` retains the dedicated skiasharp and skiasharp-transport destinations. It exists to migrate historical xamarin feeds and is run manually for that purpose; repointing it at shared feeds would change the migration's meaning. * #4907's checked-in fallback config retains the old skiasharp feed name, but approval runs override restore sources and generated configs with the resolved GUID feed. Those files are inherited from main and remain outside this PR. Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot App <[email protected]>
[skills] Close pr-commit-message gaps found in release reviews (#4912) Context: #4889 Context: #4895 Context: #4907 Context: #4908 Context: #4910 Turn corrections from five completed release-message reviews into durable pr-commit-message rules, then replace conclusion-led evals with cases that exercise those decisions. Keep #4908 as an unchanged reviewed-message control; it is distinct from the synthetic compact-message eval fixture. ~~ Durable topic boundaries ~~ The #4889 draft distributed shared command-safety guarantees among consumer sections and under-described the deleted release-status runtime. Treat a shared guard, mechanism, or contract as its own topic when its consumers do not own its guarantee. A removal remains with its parent topic, but must preserve the departing component's name, the behavior that left, and its new home. Name sections for the problem or decision rather than a component, lead the overview with the governing design, and require sibling sections to carry comparable evidence. This preserves both the shared safety contract corrected in #4889 and the regression-coverage sentence restored to #4895. ~~ Immediate dependency relationships ~~ The #4907 and #4910 drafts labelled an earlier stack ancestor as required even though each change built on a nearer parent. Define `Requires:` as the immediate companion or dependency that must land first; earlier ancestors provide `Context:` instead. Candidate references still have to be opened and classified by their actual entity and relationship before they are included. ~~ Complete and current evidence scopes ~~ The #4889 review disproved "every workflow is one manual job" because the sampled family also contained scheduled and CI-only workflows. Require a family to be enumerated along the generalized dimension, and narrow a quantified claim when any member is a counterexample. State coverage in the predicates that tests or guards actually assert rather than the broader capability they suggest. Re-read counts and measurements at the current head so later pushes cannot leave a once-correct number in the message; #4910's tracked-file and nightly figures both changed during review. ~~ Configuration and migration intent ~~ Add configuration or policy splits and removals to the change-specific content rules. Each configuration must identify its context, value, and reason for remaining different, while a migration must identify the removed component and where its responsibility moved. This records #4910's build-feed versus public-package boundary instead of inviting a future maintainer to unify the sources and invalidate publication verification. ~~ Concrete guarantees and lasting rationale ~~ Replace safety adjectives with the operation that cannot occur and the neighboring system it cannot affect. That distinction preserves #4895's marker ownership and #4907's rule that release testing neither publishes packages nor changes BAR state. Keep durable limitations, but discard scope-negotiation phrases such as "excluded by request" or "out of scope for review size". Those phrases describe development chronology and stop being true when a follow-up lands, as the #4910 review demonstrated. ~~ Facts that share a role word ~~ Three drafts of this PR joined two true facts into a false relationship because both objects were called a control. #4908 is the prior release-message review that needed no correction; `control-single-topic-compact` is a synthetic eval for an unrelated design-time-detection change. Extend the mixed-truth check to distinguish objects called control, baseline, fixture, or config before joining clauses about them. A rerun then kept the two controls separate while preserving the other fifteen ground-truth checks. ~~ Source-backed, copy-ready attribution ~~ Two eval runs found output defects independent of message prose: one invented a Copilot noreply trailer without evidence, and another placed a valid trailer outside the fence where it would not be copied into the commit. Accept an email only from relevant commit authors, co-author trailers, or a non-null user email; house-style trailers are not evidence. Put every verified trailer inside the fenced commit message after a blank line. Only a missing-context notice for a contributing human whose email cannot be verified remains outside the fence. ~~ Evals that discriminate judgement ~~ The original eval pass scored 33/35 for the revision and 32/35 for the baseline, inside run-to-run noise. Its prompts supplied conclusions, numbered notes gave away topic counts, and one assertion hard-coded a section count; both graders identified the assertions as non-discriminating. Replace those cases with seven raw-evidence scenarios containing the stale claims that caused the real review corrections: a contradicted workflow universal, the wrong stack dependency, an unsafe configuration unification, stale measurements, shared guarantees, attribution evidence, and a compact single-topic control. The rebuilt suite scored 39/41 for the revised skill and 36/41 for the baseline, with no case regressing and wins on immediate dependencies, shared-mechanism placement, and concrete safety claims. The universal and coverage rules were already handled by both configurations, so they remain defensive rules rather than measured wins. Trailer-sensitive reruns passed every assertion after the output-contract fixes. Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot App <[email protected]>
Description
Moves branch preparation, public release finalization, and issue-template
version maintenance into repository-owned PowerShell scripts with thin GitHub
workflows. Internal builds, tests, signing, BAR promotion, and NuGet.org
publication remain owned by the team pipeline.
apply, and remotepushmodes for matching SkiaSharp and
mono/skiarelease branches, includingcoupled SkiaSharp/HarfBuzzSharp versions and guarded stable/hotfix handling.
creates the immutable tag, publishes a normal GitHub-generated Release, and
dispatches convergent follow-up workflows when
pushis selected.from published Releases in read-only, local
apply, or automation-branchpushmode; scheduled runs usepush.retries, dry-run reporting, and mutation verification.
release-status skill are removed; the remaining skills forward maintainers
to the repository-owned workflows and scripts.
This is layer 2 of native stack #4909. Reviewed GitHub Release summaries are
owned by #4895 below it. Milestone maintenance (#4908), optional public-package
smoke testing (#4907), and dnceng observer/feed alignment (#4910) follow above
it.
Related issues
Requires #4895.
Followed by #4908, #4907, and #4910.
Required skia PR
None.
Areas affected
binding/)externals/skia/src/c,include/c)milestone bump, ...)
Changes
None - release automation and contributor workflow only; no public API or
runtime behavior changes.
Testing
4.152.0-rc.1and hotfix release states
issue-template writes were performed
Checklist
Changesabove lists all public API and behavioral changes (None)