Compare commits

..

No commits in common. "c23ab0cbdca70e29cadaa5e908ed38c9d2605561" and "c0deed4ce4c19decc4826bbc3fdaa2219dbc78c2" have entirely different histories.

47 changed files with 98 additions and 690 deletions

60
.gitignore vendored
View File

@ -1,23 +1,53 @@
# Repository orchestration folders (local only) # AgileWebs local orchestration
.repo-tasks/
.repo-context/
.tasks/ .tasks/
.agile/ .agile/
# .NET build outputs # Build artifacts
**/bin/ **/[Bb]in/
**/obj/ **/[Oo]bj/
/**/out/
/**/artifacts/
# IDE and editor files
.vs/ .vs/
TestResults/
**/TestResults/
*.user
*.suo
*.rsuser
# IDE
.idea/ .idea/
.vscode/
*.suo
*.user
*.userosscache
*.sln.docstates
*.rsuser
*.swp
*.swo
# Package artifacts # NuGet
*.nupkg *.nupkg
*.snupkg *.snupkg
artifacts/ **/packages/*
!**/packages/build/
# Test output
**/TestResults/
*.trx
*.coverage
*.coveragexml
# Logs
*.log
logs/
# Local environment files
.env
.env.*
!.env.example
# Docker
.docker/
**/.docker/
*.pid
docker-compose.override.yml
docker-compose.*.override.yml
# OS files
.DS_Store
Thumbs.db

View File

@ -1,10 +0,0 @@
<Project>
<PropertyGroup>
<Authors>AgileWebs</Authors>
<Company>AgileWebs</Company>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://gitea.dream-views.com/AgileWebs/blueprint-platform</RepositoryUrl>
<PackageProjectUrl>https://gitea.dream-views.com/AgileWebs/blueprint-platform</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
</PropertyGroup>
</Project>

View File

@ -1,34 +0,0 @@
# Workspace Cross-Repo ProjectReference Guard
## Purpose
Prevent regression of cross-repo source coupling by failing fast when any `.csproj` in `greenfield/` references a project outside its own repository root.
## Script Location
- `tools/validate-no-cross-repo-projectrefs.sh`
## Usage
Run from within `greenfield/blueprint-platform`:
```bash
./tools/validate-no-cross-repo-projectrefs.sh
```
Run from the workspace root:
```bash
greenfield/blueprint-platform/tools/validate-no-cross-repo-projectrefs.sh
```
## Behavior
- Exit code `0`: no cross-repo `ProjectReference` entries found.
- Exit code `1`: one or more violations were found and listed.
## Enforcement Guidance
- Execute this guard before merge to `development`.
- Keep only intra-repo `ProjectReference` entries.
- Use package references for cross-repo consumption.

View File

@ -1,62 +0,0 @@
# Gitea NuGet Feed Validation
## Purpose
Validate that Gitea can be used as the package registry for cross-repo consumption in greenfield.
## Validated Environment
- Date: 2026-02-25
- Gitea URL: `https://gitea.dream-views.com`
- Organization feed: `https://gitea.dream-views.com/api/packages/AgileWebs/nuget/index.json`
- Auth mode: Basic auth using Gitea login + token
## Prerequisites
- `AGILE_GITEA_URL` is set
- `AGILE_GITEA_TOKEN` is set
- Account has package publish permissions in `AgileWebs`
## Required NuGet Source Configuration
Because the current feed is HTTP, source entries must allow insecure connections.
```xml
<packageSources>
<clear />
<add key="gitea-org" value="https://gitea.dream-views.com/api/packages/AgileWebs/nuget/index.json" allowInsecureConnections="true" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<packageSourceCredentials>
<gitea-org>
<add key="Username" value="<gitea-login>" />
<add key="ClearTextPassword" value="<gitea-token>" />
</gitea-org>
</packageSourceCredentials>
```
## Smoke Test Result
The following flow was executed successfully:
1. Create temporary package `AgileWebs.Nuget.Smoke`.
2. Pack and push to org feed.
3. Create clean consumer project.
4. Restore consumer with package from Gitea feed.
Result: **PASS**
## Troubleshooting
- Error: `NuGet requires HTTPS sources`.
- Cause: HTTP feed without insecure override.
- Fix: add `allowInsecureConnections="true"` in `nuget.config`.
- Error: `401 Unauthorized` on push/restore.
- Cause: invalid token or missing package permission.
- Fix: validate token with `GET /api/v1/user` and retry.
## Operational Recommendation
- Keep this setting only while feed is HTTP.
- Move feed to HTTPS to remove insecure source exception.

View File

@ -15,22 +15,3 @@
- Publish packages independently from this repository. - Publish packages independently from this repository.
- Maintain explicit package dependency on `Core.Blueprint.Common` for all feature modules. - Maintain explicit package dependency on `Core.Blueprint.Common` for all feature modules.
- Keep package identifiers stable to protect downstream compatibility. - Keep package identifiers stable to protect downstream compatibility.
- Use Gitea org feed: `https://gitea.dream-views.com/api/packages/AgileWebs/nuget/index.json`.
## Stable Version Matrix
| Package | Stable Version | Published On | Feed |
| --- | --- | --- | --- |
| Core.Blueprint.Common | 0.2.0 | 2026-02-25 | AgileWebs org NuGet feed |
| Core.Blueprint.Logging | 0.2.0 | 2026-02-25 | AgileWebs org NuGet feed |
| Core.Blueprint.Mongo | 0.2.0 | 2026-02-25 | AgileWebs org NuGet feed |
| Core.Blueprint.Redis | 0.2.0 | 2026-02-25 | AgileWebs org NuGet feed |
| Core.Blueprint.SQLServer | 0.2.0 | 2026-02-25 | AgileWebs org NuGet feed |
| Core.Blueprint.Storage | 0.2.0 | 2026-02-25 | AgileWebs org NuGet feed |
| Core.Blueprint.KeyVault | 0.2.0 | 2026-02-25 | AgileWebs org NuGet feed |
## Consumer Notes
- Current feed is HTTP and requires `allowInsecureConnections="true"` in `nuget.config`.
- Blueprint packages currently target `net10.0`; consumers must use compatible target frameworks.
- Feed setup and smoke test steps are documented in `docs/consumption/gitea-nuget-feed-validation.md`.

View File

@ -6,12 +6,6 @@
- Minor: backward-compatible contract additions. - Minor: backward-compatible contract additions.
- Major: breaking contract changes. - Major: breaking contract changes.
## Stable Baseline Policy
- Stable decoupling baseline starts at `0.2.0`.
- All blueprint package outputs in the same release wave must share the same version.
- Breaking changes after baseline require major or minor strategy review before publication.
## Contract Compatibility ## Contract Compatibility
- Module package contracts are represented as descriptors implementing `IBlueprintPackageContract`. - Module package contracts are represented as descriptors implementing `IBlueprintPackageContract`.

View File

@ -0,0 +1,6 @@
namespace Core.Blueprint.Common;
public class Class1
{
}

View File

@ -4,8 +4,4 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="10.0.0" />
</ItemGroup>
</Project> </Project>

View File

@ -1,27 +0,0 @@
using Core.Blueprint.Common.Runtime;
using Core.Blueprint.Common.Runtime.Health;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Diagnostics.HealthChecks;
namespace Core.Blueprint.Common.DependencyInjection;
/// <summary>
/// Registers baseline runtime services for blueprint platform consumers.
/// </summary>
public static class BlueprintRuntimeServiceCollectionExtensions
{
/// <summary>
/// Adds blueprint runtime core services and health checks.
/// </summary>
/// <param name="services">Service collection.</param>
/// <returns>Service collection for fluent chaining.</returns>
public static IServiceCollection AddBlueprintRuntimeCore(this IServiceCollection services)
{
services.TryAddSingleton<IBlueprintSystemClock, BlueprintSystemClock>();
services.TryAddEnumerable(
ServiceDescriptor.Singleton<IHealthCheck, BlueprintRuntimeHealthCheck>());
return services;
}
}

View File

@ -1,24 +0,0 @@
namespace Core.Blueprint.Common.Runtime;
/// <summary>
/// Represents a correlation identifier used for cross-layer request tracing.
/// </summary>
/// <param name="Value">Correlation identifier value.</param>
public readonly record struct BlueprintCorrelationId(string Value)
{
/// <summary>
/// Creates a correlation identifier from incoming value or runtime clock fallback.
/// </summary>
/// <param name="incomingValue">Incoming correlation identifier.</param>
/// <param name="clock">Runtime system clock for fallback generation.</param>
/// <returns>Normalized correlation identifier.</returns>
public static BlueprintCorrelationId Create(string? incomingValue, IBlueprintSystemClock clock)
{
if (!string.IsNullOrWhiteSpace(incomingValue))
{
return new BlueprintCorrelationId(incomingValue.Trim());
}
return new BlueprintCorrelationId($"corr-{clock.UtcNow:yyyyMMddHHmmssfff}");
}
}

View File

@ -1,10 +0,0 @@
namespace Core.Blueprint.Common.Runtime;
/// <summary>
/// Default runtime system clock implementation.
/// </summary>
public sealed class BlueprintSystemClock : IBlueprintSystemClock
{
/// <inheritdoc />
public DateTimeOffset UtcNow => DateTimeOffset.UtcNow;
}

View File

@ -1,28 +0,0 @@
using Microsoft.Extensions.Diagnostics.HealthChecks;
namespace Core.Blueprint.Common.Runtime.Health;
/// <summary>
/// Health check for baseline blueprint runtime dependencies.
/// </summary>
public sealed class BlueprintRuntimeHealthCheck(IBlueprintSystemClock clock) : IHealthCheck
{
/// <summary>
/// Executes runtime health probe.
/// </summary>
/// <param name="context">Health check context.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>Healthy runtime status result.</returns>
public Task<HealthCheckResult> CheckHealthAsync(
HealthCheckContext context,
CancellationToken cancellationToken = default)
{
var data = new Dictionary<string, object>
{
["checkedAtUtc"] = clock.UtcNow,
["component"] = context.Registration.Name
};
return Task.FromResult(HealthCheckResult.Healthy("Blueprint runtime registered.", data));
}
}

View File

@ -1,12 +0,0 @@
namespace Core.Blueprint.Common.Runtime;
/// <summary>
/// Provides transport-neutral UTC time for runtime components.
/// </summary>
public interface IBlueprintSystemClock
{
/// <summary>
/// Gets current UTC timestamp.
/// </summary>
DateTimeOffset UtcNow { get; }
}

View File

@ -0,0 +1,5 @@
namespace Core.Blueprint.KeyVault;
public class Class1
{
}

View File

@ -1,38 +0,0 @@
using Core.Blueprint.Common.DependencyInjection;
using Core.Blueprint.KeyVault.Runtime;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Core.Blueprint.KeyVault.DependencyInjection;
/// <summary>
/// Registers runtime key vault integration defaults for blueprint consumers.
/// </summary>
public static class BlueprintKeyVaultServiceCollectionExtensions
{
/// <summary>
/// Adds key vault runtime settings and baseline runtime services.
/// </summary>
/// <param name="services">Service collection.</param>
/// <param name="vaultName">Target key vault name.</param>
/// <returns>Service collection for fluent chaining.</returns>
public static IServiceCollection AddBlueprintKeyVaultModule(
this IServiceCollection services,
string vaultName = "default-vault")
{
services.AddBlueprintRuntimeCore();
services.TryAddSingleton(new BlueprintKeyVaultRuntimeSettings(ResolveVaultName(vaultName)));
return services;
}
private static string ResolveVaultName(string vaultName)
{
if (!string.IsNullOrWhiteSpace(vaultName))
{
return vaultName;
}
return "default-vault";
}
}

View File

@ -1,7 +0,0 @@
namespace Core.Blueprint.KeyVault.Runtime;
/// <summary>
/// Defines runtime settings for key vault integration helpers.
/// </summary>
/// <param name="VaultName">Target key vault name.</param>
public sealed record BlueprintKeyVaultRuntimeSettings(string VaultName);

View File

@ -0,0 +1,5 @@
namespace Core.Blueprint.Logging;
public class Class1
{
}

View File

@ -1,38 +0,0 @@
using Core.Blueprint.Common.DependencyInjection;
using Core.Blueprint.Logging.Runtime;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Core.Blueprint.Logging.DependencyInjection;
/// <summary>
/// Registers runtime logging defaults for blueprint consumers.
/// </summary>
public static class BlueprintLoggingServiceCollectionExtensions
{
/// <summary>
/// Adds blueprint logging runtime settings and baseline runtime services.
/// </summary>
/// <param name="services">Service collection.</param>
/// <param name="categoryPrefix">Logging category prefix.</param>
/// <returns>Service collection for fluent chaining.</returns>
public static IServiceCollection AddBlueprintLoggingModule(
this IServiceCollection services,
string categoryPrefix = "AgileWebs")
{
services.AddBlueprintRuntimeCore();
services.TryAddSingleton(new BlueprintLoggingRuntimeSettings(ResolveCategoryPrefix(categoryPrefix)));
return services;
}
private static string ResolveCategoryPrefix(string categoryPrefix)
{
if (!string.IsNullOrWhiteSpace(categoryPrefix))
{
return categoryPrefix;
}
return "AgileWebs";
}
}

View File

@ -1,7 +0,0 @@
namespace Core.Blueprint.Logging.Runtime;
/// <summary>
/// Defines runtime settings for blueprint logging defaults.
/// </summary>
/// <param name="CategoryPrefix">Category prefix used by logging pipelines.</param>
public sealed record BlueprintLoggingRuntimeSettings(string CategoryPrefix);

View File

@ -0,0 +1,5 @@
namespace Core.Blueprint.Mongo;
public class Class1
{
}

View File

@ -1,38 +0,0 @@
using Core.Blueprint.Common.DependencyInjection;
using Core.Blueprint.Mongo.Runtime;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Core.Blueprint.Mongo.DependencyInjection;
/// <summary>
/// Registers runtime mongo integration defaults for blueprint consumers.
/// </summary>
public static class BlueprintMongoServiceCollectionExtensions
{
/// <summary>
/// Adds mongo runtime settings and baseline runtime services.
/// </summary>
/// <param name="services">Service collection.</param>
/// <param name="databaseName">Target mongo database name.</param>
/// <returns>Service collection for fluent chaining.</returns>
public static IServiceCollection AddBlueprintMongoModule(
this IServiceCollection services,
string databaseName = "agilewebs")
{
services.AddBlueprintRuntimeCore();
services.TryAddSingleton(new BlueprintMongoRuntimeSettings(ResolveDatabaseName(databaseName)));
return services;
}
private static string ResolveDatabaseName(string databaseName)
{
if (!string.IsNullOrWhiteSpace(databaseName))
{
return databaseName;
}
return "agilewebs";
}
}

View File

@ -1,7 +0,0 @@
namespace Core.Blueprint.Mongo.Runtime;
/// <summary>
/// Defines runtime settings for mongo integration helpers.
/// </summary>
/// <param name="DatabaseName">Target mongo database name.</param>
public sealed record BlueprintMongoRuntimeSettings(string DatabaseName);

View File

@ -0,0 +1,5 @@
namespace Core.Blueprint.Redis;
public class Class1
{
}

View File

@ -1,38 +0,0 @@
using Core.Blueprint.Common.DependencyInjection;
using Core.Blueprint.Redis.Runtime;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Core.Blueprint.Redis.DependencyInjection;
/// <summary>
/// Registers runtime redis integration defaults for blueprint consumers.
/// </summary>
public static class BlueprintRedisServiceCollectionExtensions
{
/// <summary>
/// Adds redis runtime settings and baseline runtime services.
/// </summary>
/// <param name="services">Service collection.</param>
/// <param name="keyPrefix">Redis key prefix.</param>
/// <returns>Service collection for fluent chaining.</returns>
public static IServiceCollection AddBlueprintRedisModule(
this IServiceCollection services,
string keyPrefix = "agilewebs:")
{
services.AddBlueprintRuntimeCore();
services.TryAddSingleton(new BlueprintRedisRuntimeSettings(ResolveKeyPrefix(keyPrefix)));
return services;
}
private static string ResolveKeyPrefix(string keyPrefix)
{
if (!string.IsNullOrWhiteSpace(keyPrefix))
{
return keyPrefix;
}
return "agilewebs:";
}
}

View File

@ -1,7 +0,0 @@
namespace Core.Blueprint.Redis.Runtime;
/// <summary>
/// Defines runtime settings for redis integration helpers.
/// </summary>
/// <param name="KeyPrefix">Redis key prefix used by platform components.</param>
public sealed record BlueprintRedisRuntimeSettings(string KeyPrefix);

View File

@ -0,0 +1,5 @@
namespace Core.Blueprint.SQLServer;
public class Class1
{
}

View File

@ -1,38 +0,0 @@
using Core.Blueprint.Common.DependencyInjection;
using Core.Blueprint.SQLServer.Runtime;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Core.Blueprint.SQLServer.DependencyInjection;
/// <summary>
/// Registers runtime sql server integration defaults for blueprint consumers.
/// </summary>
public static class BlueprintSqlServerServiceCollectionExtensions
{
/// <summary>
/// Adds sql server runtime settings and baseline runtime services.
/// </summary>
/// <param name="services">Service collection.</param>
/// <param name="connectionName">Logical connection name.</param>
/// <returns>Service collection for fluent chaining.</returns>
public static IServiceCollection AddBlueprintSqlServerModule(
this IServiceCollection services,
string connectionName = "DefaultConnection")
{
services.AddBlueprintRuntimeCore();
services.TryAddSingleton(new BlueprintSqlServerRuntimeSettings(ResolveConnectionName(connectionName)));
return services;
}
private static string ResolveConnectionName(string connectionName)
{
if (!string.IsNullOrWhiteSpace(connectionName))
{
return connectionName;
}
return "DefaultConnection";
}
}

View File

@ -1,7 +0,0 @@
namespace Core.Blueprint.SQLServer.Runtime;
/// <summary>
/// Defines runtime settings for sql server integration helpers.
/// </summary>
/// <param name="ConnectionName">Logical connection name used by consumers.</param>
public sealed record BlueprintSqlServerRuntimeSettings(string ConnectionName);

View File

@ -0,0 +1,5 @@
namespace Core.Blueprint.Storage;
public class Class1
{
}

View File

@ -1,38 +0,0 @@
using Core.Blueprint.Common.DependencyInjection;
using Core.Blueprint.Storage.Runtime;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Core.Blueprint.Storage.DependencyInjection;
/// <summary>
/// Registers runtime storage integration defaults for blueprint consumers.
/// </summary>
public static class BlueprintStorageServiceCollectionExtensions
{
/// <summary>
/// Adds storage runtime settings and baseline runtime services.
/// </summary>
/// <param name="services">Service collection.</param>
/// <param name="containerName">Logical storage container name.</param>
/// <returns>Service collection for fluent chaining.</returns>
public static IServiceCollection AddBlueprintStorageModule(
this IServiceCollection services,
string containerName = "default")
{
services.AddBlueprintRuntimeCore();
services.TryAddSingleton(new BlueprintStorageRuntimeSettings(ResolveContainerName(containerName)));
return services;
}
private static string ResolveContainerName(string containerName)
{
if (!string.IsNullOrWhiteSpace(containerName))
{
return containerName;
}
return "default";
}
}

View File

@ -1,7 +0,0 @@
namespace Core.Blueprint.Storage.Runtime;
/// <summary>
/// Defines runtime settings for storage integration helpers.
/// </summary>
/// <param name="ContainerName">Logical storage container name.</param>
public sealed record BlueprintStorageRuntimeSettings(string ContainerName);

View File

