Skip to content

Add tracing, analyzer coverage, identity schema introspection, and EF JSON converter support#2244

Merged
einari merged 40 commits into
mainfrom
copilot/consolidate-pull-requests
May 25, 2026
Merged

Add tracing, analyzer coverage, identity schema introspection, and EF JSON converter support#2244
einari merged 40 commits into
mainfrom
copilot/consolidate-pull-requests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 23, 2026

Summary

Consolidates tracing, analyzer, introspection, and EF JSON serialization work into one change set. The result is better observability, stricter command-model validation, runtime schema discovery for identity details, and configurable JSON conversion for EF [Json] properties.

Added

Changed

arcBuilder.WithEntityFrameworkCore(options =>
{
    options.JsonConverters.Add(new MyRequestConverter(jobTypes));
});

Fixed

Copilot AI and others added 29 commits May 22, 2026 08:46
…ces) can be used with [Json] properties

- Add JsonConversionOptions with all Arc default converters (EnumConverterFactory,
  EnumerableConceptAsJsonConverterFactory, ConceptAsJsonConverterFactory,
  DateOnlyJsonConverter, TimeOnlyJsonConverter, TypeJsonConverter,
  UriJsonConverter, EnumerableModelWithIdToConceptOrPrimitiveEnumerableConverterFactory)
- Add EntityFrameworkCoreOptions.JsonConverters list for user-supplied converters
- Register JsonConversionOptions as singleton in DI from WithEntityFrameworkCore
- Thread JsonConversionOptions through both ApplyJsonConversion overloads (optional param)
- Update BaseDbContext to resolve JsonConversionOptions from ApplicationServiceProvider
- Change JsonValueConverter<T>/JsonValueComparer<T> to accept JsonSerializerOptions via ctor
- Add specs: for_JsonConversionOptions and when_applying_json_conversion_with_custom_options
… IDisposable'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
… IDisposable'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
… IDisposable'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
… IDisposable'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
… IDisposable'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…compliance' into copilot/consolidate-pull-requests
…nt' into copilot/consolidate-pull-requests

# Conflicts:
#	Source/DotNET/Tools/ProxyGenerator.Specs/Scenarios/Infrastructure/arc-bootstrap.js
…als-add-traces' into copilot/consolidate-pull-requests
Copilot AI self-assigned this May 23, 2026
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.26.16

@einari
Copy link
Copy Markdown
Contributor

einari commented May 24, 2026

@copilot Lets update all dependencies (except for those locked to preview versions)

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 24, 2026

@copilot Lets update all dependencies (except for those locked to preview versions)

Addressed in 5c8f78f. I updated the stable JavaScript dependencies without touching preview-tagged versions, kept the local @cratis/* package references pinned, and added the missing test-app Vite aliases needed by the newer bundler resolution. Validation: yarn ci passed, yarn workspace @testapps/arccore build passed, and direct Vite production builds passed for both test apps. yarn workspace @testapps/aspnetcore build still hits the pre-existing Features/MongoWatcher/MongoWatcher.ts duplicate-identifier TypeScript errors that were already present before this change.

Copilot finished work on behalf of einari May 24, 2026 07:48
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.26.17-pr2244.5c8f78f

@einari
Copy link
Copy Markdown
Contributor

einari commented May 24, 2026

@copilot Merge from main and then update all package dependencies

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 24, 2026

@copilot Merge from main and then update all package dependencies

Addressed in 8bc4138. I merged the latest main into this branch, then re-checked the package.json dependencies with npm-check-updates (keeping the local @cratis/* references pinned); they were already at the latest stable versions, so there were no further package-file updates to make. Validation: yarn workspace @cratis/arc.react ci and yarn workspace @testapps/arccore build passed. yarn workspace @testapps/aspnetcore build still hits the existing Features/MongoWatcher/MongoWatcher.ts duplicate-identifier errors.

Copilot finished work on behalf of einari May 24, 2026 10:30
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.26.17-pr2244.8bc4138

@einari
Copy link
Copy Markdown
Contributor

einari commented May 24, 2026

@copilot Update the .NET packages to the latest - except those that are set to pre-release versions

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 24, 2026

@copilot Update the .NET packages to the latest - except those that are set to pre-release versions

Addressed in d06e6d7. I updated the stable .NET package pins across the central package props, kept the existing prerelease pin intact, and left the net8/net9 EF/Npgsql/Mvc.Testing lines on their latest compatible stable versions because the 10.x packages only support net10.0. Validation: dotnet build Source/DotNET/EntityFrameworkCore/EntityFrameworkCore.csproj --configuration Release --no-restore, dotnet build Source/DotNET/Tools/ProxyGenerator.Build/ProxyGenerator.Build.csproj --configuration Release --no-restore, dotnet build Source/DotNET/Tools/ProxyGenerator.Specs/ProxyGenerator.Specs.csproj --configuration Release --no-restore, dotnet test Source/DotNET/Chronicle.Specs/Chronicle.Specs.csproj --configuration Release --no-build --no-restore, and dotnet test Source/DotNET/Arc.Specs/Arc.Specs.csproj --configuration Release --no-build --no-restore.

Copilot finished work on behalf of einari May 24, 2026 13:53
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.26.17-pr2244.d06e6d7

@einari
Copy link
Copy Markdown
Contributor

einari commented May 24, 2026

@copilot Look at the following PR for how we've done the registration of library ActivitySources with the generic solution:

https://github.com/Cratis/Chronicle/pull/3318/changes#diff-c2d5b225afa1fb687b7464426f7aa143f2dee181baad44eb166209ab3f6cbd4a

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 24, 2026

@copilot Look at the following PR for how we've done the registration of library ActivitySources with the generic solution:

https://github.com/Cratis/Chronicle/pull/3318/changes#diff-c2d5b225afa1f...

Addressed in f79461e. I changed Arc to follow the Chronicle pattern: register one shared Cratis.Arc ActivitySource, then register explicit typed IActivitySource<T> wrappers for the Arc core pipeline types and the ASP.NET action filters instead of the blanket open-generic registration. Validation: dotnet test Source/DotNET/Arc.Core.Specs/Arc.Core.Specs.csproj --configuration Release --no-restore --no-build and dotnet test Source/DotNET/Arc.Specs/Arc.Specs.csproj --configuration Release --no-restore --no-build both passed.

Copilot finished work on behalf of einari May 24, 2026 15:30
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.26.19

internal static IServiceCollection AddActivitySource(this IServiceCollection services, string sourceName)
{
#pragma warning disable CA2000 // Dispose objects before losing scope
services.TryAddKeyedSingleton(sourceName, new DiagnosticsActivitySource(sourceName));
@einari einari marked this pull request as ready for review May 25, 2026 11:01
@einari einari merged commit a2a9798 into main May 25, 2026
53 checks passed
@einari einari deleted the copilot/consolidate-pull-requests branch May 25, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants