From 60129215837633dc0c1032909eedb987ac891010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ren=C3=A9=20White=20Enciso?= Date: Sun, 22 Feb 2026 01:30:02 -0600 Subject: [PATCH] feat(stage3): scaffold task-001 baseline - WHY: establish Stage 3 task-001 execution baseline per repo intent - WHAT: add minimal solution/project skeleton and boundary docs - RULE: apply stage3 execution runtime and repository workflow directives --- Thalos.DAL.slnx | 8 ++++++ docs/architecture/thalos-dal-map.puml | 23 +++++++++++++++++ docs/dal/identity-persistence-strategy.md | 12 +++++++++ docs/dal/identity-provider-boundaries.md | 15 +++++++++++ .../Health/IDalDependencyHealthCheck.cs | 8 ++++++ .../Providers/IModuleDataProvider.cs | 8 ++++++ .../Providers/IPermissionDataProvider.cs | 8 ++++++ src/Thalos.DAL/Providers/IRoleDataProvider.cs | 8 ++++++ .../Providers/ITenantDataProvider.cs | 8 ++++++ src/Thalos.DAL/Providers/IUserDataProvider.cs | 8 ++++++ .../Repositories/IIdentityRepository.cs | 8 ++++++ src/Thalos.DAL/Thalos.DAL.csproj | 7 ++++++ .../BoundaryShapeTests.cs | 25 +++++++++++++++++++ .../Thalos.DAL.UnitTests.csproj | 20 +++++++++++++++ 14 files changed, 166 insertions(+) create mode 100644 Thalos.DAL.slnx create mode 100644 docs/architecture/thalos-dal-map.puml create mode 100644 docs/dal/identity-persistence-strategy.md create mode 100644 docs/dal/identity-provider-boundaries.md create mode 100644 src/Thalos.DAL/Health/IDalDependencyHealthCheck.cs create mode 100644 src/Thalos.DAL/Providers/IModuleDataProvider.cs create mode 100644 src/Thalos.DAL/Providers/IPermissionDataProvider.cs create mode 100644 src/Thalos.DAL/Providers/IRoleDataProvider.cs create mode 100644 src/Thalos.DAL/Providers/ITenantDataProvider.cs create mode 100644 src/Thalos.DAL/Providers/IUserDataProvider.cs create mode 100644 src/Thalos.DAL/Repositories/IIdentityRepository.cs create mode 100644 src/Thalos.DAL/Thalos.DAL.csproj create mode 100644 tests/Thalos.DAL.UnitTests/BoundaryShapeTests.cs create mode 100644 tests/Thalos.DAL.UnitTests/Thalos.DAL.UnitTests.csproj diff --git a/Thalos.DAL.slnx b/Thalos.DAL.slnx new file mode 100644 index 0000000..05290cb --- /dev/null +++ b/Thalos.DAL.slnx @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/architecture/thalos-dal-map.puml b/docs/architecture/thalos-dal-map.puml new file mode 100644 index 0000000..e7060de --- /dev/null +++ b/docs/architecture/thalos-dal-map.puml @@ -0,0 +1,23 @@ +@startuml +skinparam packageStyle rectangle + +package "thalos-dal" { + interface IUserDataProvider + interface IRoleDataProvider + interface IPermissionDataProvider + interface IModuleDataProvider + interface ITenantDataProvider + interface IIdentityRepository + interface IDalDependencyHealthCheck + + IIdentityRepository --> IUserDataProvider + IIdentityRepository --> IRoleDataProvider + IIdentityRepository --> IPermissionDataProvider + IIdentityRepository --> IModuleDataProvider + IIdentityRepository --> ITenantDataProvider + IIdentityRepository --> IDalDependencyHealthCheck +} + +package "thalos-service" as ThalosService +ThalosService --> IIdentityRepository +@enduml diff --git a/docs/dal/identity-persistence-strategy.md b/docs/dal/identity-persistence-strategy.md new file mode 100644 index 0000000..38f96d5 --- /dev/null +++ b/docs/dal/identity-persistence-strategy.md @@ -0,0 +1,12 @@ +# Identity Persistence Strategy + +## Strategy + +- DAL repository boundaries coordinate identity aggregate persistence operations. +- Dependency health checks are defined inside DAL boundaries. +- Storage and cache dependencies are modeled in DAL-owned contracts. + +## Constraints + +- Identity persistence concerns do not leak to non-Thalos repositories. +- Service layer consumes DAL boundaries without owning persistence details. diff --git a/docs/dal/identity-provider-boundaries.md b/docs/dal/identity-provider-boundaries.md new file mode 100644 index 0000000..717246f --- /dev/null +++ b/docs/dal/identity-provider-boundaries.md @@ -0,0 +1,15 @@ +# Identity Provider Boundaries + +## Ownership + +- `IUserDataProvider`: user aggregate persistence provider boundary. +- `IRoleDataProvider`: role aggregate persistence provider boundary. +- `IPermissionDataProvider`: permission aggregate provider boundary. +- `IModuleDataProvider`: module aggregate provider boundary. +- `ITenantDataProvider`: tenant aggregate provider boundary. + +## Rules + +- Providers isolate datastore-specific behavior. +- Provider boundaries remain internal to Thalos DAL. +- Identity abstractions remain Thalos-owned. diff --git a/src/Thalos.DAL/Health/IDalDependencyHealthCheck.cs b/src/Thalos.DAL/Health/IDalDependencyHealthCheck.cs new file mode 100644 index 0000000..f2f3606 --- /dev/null +++ b/src/Thalos.DAL/Health/IDalDependencyHealthCheck.cs @@ -0,0 +1,8 @@ +namespace Thalos.DAL.Health; + +/// +/// Defines boundary for DAL dependency health probing. +/// +public interface IDalDependencyHealthCheck +{ +} diff --git a/src/Thalos.DAL/Providers/IModuleDataProvider.cs b/src/Thalos.DAL/Providers/IModuleDataProvider.cs new file mode 100644 index 0000000..60014eb --- /dev/null +++ b/src/Thalos.DAL/Providers/IModuleDataProvider.cs @@ -0,0 +1,8 @@ +namespace Thalos.DAL.Providers; + +/// +/// Defines persistence provider boundary for identity modules. +/// +public interface IModuleDataProvider +{ +} diff --git a/src/Thalos.DAL/Providers/IPermissionDataProvider.cs b/src/Thalos.DAL/Providers/IPermissionDataProvider.cs new file mode 100644 index 0000000..61c9c0b --- /dev/null +++ b/src/Thalos.DAL/Providers/IPermissionDataProvider.cs @@ -0,0 +1,8 @@ +namespace Thalos.DAL.Providers; + +/// +/// Defines persistence provider boundary for identity permissions. +/// +public interface IPermissionDataProvider +{ +} diff --git a/src/Thalos.DAL/Providers/IRoleDataProvider.cs b/src/Thalos.DAL/Providers/IRoleDataProvider.cs new file mode 100644 index 0000000..4910e3e --- /dev/null +++ b/src/Thalos.DAL/Providers/IRoleDataProvider.cs @@ -0,0 +1,8 @@ +namespace Thalos.DAL.Providers; + +/// +/// Defines persistence provider boundary for identity roles. +/// +public interface IRoleDataProvider +{ +} diff --git a/src/Thalos.DAL/Providers/ITenantDataProvider.cs b/src/Thalos.DAL/Providers/ITenantDataProvider.cs new file mode 100644 index 0000000..976f57c --- /dev/null +++ b/src/Thalos.DAL/Providers/ITenantDataProvider.cs @@ -0,0 +1,8 @@ +namespace Thalos.DAL.Providers; + +/// +/// Defines persistence provider boundary for identity tenants. +/// +public interface ITenantDataProvider +{ +} diff --git a/src/Thalos.DAL/Providers/IUserDataProvider.cs b/src/Thalos.DAL/Providers/IUserDataProvider.cs new file mode 100644 index 0000000..5afd2d8 --- /dev/null +++ b/src/Thalos.DAL/Providers/IUserDataProvider.cs @@ -0,0 +1,8 @@ +namespace Thalos.DAL.Providers; + +/// +/// Defines persistence provider boundary for identity users. +/// +public interface IUserDataProvider +{ +} diff --git a/src/Thalos.DAL/Repositories/IIdentityRepository.cs b/src/Thalos.DAL/Repositories/IIdentityRepository.cs new file mode 100644 index 0000000..2b1c317 --- /dev/null +++ b/src/Thalos.DAL/Repositories/IIdentityRepository.cs @@ -0,0 +1,8 @@ +namespace Thalos.DAL.Repositories; + +/// +/// Defines aggregate repository boundary for identity persistence operations. +/// +public interface IIdentityRepository +{ +} diff --git a/src/Thalos.DAL/Thalos.DAL.csproj b/src/Thalos.DAL/Thalos.DAL.csproj new file mode 100644 index 0000000..6c3a887 --- /dev/null +++ b/src/Thalos.DAL/Thalos.DAL.csproj @@ -0,0 +1,7 @@ + + + net10.0 + enable + enable + + diff --git a/tests/Thalos.DAL.UnitTests/BoundaryShapeTests.cs b/tests/Thalos.DAL.UnitTests/BoundaryShapeTests.cs new file mode 100644 index 0000000..21c50dd --- /dev/null +++ b/tests/Thalos.DAL.UnitTests/BoundaryShapeTests.cs @@ -0,0 +1,25 @@ +using Thalos.DAL.Health; +using Thalos.DAL.Providers; +using Thalos.DAL.Repositories; + +namespace Thalos.DAL.UnitTests; + +public class BoundaryShapeTests +{ + [Fact] + public void ProviderBoundaries_WhenReflected_AreInterfaces() + { + Assert.True(typeof(IUserDataProvider).IsInterface); + Assert.True(typeof(IRoleDataProvider).IsInterface); + Assert.True(typeof(IPermissionDataProvider).IsInterface); + Assert.True(typeof(IModuleDataProvider).IsInterface); + Assert.True(typeof(ITenantDataProvider).IsInterface); + } + + [Fact] + public void RepositoryAndHealthBoundaries_WhenReflected_AreInterfaces() + { + Assert.True(typeof(IIdentityRepository).IsInterface); + Assert.True(typeof(IDalDependencyHealthCheck).IsInterface); + } +} diff --git a/tests/Thalos.DAL.UnitTests/Thalos.DAL.UnitTests.csproj b/tests/Thalos.DAL.UnitTests/Thalos.DAL.UnitTests.csproj new file mode 100644 index 0000000..202abae --- /dev/null +++ b/tests/Thalos.DAL.UnitTests/Thalos.DAL.UnitTests.csproj @@ -0,0 +1,20 @@ + + + net10.0 + enable + enable + false + + + + + + + + + + + + + +