Adds bundled plugin trust and cross-platform native deployment

- embeds the append-only historical and deny trust lists in the API and marks matching bundled plugins as Official without blocking loading
- builds and records the current plugin manifest only for official release builds
- deploys the PDF native libraries for the supported Linux, macOS and Windows runtimes from the plugin dependency manifest
- records release hashes by appending only missing entries to master's manifest and rejects any diff that removes a line
- documents the release flow, the supported runtimes and the plugin installer limits
This commit is contained in:
BinaryAlley committed 2026-11-28 18:00:00 +02:00
1 parent 3fb8912c7f
commit b30cbd6b9e
114 files changed
+2708 -243

No files matched your search

@@ -15,16 +15,18 @@ namespace Nemera.Infrastructure.UnitTests.Core.Plugins;
[ExcludeFromCodeCoverage]
public class PluginManagerTests
{
private PluginManager _sut = new([], [], new HashSet<Guid>());
[Fact]
public void GetPlugins_WhenCalled_ShouldReturnAllLoadedPlugins()
{
// Arrange
IPlugin firstPlugin = CreatePlugin(Guid.NewGuid(), "First Plugin");
IPlugin secondPlugin = CreatePlugin(Guid.NewGuid(), "Second Plugin");
PluginManager sut = new([firstPlugin, secondPlugin], []);
_sut = new([firstPlugin, secondPlugin], [], new HashSet<Guid>());
// Act
IReadOnlyList<IPlugin> result = sut.GetPlugins();
IReadOnlyList<IPlugin> result = _sut.GetPlugins();
// Assert
Assert.Equal(2, result.Count);
@@ -36,10 +38,10 @@ public class PluginManagerTests
public void GetPlugins_WhenNoPluginsWereLoaded_ShouldReturnEmptyList()
{
// Arrange
PluginManager sut = new([], []);
_sut = new([], [], new HashSet<Guid>());
// Act
IReadOnlyList<IPlugin> result = sut.GetPlugins();
IReadOnlyList<IPlugin> result = _sut.GetPlugins();
// Assert
Assert.Empty(result);
@@ -51,10 +53,10 @@ public class PluginManagerTests
// Arrange
Guid pluginId = Guid.NewGuid();
IPlugin expectedPlugin = CreatePlugin(pluginId, "Expected Plugin");
PluginManager sut = new([expectedPlugin, CreatePlugin(Guid.NewGuid(), "Other Plugin")], []);
_sut = new([expectedPlugin, CreatePlugin(Guid.NewGuid(), "Other Plugin")], [], new HashSet<Guid>());
// Act
IPlugin? result = sut.GetPlugin(pluginId);
IPlugin? result = _sut.GetPlugin(pluginId);
// Assert
Assert.Same(expectedPlugin, result);
@@ -64,15 +66,43 @@ public class PluginManagerTests
public void GetPlugin_WhenPluginWithIdWasNotLoaded_ShouldReturnNull()
{
// Arrange
PluginManager sut = new([CreatePlugin(Guid.NewGuid(), "Loaded Plugin")], []);
_sut = new([CreatePlugin(Guid.NewGuid(), "Loaded Plugin")], [], new HashSet<Guid>());
// Act
IPlugin? result = sut.GetPlugin(Guid.NewGuid());
IPlugin? result = _sut.GetPlugin(Guid.NewGuid());
// Assert
Assert.Null(result);
}
[Fact]
public void IsOfficial_WhenPluginIsInTheOfficialSet_ShouldReturnTrue()
{
// Arrange
Guid pluginId = Guid.NewGuid();
_sut = new([CreatePlugin(pluginId, "Official Plugin")], [], new HashSet<Guid> { pluginId });
// Act
bool result = _sut.IsOfficial(pluginId);
// Assert
Assert.True(result);
}
[Fact]
public void IsOfficial_WhenPluginIsNotInTheOfficialSet_ShouldReturnFalse()
{
// Arrange
Guid pluginId = Guid.NewGuid();
_sut = new([CreatePlugin(pluginId, "Unofficial Plugin")], [], new HashSet<Guid>());
// Act
bool result = _sut.IsOfficial(pluginId);
// Assert
Assert.False(result);
}
/// <summary>
/// Creates a mocked plugin with the provided identity.
/// </summary>