Skip to content

feat(audit): improve template tests, repository and audit logs#4

Merged
abdebek merged 2 commits intodevfrom
feat/library-consumer-friction-fixes
Mar 7, 2026
Merged

feat(audit): improve template tests, repository and audit logs#4
abdebek merged 2 commits intodevfrom
feat/library-consumer-friction-fixes

Conversation

@abdebek
Copy link
Copy Markdown
Owner

@abdebek abdebek commented Mar 7, 2026

Summary

  • add missing repository and audit capabilities needed by consuming apps
  • simplify validation usage with shorter package-owned registration methods
  • harden template validation and durable integration test scaffolding for local-feed and Docker-based verification

Target

  • base branch: dev

Changes

  • extend IRepository and EF repository implementations with additional spec-friendly query methods
  • add tenant-aware audit support and tenant query APIs in MinimalCleanArch.Audit
  • add shorter validation entry points: AddValidation(...) and AddValidationFromAssemblyContaining<T>()
  • update sample app and templates to use the shorter validation registration API
  • improve template validation script so local-feed restores succeed during template post-actions
  • fix durable template integration tests for SQL Server and PostgreSQL so generated apps run Docker-backed tests without skips
  • update maintainer-facing package docs and template docs to reflect the newer recommended usage

Why

WorkTrack exposed a few gaps in the library:

  • repository abstractions were slightly too thin for real specification-heavy application code
  • audit logging needed first-class tenant support
  • validation registration was too verbose in generated apps
  • template validation gave misleading restore failures with local packages
  • durable template tests did not reliably exercise the generated app configuration end-to-end

Verification

  • dotnet build MinimalCleanArch.sln
  • dotnet test tests\MinimalCleanArch.UnitTests\MinimalCleanArch.UnitTests.csproj --no-build
  • ./scripts/pack.ps1 -PackageVersion 0.1.16-preview
  • ./templates/scripts/validate-templates.ps1 -TemplatePackagePath ./artifacts/packages -LocalFeedPath ./artifacts/packages -McaVersion 0.1.16-preview -Framework net10.0 -IncludeNugetOrg
  • fresh template scaffold + Docker-backed test:
    • SQL Server: temp/durable-verify/sqlserver-fresh/AppSqlFresh.sln
    • PostgreSQL: temp/durable-verify/postgres-fresh/AppPgFresh.sln

Notes

  • stable version remains 0.1.14
  • preview line for this branch is 0.1.16-preview
  • existing repo warnings such as NU1510 were not part of this change set

…te AuditLogQuery for tenant filtering

feat(dataaccess): introduce AddMinimalCleanArch method for DbContext with IServiceProvider access

docs(dataaccess): update README for version 0.1.16-preview and enhance usage examples

feat(dataaccess): implement common repository methods AnyAsync, SingleOrDefaultAsync, and CountAsync in Repository

feat(caching): extend CachedRepositoryDecorator with AnyAsync, SingleOrDefaultAsync, and CountAsync methods

feat(extensions): add UseMinimalCleanArchApiDefaults method for standard API middleware pipeline

feat(extensions): introduce AddMinimalCleanArchApi for service registrations with optional rate limiting

docs(extensions): update README for version 0.1.16-preview and clarify usage instructions

feat(validation): add AddValidation and AddMinimalCleanArchValidation methods for validator registration

docs(validation): update README for version 0.1.16-preview and enhance usage examples

chore: update all project versions to 0.1.16-preview in README and project files

fix(tests): refactor TodoEndpointDurableTests for improved clarity and validation scenarios

chore: update template version to 0.1.16-preview in scripts and template configurations
Copy link
Copy Markdown
Owner Author

@abdebek abdebek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@abdebek abdebek marked this pull request as ready for review March 7, 2026 15:35
@abdebek abdebek merged commit d3a2ab6 into dev Mar 7, 2026
5 checks passed
@abdebek abdebek deleted the feat/library-consumer-friction-fixes branch March 7, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant