Skip to content

Doc manifest schema process#6280

Open
JohnMcPMS wants to merge 4 commits into
microsoft:masterfrom
JohnMcPMS:doc-manifest-schem-process
Open

Doc manifest schema process#6280
JohnMcPMS wants to merge 4 commits into
microsoft:masterfrom
JohnMcPMS:doc-manifest-schem-process

Conversation

@JohnMcPMS

@JohnMcPMS JohnMcPMS commented Jun 11, 2026

Copy link
Copy Markdown
Member

📖 Description

Includes some human and 🤖 notes for updating the manifest schema files, as well as a script that does most/all of it for you.

🔍 Validation

Tested the script output locally.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner June 11, 2026 19:26
@github-actions

Copy link
Copy Markdown

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

Unrecognized words (6)

fnsm
msb
msh
NNN
nsm
vcx

These words are not needed and should be removed AAD ABCD abi ACL'd AMap Amd appdata ARMNT asan Baz bitmask bluetooth boundparms brk Buf certs cgi CMSG codepage commandline constexpr Cov cswinrt CTL Dbg Dcom decompressor dedupe DEFT devhome Dns dsc ERANGE errcode errmsg errstr filemode Finalizers FULLWIDTH fuzzer GES github Hackathon HINSTANCE hlocal hmac Hyperlink ICONDIR icu idx img inet Intelli iwr JDK LCID lhs LONGLONG LPBYTE LPCWSTR LPDWORD LPSTR LPVOID LPWSTR MAJORVERSION MAXLENGTH maxvalue MDs MINORVERSION mta nlohmann NONAME NOUPDATE NTFS ofile oid oop OPTOUT outfile OUTOFMEMORY PARAMETERMAP pdb PDWORD pid PKCS pkix placeholders positionals posix pscustomobject pseudocode PSHOST publickey qword redirector regexes remoting reparse REQS rhs rowid RTTI runspace runtimes SARL savepoint Scm sid sqlite subdir subkey trimstart ttl typedef uninitialize uninstallation UNMARSHALING userprofile versioned Webserver website wildcards winreg WMI workaround Wpp wsl

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:JohnMcPMS/winget-cli.git repository
on the doc-manifest-schem-process branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.26/apply.pl' |
perl - 'https://github.com/microsoft/winget-cli/actions/runs/27371968482/attempts/1' &&
git commit -m 'Update check-spelling metadata'

Pattern suggestions ✂️ (2)

You could add these patterns to .github/actions/spelling/patterns.txt:

# Automatically suggested patterns

# hit-count: 1 file-count: 1
# assign regex
= /[^*].*?(?:[a-z]{3,}|[A-Z]{3,}|[A-Z][a-z]{2,}).*/[gi]?(?=\W|$)

# hit-count: 1 file-count: 1
# regex choice
\(\?:[^)]+\|[^)]+\)

Alternatively, if a pattern suggestion doesn't make sense for this project, add a # to the beginning of the line in the candidates file with the pattern to stop suggesting it.

Warnings and Notices ⚠️ (2)

See the 📂 files view, the 📜action log, or 📝 job summary for details.

⚠️ Warnings and Notices Count
ℹ️ candidate-pattern 2
⚠️ unexpected-line-ending 2

See ⚠️ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

@florelis florelis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I didn't read the script that closely, but it looks enough like it's good


## Helper script

`Branch-LatestManifestSchema.ps1` (in this directory) automates most of both workflows below.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Branch is not an approved PS verb. If not using an approved verb

the in-flight schema needs to be locked in.

With -BumpVersion:
Reads the target version from src/binver/binver/version.h (MAJOR.MINOR.0) and compares

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we have this script also update version.h?

`ManifestSchemaValidation.cpp`, converting the old top block to an `else if`.
10. Adds a new version constant to `ManifestVersion.cs`.

**Manual steps always required (not automated):**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not also automate this?

Comment on lines +72 to +73
param([string]$Content, [string]$Path)
[System.IO.File]::WriteAllText($Path, $Content, (New-Object System.Text.UTF8Encoding $false))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could use Out-File

$vcxitemsFile = Join-Path $manifestSchemaDir 'ManifestSchema.vcxitems'
$filtersFile = Join-Path $manifestSchemaDir 'ManifestSchema.vcxitems.filters'
$manifestCommonH = Join-Path $RepoRoot 'src\AppInstallerCommonCore\Public\winget\ManifestCommon.h'
$schemaValidationCpp = Join-Path $RepoRoot 'src\AppInstallerCommonCore\Manifest\ManifestSchemaValidation.cpp'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: misaligned

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR documents the WinGet manifest JSON schema versioning/branching process and introduces a PowerShell helper script to automate freezing latest/ schemas into versioned snapshots and (optionally) bumping latest/ to match the binary version.

Changes:

  • Added schemas/JSON/manifests/README.md describing schema directory layout and the two versioning workflows.
  • Added Branch-LatestManifestSchema.ps1 to automate schema branching and source-file updates during version bumps.
  • Added a path-scoped Copilot instructions file for manifest schema versioning guidance.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
schemas/JSON/manifests/README.md Documents schema folder structure, versioning workflows, and required manual steps.
schemas/JSON/manifests/Branch-LatestManifestSchema.ps1 Adds automation for branching latest/ into vX.Y.0/ and optionally bumping schema/version references across source files.
.github/instructions/manifest-schema-versioning.instructions.md Adds path-scoped contributor/agent guidance for the manifest schema versioning process.

Comment on lines +61 to +65
$settings = [System.Xml.XmlWriterSettings]@{
Indent = $true
IndentChars = ' '
Encoding = New-Object System.Text.UTF8Encoding $false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants