test(installation): require channel-owned file registrations

Mark native tests as published or installed from the actual smoke harness's
verified manifest/channel/update boundary, saving and restoring the marker.
Installed Settings must find this exact executable's expected registration
and enable Default Apps; a missing registration plus disabled button cannot
silently pass. Published fixtures must remain unregistered.

The marker changes no application behavior and creates no registry state.
Windows user selection, Explorer and lifecycle acceptance remain required.

Validation: zero-warning Release, format, 55 script boundary cases and both
script analyzer partitions; actual installed execution pending.
Refs #14

Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
Signed-off-by: James Maes <jmaes@dmdbrands.com>
This commit is contained in:
James MaesandCodex committed 2026-10-11 15:15:12 -05:00
1 parent efe14af2fa
commit dbda6d48da
3 files changed
+37 -1

No files matched your search

+4
View File
@@ -47,6 +47,7 @@ $oldDataDirectory = [Environment]::GetEnvironmentVariable($dataVariable)
$oldDevDataDirectory = [Environment]::GetEnvironmentVariable($devDataVariable)
$oldUiChannel = $env:K22_UITEST_CHANNEL
$oldUiExe = $env:K22_UITEST_EXE
$oldUiInstalled = $env:K22_UITEST_INSTALLED
$versions = @(
@{ channel = 'stable'; version = '0.1.0'; target = '0.4.0' },
@{ channel = 'stable'; version = '0.4.0'; target = $null },
@@ -189,6 +190,7 @@ try
if($loose.Installed -or $loose.AppKitSupported -or $null -ne $loose.Version) { throw 'Loose publish output unexpectedly supports updates.' }
$records.Add(@{ kind = 'loose'; result = $loose })
$env:K22_UITEST_CHANNEL = 'stable'
$env:K22_UITEST_INSTALLED = '0'
$env:K22_UITEST_EXE = Join-Path $buildRoot "publish/0.1.0/$mainExe"
Invoke-SmokeProcess -File 'dotnet' -Arguments @('test', "$repositoryRoot/tests/$name.UiTests", '--no-build', '--logger', 'trx;LogFileName=published-ui.trx', '--results-directory', $outputRoot) -TimeoutSeconds 600
foreach($initial in @($versions[0], $versions[2]))
@@ -244,6 +246,7 @@ try
Stop-SmokeApp -Exe $currentExe -Confirm:$false
$after = Get-SmokeResult -Exe $installedProbe -ResultPath (Join-Path $outputRoot "$channel-after.json")
if($after.Version -ne $initial.target -or $after.Channel -ne $channel -or $null -ne $after.UpdateVersion -or $after.AppKitVersion -ne $initial.target) { throw 'Post-upgrade identity or channel is incorrect.' }
$env:K22_UITEST_INSTALLED = '1'
$env:K22_UITEST_EXE = $currentExe
Invoke-SmokeProcess -File 'dotnet' -Arguments @('test', "$repositoryRoot/tests/$name.UiTests", '--no-build', '--filter', 'FullyQualifiedName!~CheckForUpdates_InALooseBuild', '--logger', "trx;LogFileName=installed-$channel-ui.trx", '--results-directory', $outputRoot) -TimeoutSeconds 600
$records.Add(@{ kind = 'installed'; channel = $channel; before = $before; after = $after; restarted = $true; appSha256 = $installedHash })
@@ -274,4 +277,5 @@ finally
[Environment]::SetEnvironmentVariable($devDataVariable, $oldDevDataDirectory)
$env:K22_UITEST_CHANNEL = $oldUiChannel
$env:K22_UITEST_EXE = $oldUiExe
$env:K22_UITEST_INSTALLED = $oldUiInstalled
}
+22 -1
View File
@@ -2,7 +2,28 @@
Updated: 2026-10-11
## Current full-run variants and queued source repaint - 2026-10-11
## Installed association acceptance boundary - 2026-10-11
The installed harness now supplies a saved/restored test-only installation
marker after its actual manifest/version/channel/update proof, and explicitly
marks the published copy as portable. The native Default file types case must
find this exact installed executable's expected channel registration and an
enabled Windows chooser action. Previously a missing registration and disabled
button could agree and pass the installed test. Portable evidence must instead
show no registration. This marker does not change application behavior, create
registry keys or simulate successful hooks; actual installed execution is still
required. Windows selection/Explorer/update/uninstall acceptance remains#14.
Prior CI38170170551 is terminal: native93/97 and published93/97,4failures,
zero skips. Published8m56s now completes inside the existing600second bound;
its red tests prevent installed outcomes. No deadline was raised. Current native
and published failures include the reproducible pipe bug, initial source colors,
nested outline expansion and physical source focus alignment. Exact evidence:
artifacts/current-installed-9fdfc2d.log and retained installed-update-results.
Locally signed2fe5853/efe14af prepare the tested IPC correction and queued theme
repaint; next exact pushed head must verify these and the association boundary.
## Previous full-run variants and queued source repaint - 2026-10-11
Exact9fdfc2d full native job114560940480 is terminal93/97,4failures,zero
skips (8m59s), despite focused14/15. Retain artifacts/current-native-9fdfc2d.log:
@@ -179,6 +179,17 @@ public partial class AppTests
var dev = new FileTypeRegistration(Microsoft.Win32.Registry.CurrentUser, session.ExePath, "dev");
bool registered = stable.GetDefaultAppsUri(supportsAppPage: true) is not null || dev.GetDefaultAppsUri(supportsAppPage: true) is not null;
Assert.Equal(registered, choose.IsEnabled);
string? installedFixture = Environment.GetEnvironmentVariable("K22_UITEST_INSTALLED");
if(string.Equals(installedFixture, "1", StringComparison.Ordinal))
{
FileTypeRegistration installedRegistration = string.Equals(Environment.GetEnvironmentVariable("K22_UITEST_CHANNEL"), "dev", StringComparison.Ordinal) ? dev : stable;
Assert.NotNull(installedRegistration.GetDefaultAppsUri(supportsAppPage: true));
Assert.True(choose.IsEnabled);
}
else if(string.Equals(installedFixture, "0", StringComparison.Ordinal))
{
Assert.False(registered);
}
if(!registered)
{
Assert.NotNull(session.FindInApp(cf => cf.ByName("Install or repair MarkdownViewr to make it available in Open with and Default Apps. This preview does not change Windows file associations.")));