@ -1,50 +0,0 @@
using Core.Blueprint.Common.Runtime;
using Core.Blueprint.Common.Runtime.Health;
using Microsoft.Extensions.Diagnostics.HealthChecks;
namespace Core.Blueprint.Common.UnitTests;
public class BlueprintRuntimeTests
{
[Fact]
public void Create_WhenIncomingValueProvided_ReturnsTrimmedCorrelationId()
{
var correlationId = BlueprintCorrelationId.Create(" corr-123 ", new FakeClock());
Assert.Equal("corr-123", correlationId.Value);
}
[Fact]
public void Create_WhenIncomingValueMissing_UsesClockFallback()
{
var correlationId = BlueprintCorrelationId.Create(string.Empty, new FakeClock());
Assert.Equal("corr-20260222120000111", correlationId.Value);
}
[Fact]
public async Task CheckHealthAsync_WhenInvoked_ReturnsHealthyStatus()
{
var clock = new FakeClock();
var healthCheck = new BlueprintRuntimeHealthCheck(clock);
var context = new HealthCheckContext
{
Registration = new HealthCheckRegistration(
"blueprint.runtime",
healthCheck,
failureStatus: null,
tags: [])
};
var result = await healthCheck.CheckHealthAsync(context);
Assert.Equal(HealthStatus.Healthy, result.Status);
Assert.Equal(clock.UtcNow, result.Data["checkedAtUtc"]);
Assert.Equal("blueprint.runtime", result.Data["component"]);
}
private sealed class FakeClock : IBlueprintSystemClock
{
public DateTimeOffset UtcNow => new(2026, 2, 22, 12, 0, 0, 111, TimeSpan.Zero);
}
}

View File

@ -9,7 +9,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" /> <PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" /> <PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />

View File

@ -0,0 +1,10 @@
namespace Core.Blueprint.Common.UnitTests;
public class UnitTest1
{
[Fact]
public void Test1()
{
}
}

View File

@ -7,7 +7,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" /> <PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" /> <PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />

View File

@ -1,21 +1,9 @@
using Core.Blueprint.KeyVault.DependencyInjection;
using Core.Blueprint.KeyVault.Runtime;
using Microsoft.Extensions.DependencyInjection;
namespace Core.Blueprint.KeyVault.UnitTests; namespace Core.Blueprint.KeyVault.UnitTests;
public class UnitTest1 public class UnitTest1
{ {
[Fact] [Fact]
public void AddBlueprintKeyVaultModule_WhenCalled_RegistersRuntimeSettings() public void Test1()
{ {
var services = new ServiceCollection();
services.AddBlueprintKeyVaultModule("agile-vault");
using var provider = services.BuildServiceProvider();
var settings = provider.GetRequiredService<BlueprintKeyVaultRuntimeSettings>();
Assert.Equal("agile-vault", settings.VaultName);
} }
} }

View File

@ -7,7 +7,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" /> <PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" /> <PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />

View File

@ -1,21 +1,9 @@
using Core.Blueprint.Logging.DependencyInjection;
using Core.Blueprint.Logging.Runtime;
using Microsoft.Extensions.DependencyInjection;
namespace Core.Blueprint.Logging.UnitTests; namespace Core.Blueprint.Logging.UnitTests;
public class UnitTest1 public class UnitTest1
{ {
[Fact] [Fact]
public void AddBlueprintLoggingModule_WhenCalled_RegistersRuntimeSettings() public void Test1()
{ {
var services = new ServiceCollection();
services.AddBlueprintLoggingModule("Core");
using var provider = services.BuildServiceProvider();
var settings = provider.GetRequiredService<BlueprintLoggingRuntimeSettings>();
Assert.Equal("Core", settings.CategoryPrefix);
} }
} }

View File

@ -7,7 +7,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" /> <PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" /> <PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />

View File

@ -1,21 +1,9 @@
using Core.Blueprint.Mongo.DependencyInjection;
using Core.Blueprint.Mongo.Runtime;
using Microsoft.Extensions.DependencyInjection;
namespace Core.Blueprint.Mongo.UnitTests; namespace Core.Blueprint.Mongo.UnitTests;
public class UnitTest1 public class UnitTest1
{ {
[Fact] [Fact]
public void AddBlueprintMongoModule_WhenCalled_RegistersRuntimeSettings() public void Test1()
{ {
var services = new ServiceCollection();
services.AddBlueprintMongoModule("catalog-db");
using var provider = services.BuildServiceProvider();
var settings = provider.GetRequiredService<BlueprintMongoRuntimeSettings>();
Assert.Equal("catalog-db", settings.DatabaseName);
} }
} }

