Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/skills/plugin-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ and retry guarantees. Do not copy its changing component table here.
authorization.
6. Launcher.MQTT now builds a real NuGet payload, declares the launcher-specific
package type, and uses the same feed jobs as server plugins. Preserve its
pinned beta.3 host contracts, private-dependency inventory and extracted
pinned beta.4 host contracts, private-dependency inventory and extracted
package install/loader tests. Follow its README's existing-ZIP upgrade
preparation: the host updater preserves only `Data`, not root settings or
discovery journals. Never replace the published 0.2.0 ZIP/tag.
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<LANCommanderPackageVersion>2.2.0-beta.3</LANCommanderPackageVersion>
<LANCommanderPackageVersion>2.2.0-beta.4</LANCommanderPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="LANCommander.SDK" Version="$(LANCommanderPackageVersion)" />
Expand Down
23 changes: 11 additions & 12 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ replace a published release asset; choose a new version and matching changelog
entry for subsequent changes. Values in the files alone do not mean a version
has been published.

All current components target LANCommander `2.2.0-beta.3`. Server components
All current components target LANCommander `2.2.0-beta.4`. Server components
use the matching published NuGet packages. Launcher.MQTT is source-coupled to
the host and uses the pinned source snapshot in `eng/lancommander-source.json`
(commit `9eefa639a904059c0a03f39e7908332f468828af`). Do not substitute a
(commit `675befe0673c03aded2b45995694661ce454ba95`). Do not substitute a
mutable checkout or invent package adapters for unavailable host contracts.

## Prerequisites and validation
Expand Down Expand Up @@ -94,8 +94,8 @@ runtime exclusions and loader-identity checks.
`version.txt`:

```powershell
git tag -a server-mcp-v0.2.1 -m "Server.Mcp 0.2.1" <reviewed-main-commit>
git push origin server-mcp-v0.2.1
git tag -a server-mcp-v0.2.2 -m "Server.Mcp 0.2.2" <reviewed-main-commit>
git push origin server-mcp-v0.2.2
```

The example is illustrative; check the current version file and release
Expand All @@ -113,7 +113,7 @@ existing tag, component version, and `main` ancestry and then uses the normal
build, release, and feed jobs. Do not move or recreate the tag. For example:

```powershell
gh workflow run release.yml --repo aaronpowell/LANCommander.Community --ref main -f tag=server-mcp-v0.2.1
gh workflow run release.yml --repo aaronpowell/LANCommander.Community --ref main -f tag=server-mcp-v0.2.2
```

For a run that successfully built the package but failed later, pass that run's
Expand Down Expand Up @@ -225,13 +225,12 @@ preserved by the host updater.
Discovery metadata does not establish installability. LANCommander inspects
the single plugin assembly under `lib/<framework>` for its
`[LANCommanderPlugin]` metadata, including `Hosts` and host-version bounds.
The launcher installer was rechecked against current upstream main
[`123ec53`](https://github.com/LANCommander/LANCommander/commit/123ec53a5dd177c2124001ad9f0ce9cb1a6e8acc)
and the released beta.3 source
[`9eefa63`](https://github.com/LANCommander/LANCommander/commit/9eefa639a904059c0a03f39e7908332f468828af).
The beta.3 reader/staging/launcher installer contracts are unchanged in that
comparison; no unverified host upgrade is needed. The launcher remains bounded
to beta.3 until another host version is explicitly validated.
The launcher installer and loader are validated against the released beta.4 source
[`675befe`](https://github.com/LANCommander/LANCommander/commit/675befe0673c03aded2b45995694661ce454ba95).
Its package reader/staging contracts still preserve only `Data`. The launcher
remains bounded to beta.4 until another host version is explicitly validated.
Beta.4 replaces the primary-action flag with `ActionType.Primary`; the MQTT
adapter uses that discriminator while retaining the exactly-one-primary guard.
Earlier upstream discovery research was pinned at commit
[`38f162d`](https://github.com/LANCommander/LANCommander/commit/38f162ddeb2a3db1388cb898c4e6b20c4f4bf95d):
[`PluginPackageTypes.cs`](https://github.com/LANCommander/LANCommander/blob/38f162ddeb2a3db1388cb898c4e6b20c4f4bf95d/LANCommander.SDK/Plugins/PluginPackageTypes.cs),
Expand Down
4 changes: 2 additions & 2 deletions eng/Build-Plugin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if ($Plugin -eq 'Launcher.MQTT') {
[IO.Path]::GetFullPath($env:LANCOMMANDER_SOURCE_ROOT)
}
else {
Join-Path $repositoryRoot '.cache/lancommander-beta3'
Join-Path $repositoryRoot '.cache/lancommander-beta4'
}
& (Join-Path $PSScriptRoot 'Prepare-LANCommanderSource.ps1') -Destination $hostSource | Out-Null
$sourcePin = Get-Content -LiteralPath (Join-Path $PSScriptRoot 'lancommander-source.json') -Raw | ConvertFrom-Json
Expand Down Expand Up @@ -88,7 +88,7 @@ $manifest = [ordered]@{
host = $component.host
minimumHostVersion = $component.minimumHostVersion
maximumHostVersion = $component.maximumHostVersion
lanCommanderPackageVersion = if ($component.hostPackageVersion) { $component.hostPackageVersion } else { '2.2.0-beta.3' }
lanCommanderPackageVersion = if ($component.hostPackageVersion) { $component.hostPackageVersion } else { '2.2.0-beta.4' }
lanCommanderSourceCommit = if ($Plugin -eq 'Launcher.MQTT') { $sourcePin.commit } elseif ($component.hostSourceCommit) { $component.hostSourceCommit } else { $null }
artifactFormat = $component.artifactFormat
asset = Split-Path -Leaf $asset
Expand Down
40 changes: 22 additions & 18 deletions eng/Test-GitHubPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ $ErrorActionPreference = 'Stop'
$repositoryRoot = Split-Path $PSScriptRoot -Parent
Import-Module (Join-Path $PSScriptRoot 'PluginRelease.psm1') -Force
Import-Module (Join-Path $PSScriptRoot 'GitHubPackages.psm1') -Force
$testComponent = @(Get-PluginRegistry | Where-Object key -CEQ 'Server.Mcp')[0]
$testVersion = Get-PluginVersion $testComponent
$testTag = "$($testComponent.tagPrefix)-v$testVersion"
$wrongTag = "$($testComponent.tagPrefix)-v99.99.99"
$testRoot = Join-Path ([IO.Path]::GetTempPath()) "lancommander-github-packages-$([Guid]::NewGuid().ToString('N'))"
New-Item -ItemType Directory -Path $testRoot | Out-Null
$originalGitHubToken = [Environment]::GetEnvironmentVariable('GITHUB_TOKEN', 'Process')
Expand All @@ -13,20 +17,20 @@ function New-TestPackage {
$stream = [IO.File]::Open($Path, [IO.FileMode]::CreateNew)
$archive = [System.IO.Compression.ZipArchive]::new($stream, [System.IO.Compression.ZipArchiveMode]::Create)
try {
$nuspec = @'
$nuspec = @"
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>LANCommander.Community.Server.Mcp</id>
<version>0.2.1</version>
<id>$($testComponent.packageId)</id>
<version>$testVersion</version>
<authors>test</authors>
<description>Test package</description>
<tags>LANCommander plugin server mcp</tags>
<packageTypes><packageType name="LANCommander.Plugin" /><packageType name="LANCommander.Plugin.Server" /></packageTypes>
<repository type="git" url="https://github.com/aaronpowell/LANCommander.Community" />
</metadata>
</package>
'@
"@
foreach ($entryData in @(
@{ name = 'LANCommander.Community.Server.Mcp.nuspec'; value = $nuspec },
@{ name = 'lib/net10.0/payload.dll'; value = $Payload }
Expand Down Expand Up @@ -140,42 +144,42 @@ try {
throw 'Component releases must provide scoped caller permissions, optional NuGet.org secret forwarding, and exact-artifact main-only recovery dispatch.'
}

Assert-ReleaseWorkflowContext -Tag 'server-mcp-v0.2.1' -Repository 'aaronpowell/LANCommander.Community' `
Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'aaronpowell/LANCommander.Community' `
-ExpectedRepository 'aaronpowell/LANCommander.Community' -Actions 'true' `
-EventName 'push' -Ref 'refs/tags/server-mcp-v0.2.1'
Assert-ReleaseWorkflowContext -Tag 'server-mcp-v0.2.1' -Repository 'aaronpowell/LANCommander.Community' `
-EventName 'push' -Ref "refs/tags/$testTag"
Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'aaronpowell/LANCommander.Community' `
-ExpectedRepository 'aaronpowell/LANCommander.Community' -Actions 'true' `
-EventName 'workflow_dispatch' -Ref 'refs/heads/main'
Assert-Fails {
Assert-ReleaseWorkflowContext -Tag 'server-mcp-v0.2.1' -Repository 'aaronpowell/LANCommander.Community' `
Assert-ReleaseWorkflowContext -Tag $testTag -Repository 'aaronpowell/LANCommander.Community' `
-ExpectedRepository 'aaronpowell/LANCommander.Community' -Actions 'true' `
-EventName 'workflow_dispatch' -Ref 'refs/heads/feature'
} 'main-branch recovery dispatch' 'Non-main recovery dispatch'

$artifactDirectory = Join-Path $testRoot 'artifact'
New-Item -ItemType Directory -Path $artifactDirectory | Out-Null
$packageName = 'LANCommander.Community.Server.Mcp.0.2.1.nupkg'
$packageName = "$($testComponent.packageId).$testVersion.nupkg"
$packagePath = Join-Path $artifactDirectory $packageName
New-TestPackage -Path $packagePath
& (Join-Path $PSScriptRoot 'Test-NuGetPackage.ps1') -Plugin Server.Mcp -PackagePath $packagePath -ExpectedVersion '0.2.1' -RequireRepositoryUrl
& (Join-Path $PSScriptRoot 'Test-NuGetPackage.ps1') -Plugin Server.Mcp -PackagePath $packagePath -ExpectedVersion $testVersion -RequireRepositoryUrl
$hash = (Get-FileHash -LiteralPath $packagePath -Algorithm SHA256).Hash.ToLowerInvariant()
Set-Content -LiteralPath "$packagePath.sha256" -Value "$hash $packageName" -NoNewline
[ordered]@{
component = 'Server.Mcp'
version = '0.2.1'
version = $testVersion
host = 'Server'
minimumHostVersion = '2.2.0-beta.3'
minimumHostVersion = '2.2.0-beta.4'
maximumHostVersion = $null
artifactFormat = 'nupkg'
asset = $packageName
sha256 = $hash
sourceCommit = '0000000000000000000000000000000000000000'
} | ConvertTo-Json -Depth 5 | Set-Content -LiteralPath (Join-Path $artifactDirectory 'release-manifest.json')

$disabledOutput = (& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag server-mcp-v0.2.1 -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community 2>&1) -join "`n"
$disabledOutput = (& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community 2>&1) -join "`n"
if ($disabledOutput -notmatch 'publishing is disabled') { throw 'The default GitHub Packages path did not remain disabled.' }

$planOutput = (& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag server-mcp-v0.2.1 -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish -PlanOnly 2>&1) -join "`n"
$planOutput = (& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish -PlanOnly 2>&1) -join "`n"
$planLine = @($planOutput -split "\r?\n" | Where-Object { $_ -match '^\{"component"' }) | Select-Object -Last 1
$plan = $planLine | ConvertFrom-Json
if ($plan.component -cne 'Server.Mcp' -or
Expand All @@ -187,22 +191,22 @@ try {
}
Remove-Item Env:GITHUB_TOKEN -ErrorAction SilentlyContinue
Assert-Fails {
& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag server-mcp-v0.2.1 -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish
& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish
} 'GITHUB_TOKEN is unavailable' 'Missing GitHub Packages credential'
Assert-Fails {
& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag server-mcp-v0.2.2 -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish -PlanOnly
& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $wrongTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish -PlanOnly
} 'does not match' 'Release tag selection'
$manifestPath = Join-Path $artifactDirectory 'release-manifest.json'
$manifestText = Get-Content -LiteralPath $manifestPath -Raw
try {
Set-Content -LiteralPath $manifestPath -Value ($manifestText.Replace('"nupkg"', '"zip"'))
Assert-Fails {
& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag server-mcp-v0.2.1 -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish -PlanOnly
& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner aaronpowell -Repository aaronpowell/LANCommander.Community -Publish -PlanOnly
} 'manifest does not match' 'ZIP artifact rejected by NuGet publisher'
}
finally { Set-Content -LiteralPath $manifestPath -Value $manifestText }
Assert-Fails {
& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag server-mcp-v0.2.1 -ArtifactDirectory $artifactDirectory -Owner someone-else -Repository someone-else/LANCommander.Community -Publish -PlanOnly
& (Join-Path $PSScriptRoot 'Publish-GitHubPackage.ps1') -Plugin Server.Mcp -Tag $testTag -ArtifactDirectory $artifactDirectory -Owner someone-else -Repository someone-else/LANCommander.Community -Publish -PlanOnly
} 'restricted to the canonical' 'Repository/owner guard'

$equivalentPath = Join-Path $testRoot 'equivalent.nupkg'
Expand Down
Loading
Loading