View File

@ -7,7 +7,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" /> <PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" /> <PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />

View File

@ -1,21 +1,9 @@
using Core.Blueprint.Redis.DependencyInjection;
using Core.Blueprint.Redis.Runtime;
using Microsoft.Extensions.DependencyInjection;
namespace Core.Blueprint.Redis.UnitTests; namespace Core.Blueprint.Redis.UnitTests;
public class UnitTest1 public class UnitTest1
{ {
[Fact] [Fact]
public void AddBlueprintRedisModule_WhenCalled_RegistersRuntimeSettings() public void Test1()
{ {
var services = new ServiceCollection();
services.AddBlueprintRedisModule("bb:");
using var provider = services.BuildServiceProvider();
var settings = provider.GetRequiredService<BlueprintRedisRuntimeSettings>();
Assert.Equal("bb:", settings.KeyPrefix);
} }
} }

View File

@ -7,7 +7,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" /> <PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" /> <PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />

View File

@ -1,21 +1,9 @@
using Core.Blueprint.SQLServer.DependencyInjection;
using Core.Blueprint.SQLServer.Runtime;
using Microsoft.Extensions.DependencyInjection;
namespace Core.Blueprint.SQLServer.UnitTests; namespace Core.Blueprint.SQLServer.UnitTests;
public class UnitTest1 public class UnitTest1
{ {
[Fact] [Fact]
public void AddBlueprintSqlServerModule_WhenCalled_RegistersRuntimeSettings() public void Test1()
{ {
var services = new ServiceCollection();
services.AddBlueprintSqlServerModule("Primary");
using var provider = services.BuildServiceProvider();
var settings = provider.GetRequiredService<BlueprintSqlServerRuntimeSettings>();
Assert.Equal("Primary", settings.ConnectionName);
} }
} }

View File

@ -7,7 +7,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" /> <PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" /> <PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" /> <PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />

View File

@ -1,21 +1,9 @@
using Core.Blueprint.Storage.DependencyInjection;
using Core.Blueprint.Storage.Runtime;
using Microsoft.Extensions.DependencyInjection;
namespace Core.Blueprint.Storage.UnitTests; namespace Core.Blueprint.Storage.UnitTests;
public class UnitTest1 public class UnitTest1
{ {
[Fact] [Fact]
public void AddBlueprintStorageModule_WhenCalled_RegistersRuntimeSettings() public void Test1()
{ {
var services = new ServiceCollection();
services.AddBlueprintStorageModule("media");
using var provider = services.BuildServiceProvider();
var settings = provider.GetRequiredService<BlueprintStorageRuntimeSettings>();
Assert.Equal("media", settings.ContainerName);
} }
} }

View File

@ -1,33 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
workspace_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
greenfield_root="$workspace_root/greenfield"
python3 - "$greenfield_root" <<'PY'
import pathlib
import re
import sys
greenfield = pathlib.Path(sys.argv[1]).resolve()
violations = []
for csproj in greenfield.rglob("*.csproj"):
text = csproj.read_text(encoding="utf-8")
repo_root = csproj.parents[2].resolve()
for match in re.finditer(r'<ProjectReference\s+Include="([^"]+)"', text):
include = match.group(1).replace("\\", "/")
target = (csproj.parent / include).resolve()
if not str(target).startswith(str(repo_root)):
violations.append((csproj.relative_to(greenfield), include, target))
if violations:
print(f"FAILED: found {len(violations)} cross-repo ProjectReference entries")
for src, include, target in sorted(violations):
if str(target).startswith(str(greenfield)):
target = target.relative_to(greenfield)
print(f"- {src} -> {include} -> {target}")
raise SystemExit(1)
print("PASSED: no cross-repo ProjectReference entries found")
PY