Skip to content

Conversation

@mikemcdougall
Copy link
Collaborator

@mikemcdougall mikemcdougall commented Jan 23, 2026

Pull Request

Issue Link

Fixes #250

Summary

Replaces the legacy admin metadata implementation with the metadata resource model and GitOps manifest workflows.

Changes Made

  • remove legacy admin metadata endpoints/catalog/cache invalidation and replace with resource-based endpoints
  • add metadata resource store/schema/compiler pipeline and migration for persisted metadata resources
  • update tests/docs and make manifest hashing canonical + AOT-safe JSON storage
  • devcontainer updates for PostGIS/Redis/localstack CLI support used by tests

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Architecture tests pass
  • Local pre-PR validation passed (scripts/pre-pr-check.sh)

Coverage Impact

  • Line coverage: not measured locally
  • Branch coverage: not measured locally

Breaking Changes

None

Additional Context

N/A


Pre-PR Checklist (for contributor)

  • Ran scripts/pre-pr-check.sh and all checks passed
  • Commit message follows format: type: description (#issue-number)
  • PR title matches main commit message
  • Issue number linked above
  • Tests added for new functionality
  • Documentation updated if needed

Reviewer Checklist

  • Code follows project architecture (vertical slices, no controllers)
  • Tests cover happy path and edge cases
  • No reflection in hot paths (AOT compatible)
  • Dependency limits respected (max 5 per endpoint)
  • Error handling follows project patterns
  • Security considerations addressed

@github-actions
Copy link

github-actions bot commented Jan 23, 2026

🤖 PR Template Validation

All checks passed! Your PR follows the template correctly.

Next steps:

  • Wait for CI to complete
  • Address any feedback from LLM architecture review
  • Request review from team members

Automated validation powered by GitHub Actions

@github-actions
Copy link

🤖 LLM Architecture Review

⚠️ Assessment: NEEDS_ATTENTION

🏗️ Architecture Review Summary

Process Checks:

  • ✅ Linked issue with acceptance criteria detected.

Diff Review Chunks: 48

Chunk 1/48 (src/Honua.Core/Features/Admin/Abstractions/IAdminCatalog.cs)

Findings

  • No issues detected in the provided diff.

Overall Assessment: APPROVED

Explanation: The diff shows the deletion of an interface file IAdminCatalog.cs from the Honua.Core project. Since it's a removal, there are no new violations introduced regarding dependency direction, API patterns, encapsulation, AOT safety, public XML documentation, dependency count limits, or sync-over-async issues. The file deletion itself does not inherently introduce any architectural concerns.

Chunk 2/48 (src/Honua.Core/Features/Metadata/Abstractions/IMetadataCompiler.cs)

Findings

  • [BLOCKING] src/Honua.Core/Features/Metadata/Abstractions/IMetadataCompiler.cs:2 - System.Text.Json.JsonElement used in public API, which may not be AOT-safe.
  • [WARNING] src/Honua.Core/Features/Metadata/Abstractions/IMetadataCompiler.cs:2 - Dependency on System.Text.Json might lead to AOT issues; consider using source-generated JSON.

Overall Assessment: BLOCKING_ISSUES

Chunk 3/48 (src/Honua.Core/Features/Metadata/Abstractions/IMetadataResourceStore.cs)

Findings

  • [APPROVED] src/Honua.Core/Features/Metadata/Abstractions/IMetadataResourceStore.cs:1-63 - Interface IMetadataResourceStore correctly defined in the Honua.Core project, adheres to dependency direction, and is well-documented.

Overall Assessment: APPROVED

The interface IMetadataResourceStore is appropriately located within the Honua.Core project, ensuring compliance with the dependency direction rule. It is designed for public use and is well-documented with XML comments, fulfilling the documentation requirement. The interface does not contain any ControllerBase or ApiController attributes, aligning with the Minimal API usage rule. There are no signs of sync-over-async issues, inappropriate encapsulation, or AOT-unsafe patterns in this diff.

Chunk 4/48 (src/Honua.Core/Features/Metadata/Abstractions/IMetadataSchemaRegistry.cs)

Findings

  • None

Overall Assessment: APPROVED

Explanation:

  • The interface IMetadataSchemaRegistry is correctly placed within the Honua.Core project, adhering to the dependency direction rule.
  • The interface itself does not violate the AOT rules as it does not involve any dynamic or reflection-based operations.
  • The public interface is well-documented with XML comments, fulfilling the documentation requirement.
  • There are no signs of ControllerBase or ApiController usage, aligning with the minimal API usage rule.
  • The interface does not directly reveal any infrastructure implementation details, thus maintaining proper encapsulation.

Chunk 5/48 (src/Honua.Core/Features/Metadata/Domain/CompiledMetadataArtifact.cs)

Findings

  • [BLOCKING] src/Honua.Core/Features/Metadata/Domain/CompiledMetadataArtifact.cs:25 - Use of JsonElement may not be AOT-safe. Consider using source-generated JSON serialization.

Overall Assessment: BLOCKING_ISSUES

Chunk 6/48 (src/Honua.Core/Features/Metadata/Domain/MetadataAnnotations.cs)

Findings

  • None

Overall Assessment: APPROVED

The diff shows the addition of a new file MetadataAnnotations.cs in the Honua.Core project, defining a static class with constant strings for metadata annotations. This change adheres to all specified architectural rules:

  • The class is correctly placed within the Honua.Core domain, ensuring proper dependency direction.
  • It uses a static class with constants, which is suitable for the intended use and does not involve ControllerBase or APIController patterns, thus aligning with the minimal API usage rule.
  • The class is public and appropriately documented with XML comments, fulfilling the documentation requirement.
  • There are no issues with AOT compatibility as the code involves simple constant definitions.
  • There are no dependencies introduced in this change, so it does not violate the dependency count limits.
  • No sync-over-async patterns are present in this diff.

Chunk 7/48 (src/Honua.Core/Features/Metadata/Domain/MetadataDomainJsonContext.cs)

Findings

  • [APPROVED] src/Honua.Core/Features/Metadata/Domain/MetadataDomainJsonContext.cs:1-19 - Proper use of source-generated JSON serialization, adheres to AOT-safe patterns.

Overall Assessment: APPROVED

The file introduces a source-generated JSON serialization context which is AOT-friendly and follows the architectural guidelines for Honua regarding JSON handling. The use of attributes like JsonSerializable ensures that the JSON serialization is handled at compile-time, avoiding runtime reflection. The public class is correctly documented with XML comments.

Chunk 8/48 (src/Honua.Core/Features/Metadata/Domain/MetadataResource.cs)

Findings

  • [BLOCKING] src/Honua.Core/Features/Metadata/Domain/MetadataResource.cs:25,32 - Use of JsonElement may not be AOT-safe due to dynamic JSON handling.

Overall Assessment: BLOCKING_ISSUES

Chunk 9/48 (src/Honua.Core/Features/Metadata/Domain/MetadataResourceIdentifier.cs)

Findings

  • None

Overall Assessment: APPROVED

Explanation:

  • The file MetadataResourceIdentifier.cs is a new addition and defines a public record, which is appropriate for a domain model in the Honua.Core project.
  • The record is properly documented with XML comments, adhering to the requirement for public types.
  • There are no dependencies introduced in this change, and it does not violate the architectural rules regarding dependency direction, AOT safety, or API patterns.
  • The type is declared as public and sealed, which is typical for data types in domain models and does not require encapsulation as an internal type.

Chunk 10/48 (src/Honua.Core/Features/Metadata/Domain/MetadataResourceKinds.cs)

Findings

  • None

Overall Assessment: APPROVED

The diff shows a new file addition within Honua.Core that defines constants and a list related to metadata resource kinds. This file adheres to the architectural rules:

  • It is correctly placed within the Honua.Core project, ensuring proper dependency direction.
  • It uses public static constants and a public static readonly list, which are simple types and do not involve any dynamic or reflection-based operations, thus complying with AOT-safe patterns.
  • The file includes XML documentation for the public types, fulfilling the documentation requirement.
  • There are no issues with excessive dependencies, sync-over-async patterns, or improper encapsulation of infrastructure types.

Chunk 11/48 (src/Honua.Core/Features/Metadata/Domain/MetadataResourceWriteResult.cs)

Findings

  • None

Overall Assessment: APPROVED

The diff shows the addition of a new MetadataResourceWriteResult record and an associated MetadataResourceWriteOutcome enum in the Honua.Core project. The implementation adheres to the architectural rules:

  • The types are public with appropriate XML documentation.
  • The pattern does not involve ControllerBase or [ApiController], consistent with the use of Minimal APIs.
  • The types are part of the domain model and are correctly exposed as public.
  • There are no signs of improper dependency direction, sync-over-async issues, or AOT-unsafe patterns in this diff.

Chunk 12/48 (src/Honua.Core/Features/Metadata/Domain/MetadataSchemaValidationResult.cs)

Findings

  • [APPROVED] No issues found in the provided diff.

Overall Assessment: APPROVED

The diff adheres to the architectural rules:

  • The file is part of Honua.Core, and it defines a domain model which is correctly public and documented.
  • No dependency direction issues are evident from this diff.
  • No ControllerBase or ApiController usage; this is a domain model, not an API controller.
  • The type is correctly designed as a record, which is appropriate for immutable data structures.
  • XML documentation is provided for the public type.
  • No reflection, dynamic JSON, or sync-over-async patterns are present in this diff.

Chunk 13/48 (src/Honua.Core/Features/Metadata/Domain/ResourceMetadata.cs)

Findings

  • None

Overall Assessment: APPROVED

The provided diff adheres to the architectural rules of the Honua project:

  • The ResourceMetadata class is part of the Honua.Core project and does not reference any external or higher-layer projects, maintaining proper dependency direction.
  • The class uses source-generated JSON serialization attributes (JsonPropertyName), which is AOT-safe.
  • The class is public and properly documented with XML comments for each property, complying with the documentation requirements.
  • There are no instances of sync-over-async patterns, excessive dependencies, or improper encapsulation in this diff.

Chunk 14/48 (src/Honua.Core/Features/Metadata/Schema/MetadataSchemaRegistry.cs)

Findings

  • [BLOCKING] src/Honua.Core/Features/Metadata/Schema/MetadataSchemaRegistry.cs:5 - Usage of System.Text.Json directly in production code may not be AOT-safe.
  • [WARNING] src/Honua.Core/Features/Metadata/Schema/MetadataSchemaRegistry.cs:239 - The MetadataSchemaRegistry class contains a large number of dependencies and responsibilities, potentially violating the architectural guideline of keeping handlers and endpoints with limited dependencies.

Overall Assessment: BLOCKING_ISSUES

The direct use of System.Text.Json in a core component of the system could lead to AOT compatibility issues, which is critical for the project's requirements. The class also appears to be handling too many responsibilities directly, which could benefit from a review to simplify and possibly refactor into more focused components.

Chunk 15/48 (src/Honua.Core/Features/Metadata/Schema/ResourceSchemaDefinition.cs)

Findings

  • None

Overall Assessment: APPROVED

The provided diff adheres to the architectural rules of Honua:

  • The class ResourceSchemaDefinition is part of the Honua.Core namespace and does not reference any external or higher-layer namespaces such as Honua.Postgres or Honua.Server.
  • The type is a record, which is suitable for data structures, and it is marked as public, which is appropriate for a DTO.
  • The properties are well-documented with XML comments, fulfilling the documentation requirement.
  • The use of IReadOnlyList<string> for RequiredSpecFields is AOT-safe and avoids reflection or dynamic JSON issues.
  • The file does not introduce any new dependencies or patterns that would violate the minimal API usage or encapsulation rules.

Chunk 16/48 (src/Honua.Postgres/Features/Admin/PostgresAdminCatalog.cs (part 1/3))

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Explanation:

  • The diff shows the deletion of a file PostgresAdminCatalog.cs which previously contained PostgreSQL-specific implementations for admin catalog operations.
  • The deletion does not introduce any new code, hence there are no violations related to dependency direction, API patterns, encapsulation, AOT safety, public XML documentation, dependency count limits, or sync-over-async issues.
  • The removal of this file suggests a possible refactoring or architectural change, but without additional context or related diffs, no issues can be directly identified from this deletion alone.

Chunk 17/48 (src/Honua.Postgres/Features/Admin/PostgresAdminCatalog.cs (part 2/3))

Findings

  • No issues found in the provided diff regarding dependency direction, minimal API usage, infrastructure encapsulation, AOT-safe patterns, public XML docs, dependency count limits, or sync-over-async.

Overall Assessment: APPROVED

The diff shows proper use of asynchronous programming patterns, adherence to the architectural rules of Honua regarding minimal APIs, and correct encapsulation of infrastructure details. There are no signs of improper dependency directions or violations of AOT compatibility. The operations are encapsulated within the Postgres feature module as expected, and there's no misuse of ControllerBase or ApiController patterns, aligning with the use of Minimal APIs.

Chunk 18/48 (src/Honua.Postgres/Features/Admin/PostgresAdminCatalog.cs (part 3/3))

Findings

  • [BLOCKING] src/Honua.Postgres/Features/Admin/PostgresAdminCatalog.cs - The entire file PostgresAdminCatalog.cs is deleted. This action might affect the functionality depending on whether the responsibilities of this class have been correctly relocated or refactored in compliance with the architecture rules.

Overall Assessment: NEEDS_ATTENTION

Note: The deletion of an entire file, especially one that seems to have contained significant functionality related to database operations, requires careful review to ensure that these functionalities are either no longer needed or have been properly migrated to other parts of the application in line with the architectural guidelines. The diff does not provide information on where or how these functionalities have been reassigned, thus a thorough review of the new implementation (if any) is necessary to ensure compliance and functionality.

Chunk 19/48 (src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs (part 1/3))

Findings

  • [BLOCKING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs:1-673 - Dependency direction violation: Honua.Postgres should not reference Honua.Core types such as Honua.Core.Features.Caching.Abstractions.ICacheService or Honua.Core.Features.Infrastructure.Abstractions.IDatabaseConnectionProvider.
  • [BLOCKING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs:1-673 - AOT violation: Use of dynamic JSON serialization and deserialization which can break AOT compilation. Use source-generated JSON serialization instead.
  • [WARNING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs:1-673 - Sync-over-async potential issue: ConfigureAwait(false) is used extensively, which is generally good, but the overall pattern should be reviewed to ensure it doesn't lead to deadlocks or thread pool exhaustion under load.

Overall Assessment: BLOCKING_ISSUES

Chunk 20/48 (src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs (part 2/3))

Findings

  • [BLOCKING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs - The PostgresMetadataResourceStore class should be internal to encapsulate infrastructure implementation.
  • [WARNING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs - The class appears to have a high number of dependencies and complex logic which might indicate a violation of the single responsibility principle and could benefit from further decomposition.
  • [WARNING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs - Use of ConfigureAwait(false) in an ASP.NET Core environment is unnecessary and could be removed for clarity.
  • [BLOCKING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs - Public methods and types lack XML documentation, which is required for all public elements.
  • [WARNING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs - Sync-over-async pattern is not evident in the provided diff, but caution is advised to ensure it's not used elsewhere in the code.

Overall Assessment: BLOCKING_ISSUES

The class should be made internal, XML documentation needs to be added for public elements, and the overall complexity and responsibility of the class should be evaluated to ensure it adheres to architectural guidelines.

Chunk 21/48 (src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs (part 3/3))

Findings

  • [BLOCKING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs - Uses dynamic JSON serialization (SerializeJsonElement, SerializeOptionalJsonElement, SerializeDictionary) which may not be AOT-friendly.
  • [WARNING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs - Methods UpsertIndexAsync and DeleteIndexAsync may indicate a layered organization rather than vertical slices, review needed to confirm.
  • [WARNING] src/Honua.Postgres/Features/Metadata/PostgresMetadataResourceStore.cs - Dependency count in the UpsertIndexAsync method could be approaching limits, depending on the complexity of the SerializeDictionary and other serialization methods.

Overall Assessment: BLOCKING_ISSUES

The use of dynamic JSON serialization methods in a .NET 10, AOT-focused environment could lead to runtime issues. This needs to be addressed by using source-generated JSON serialization to ensure compatibility and performance in an AOT scenario. Additionally, the architectural pattern and dependency count should be reviewed to ensure they align with Honua's architectural guidelines.

Chunk 22/48 (src/Honua.Postgres/ServiceCollectionExtensions.cs)

Findings

  • [BLOCKING] src/Honua.Postgres/ServiceCollectionExtensions.cs:81 - Dependency direction violation: Honua.Core should not be referenced by Honua.Postgres for Honua.Core.Features.Caching.Abstractions.ICacheService.
  • [WARNING] src/Honua.Postgres/ServiceCollectionExtensions.cs:81 - Dependency count in the lambda may exceed the limit (5 dependencies noted here).

Overall Assessment: BLOCKING_ISSUES

Chunk 23/48 (src/Honua.Server/EndpointRegistry.cs)

Findings

  • No issues detected in the provided diff regarding dependency direction, Minimal API usage, infrastructure encapsulation, AOT-safe patterns, public XML documentation, dependency count limits, or sync-over-async.

Overall Assessment: APPROVED

Chunk 24/48 (src/Honua.Server/Features/Admin/AdminMetadataEndpoints.cs (part 1/2))

Findings

  • [BLOCKING] src/Honua.Server/Features/Admin/AdminMetadataEndpoints.cs:1-573 - AdminMetadataEndpoints class should be internal but is public.
  • [BLOCKING] src/Honua.Server/Features/Admin/AdminMetadataEndpoints.cs:1-573 - Uses System.Text.Json directly in endpoint handlers which may not be AOT-safe; should use source-generated JSON contexts.
  • [WARNING] src/Honua.Server/Features/Admin/AdminMetadataEndpoints.cs:1-573 - Dependency count in HandleApplyManifest seems high, review for possible simplification.
  • [WARNING] src/Honua.Server/Features/Admin/AdminMetadataEndpoints.cs:1-573 - HandleApplyManifest method is complex and might benefit from decomposition into smaller functions or services.

Overall Assessment: BLOCKING_ISSUES

Chunk 25/48 (src/Honua.Server/Features/Admin/AdminMetadataEndpoints.cs (part 2/2))

Findings

  • [BLOCKING] src/Honua.Server/Features/Admin/AdminMetadataEndpoints.cs - The file introduces a new feature that appears to be a controller-like structure, which is against the architecture rule of using only Minimal APIs and not using ControllerBase or [ApiController].
  • [WARNING] src/Honua.Server/Features/Admin/AdminMetadataEndpoints.cs - The file contains multiple dependencies and complex logic that may violate the guideline of endpoints having <= 5 dependencies and handlers <= 4 dependencies.
  • [WARNING] src/Honua.Server/Features/Admin/AdminMetadataEndpoints.cs - Usage of async-await pattern extensively might need review to ensure it does not lead to sync-over-async issues, although no direct use of .Result or .Wait() is observed.

Overall Assessment: BLOCKING_ISSUES

The primary issue is the introduction of a controller-like structure in a project that mandates the use of Minimal APIs. This needs to be refactored to comply with the architectural guidelines. Additionally, the complexity and potential over-dependency in the new feature should be simplified or better modularized.

Chunk 26/48 (src/Honua.Server/Features/Admin/MetadataCacheInvalidator.cs)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Explanation: The diff shows the deletion of a file, MetadataCacheInvalidator.cs, which does not introduce any new code or architectural concerns. The deletion itself does not violate any of the specified architectural rules.

Chunk 27/48 (src/Honua.Server/Features/Admin/MetadataEndpoints.cs (part 1/4))

Findings

  • [BLOCKING] src/Honua.Server/Features/Admin/MetadataEndpoints.cs - File deletion of MetadataEndpoints.cs removes a significant amount of functionality, potentially breaking the application if not replaced or refactored elsewhere.

Overall Assessment: BLOCKING_ISSUES

Explanation: The deletion of an entire file that contains crucial endpoint mappings and handlers for administrative functionalities is a critical change. This action could lead to loss of features unless these functionalities have been appropriately migrated or re-implemented in another part of the application. The deletion itself does not violate specific architectural rules directly, but the impact on the application's functionality is severe enough to warrant a blocking issue status. Further investigation into the new implementation or replacement of these functionalities is necessary to ensure the system's integrity and capabilities are maintained.

Chunk 28/48 (src/Honua.Server/Features/Admin/MetadataEndpoints.cs (part 2/4))

Findings

  • No issues found in the diff provided.

Overall Assessment: APPROVED

The diff shows a deleted file, which means the content is no longer part of the project. No violations of the architectural rules can be assessed from this action alone.

Chunk 29/48 (src/Honua.Server/Features/Admin/MetadataEndpoints.cs (part 3/4))

Findings

  • No blocking issues found in the provided diff.

Overall Assessment: APPROVED

The diff indicates the deletion of a file that seems to have been using Minimal APIs correctly, handling JSON serialization/deserialization with source-generated contexts, and managing HTTP responses appropriately. There are no violations of the architectural rules in the deleted content.

Chunk 30/48 (src/Honua.Server/Features/Admin/MetadataEndpoints.cs (part 4/4))

Findings

  • No issues found in the diff provided.

Overall Assessment: APPROVED

Explanation:

  • The entire file MetadataEndpoints.cs is being deleted. This means all the content, including any potential issues, is being removed.
  • No new code is introduced or modified in this diff, hence there are no violations of the architectural rules or other guidelines to assess.

Chunk 31/48 (src/Honua.Server/Features/Admin/MetadataResourceEndpoints.cs (part 1/2))

Findings

  • [BLOCKING] src/Honua.Server/Features/Admin/MetadataResourceEndpoints.cs - The file introduces a new class MetadataResourceEndpoints which is marked as internal but contains public methods such as MapMetadataResourceEndpoints. This violates the encapsulation rule where infrastructure implementation types must be internal.
  • [BLOCKING] src/Honua.Server/Features/Admin/MetadataResourceEndpoints.cs - The use of JsonSerializer directly in methods like WriteJsonAsync might not be AOT-safe. The system should utilize source-generated JSON contexts to ensure AOT compatibility.
  • [WARNING] src/Honua.Server/Features/Admin/MetadataResourceEndpoints.cs - The MapMetadataResourceEndpoints method has a high number of dependencies, which could indicate an overly complex setup or potential architectural issues in terms of maintainability and testing.

Overall Assessment: BLOCKING_ISSUES

The issues identified are critical and violate the core architectural rules of the Honua project, particularly around encapsulation and AOT safety. These need to be addressed to ensure the system's maintainability and compatibility with ahead-of-time compilation environments.

Chunk 32/48 (src/Honua.Server/Features/Admin/MetadataResourceEndpoints.cs (part 2/2))

Findings

  • [BLOCKING] src/Honua.Server/Features/Admin/MetadataResourceEndpoints.cs - The file introduces a new endpoint implementation but does not explicitly show the registration of these endpoints using Minimal API patterns. The presence of methods like WriteJsonAsync and WriteError suggests a more traditional controller-like pattern, which violates the Minimal API usage rule.
  • [WARNING] src/Honua.Server/Features/Admin/MetadataResourceEndpoints.cs - The method WriteJsonAsync uses JsonSerializer.SerializeAsync directly with type information, which could potentially break AOT if not handled correctly with source-generated JSON contexts. This needs verification to ensure AOT compatibility.
  • [WARNING] src/Honua.Server/Features/Admin/MetadataResourceEndpoints.cs - Dependency count and complexity within MetadataResourceEndpoints.cs are potentially high, considering the number of helper methods and operations performed. This could violate the architectural rule of keeping endpoint dependencies limited.

Overall Assessment: BLOCKING_ISSUES

The use of patterns that resemble traditional controllers and the potential AOT issues with JSON serialization need to be addressed to comply with the architectural rules of Honua.

Chunk 33/48 (src/Honua.Server/Features/Admin/Models/MetadataJsonContext.cs)

Findings

  • [BLOCKING] src/Honua.Server/Features/Admin/Models/MetadataJsonContext.cs - Deletion of AOT-compatible JSON serialization context file. This may lead to reliance on reflection-based JSON serialization which is not AOT-friendly.

Overall Assessment: BLOCKING_ISSUES

Chunk 34/48 (src/Honua.Server/Features/Admin/Models/MetadataModels.cs (part 1/2))

Findings

  • [BLOCKING] src/Honua.Server/Features/Admin/Models/MetadataModels.cs - File deletion removes public DTOs which are necessary for the API, potentially breaking existing functionality.

Overall Assessment: BLOCKING_ISSUES

Chunk 35/48 (src/Honua.Server/Features/Admin/Models/MetadataModels.cs (part 2/2))

Findings

  • [BLOCKING] src/Honua.Server/Features/Admin/Models/MetadataModels.cs - Entire file deletion of DTOs (Data Transfer Objects) may indicate a significant architectural change or functionality removal that needs further review and justification.

Overall Assessment: BLOCKING_ISSUES

Explanation: The deletion of an entire file containing multiple DTOs suggests a major change in the application's data handling or feature set. This could impact existing functionalities or client integrations, and thus requires a thorough review to ensure that these changes align with the project's goals and architecture. Further context on why these deletions are proposed is necessary to proceed.

Chunk 36/48 (src/Honua.Server/Features/Admin/Models/MetadataResourceJsonContext.cs)

Findings

  • [APPROVED] No specific issues found in the diff provided.

Overall Assessment: APPROVED

Detailed Explanation:

  • The file is a new addition and correctly implements source-generated JSON serialization, which is AOT-friendly as per the architectural rules.
  • The types being serialized are mostly DTOs and responses, which is appropriate.
  • The file is part of the Honua.Server project and does not introduce any inappropriate dependencies or violate the encapsulation rules.
  • There is no use of ControllerBase or ApiController, adhering to the Minimal API usage rule.
  • The class is marked as sealed partial, which is typical for source-generated contexts and does not expose any internal infrastructure inappropriately.

Chunk 37/48 (src/Honua.Server/Features/Admin/Models/MetadataResourceModels.cs)

Findings

  • [APPROVED] src/Honua.Server/Features/Admin/Models/MetadataResourceModels.cs - All models are public with appropriate XML documentation.
  • [APPROVED] src/Honua.Server/Features/Admin/Models/MetadataResourceModels.cs - Uses source-generated JSON serialization attributes, adhering to AOT-safe patterns.

Overall Assessment: APPROVED

The diff shows the addition of various DTO models for the admin features of the Honua server. The models are well-documented and use source-generated JSON serialization, which is compliant with AOT requirements. There are no violations of the architectural rules in the provided diff.

Chunk 38/48 (src/Honua.Server/Features/Admin/Services/MetadataCompilerService.cs)

Findings

  • [APPROVED] src/Honua.Server/Features/Admin/Services/MetadataCompilerService.cs - The file correctly defines an internal service (DefaultMetadataCompiler) adhering to encapsulation rules.
  • [APPROVED] src/Honua.Server/Features/Admin/Services/MetadataCompilerService.cs - Uses source-generated JSON context (MetadataResourceJsonContext.Default.MetadataCompilationStatus) for serialization, complying with AOT requirements.

Overall Assessment: APPROVED

The changes adhere to the architectural rules of Honua, including correct encapsulation, AOT-safe JSON handling, and appropriate internal visibility for the service class. No blocking issues or warnings are present in this diff.

Chunk 39/48 (src/Honua.Server/Features/Infrastructure/Caching/CacheJsonContext.cs)

Findings

  • [APPROVED] src/Honua.Server/Features/Infrastructure/Caching/CacheJsonContext.cs:6 - Correct use of source-generated JSON serialization.
  • [APPROVED] src/Honua.Server/Features/Infrastructure/Caching/CacheJsonContext.cs:22 - Addition of CompiledMetadataArtifact to source-generated JSON serialization is appropriate and AOT-safe.

Overall Assessment: APPROVED

The changes in the diff are compliant with the architectural rules of Honua. The addition of CompiledMetadataArtifact to the JSON serialization list adheres to the AOT-safe patterns by using source generation, and there are no violations of dependency direction, encapsulation, or API patterns.

Chunk 40/48 (src/Honua.Server/Program.cs)

Findings

  • [BLOCKING] src/Honua.Server/Program.cs:180 - MetadataCacheInvalidator is replaced with IMetadataSchemaRegistry and IMetadataCompiler, but the implementation types (MetadataSchemaRegistry, DefaultMetadataCompiler) should be internal to avoid exposing infrastructure details.
  • [BLOCKING] src/Honua.Server/Program.cs:260 - The change from MetadataJsonContext to MetadataResourceJsonContext might indicate a shift in JSON handling that could affect AOT compatibility if not using source-generated contexts.
  • [WARNING] src/Honua.Server/Program.cs:401 - Replacement of MapMetadataEndpoints with MapMetadataResourceEndpoints suggests a significant change in API structure that might require further review to ensure it aligns with minimal API patterns and does not introduce controller-based patterns.

Overall Assessment: BLOCKING_ISSUES

Chunk 41/48 (tests/Honua.Server.Tests/Admin/MetadataCacheInvalidationTests.cs (part 1/2))

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Explanation:

  • The diff is entirely within test code (tests/Honua.Server.Tests/Admin/MetadataCacheInvalidationTests.cs), which allows for patterns that might break AOT or use reflection.
  • The tests are using HttpClient to simulate API calls and check responses, which is appropriate for integration tests.
  • There are no violations of the architectural rules regarding dependency direction, minimal API usage, encapsulation, or documentation within the context of test code.
  • The deletion of the test file does not introduce any new architectural concerns or dependencies.

Chunk 42/48 (tests/Honua.Server.Tests/Admin/MetadataCacheInvalidationTests.cs (part 2/2))

Findings

  • No findings. The diff shows a deletion of test code, which does not require compliance checks against the architectural rules specified.

Overall Assessment: APPROVED

Chunk 43/48 (tests/Honua.Server.Tests/Admin/MetadataEndpointTests.cs (part 1/2))

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Explanation: The diff provided is entirely within a test project (tests/Honua.Server.Tests). As per the guidelines, reflection, dynamic, or AOT-breaking patterns in test code do not constitute violations. The diff does not introduce or modify any production code, so there are no concerns regarding dependency direction, API patterns, encapsulation, public XML documentation, dependency count limits, or sync-over-async issues.

Chunk 44/48 (tests/Honua.Server.Tests/Admin/MetadataEndpointTests.cs (part 2/2))

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Explanation:

  • The diff shows the deletion of test code, which is not subject to the same architectural rules as production code. There are no violations of dependency direction, API patterns, encapsulation, public XML docs, dependency count limits, or sync-over-async issues in the context of test code. The deletion of these tests does not introduce any new issues or violate any architectural rules.

Chunk 45/48 (tests/Honua.Server.Tests/Features/API/EndpointCoverageTests.cs)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Explanation:

  • The diff is within the test code (tests/Honua.Server.Tests/Features/API/EndpointCoverageTests.cs), which allows for reflection and AOT-breaking patterns.
  • The test is correctly using async/await without sync-over-async patterns.
  • The changes in the test reflect an update in the API endpoint and resource structure, aligning with the use of a more structured MetadataResource object instead of a loosely typed JSON serialization, which is appropriate for testing serialization and deserialization.
  • The test adheres to the architectural rules regarding Minimal APIs and dependency directions, as it does not introduce any new dependencies or violate encapsulation rules.
  • No public types requiring XML documentation are introduced or modified in this diff.

Chunk 46/48 (tests/Honua.Server.Tests/Features/Admin/MetadataResourceEndpointsTests.cs)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

The diff shows compliance with the architectural rules for Honua, including proper use of minimal APIs, internal encapsulation where necessary, and adherence to the dependency direction rules. The test code is correctly using reflection and dynamic JSON, which is allowed in this context. No sync-over-async issues or excessive dependencies were observed.

Chunk 47/48 (tests/Honua.Server.Tests/Infrastructure/InMemoryMetadataResourceStore.cs)

Findings

  • No issues found in the provided diff.

Overall Assessment: APPROVED

Explanation:

  • The diff is part of test code, which allows for reflection and AOT-breaking patterns.
  • The InMemoryMetadataResourceStore class is correctly marked as internal, adhering to encapsulation rules.
  • There are no ControllerBase or ApiController usages, complying with the minimal API usage rule.
  • Dependency direction is not violated as this is test code and does not affect production dependency rules.
  • No sync-over-async issues detected; all asynchronous methods use Task.FromResult or Task.CompletedTask, which are appropriate for the in-memory operations simulated here.

Chunk 48/48 (tests/Honua.Server.Tests/TestWebApplicationFactory.cs)

Findings

  • None

Overall Assessment: APPROVED

Explanation: The diff is within test code, and all changes adhere to the rules for test environments. The addition of IMetadataResourceStore with an InMemoryMetadataResourceStore implementation is appropriate for testing purposes and does not violate any architectural rules regarding dependency direction, encapsulation, or API patterns.

Overall Assessment: NEEDS_ATTENTION


Automated architectural analysis powered by OpenAI GPT-4
This review focuses on architectural patterns and design decisions
Human review still recommended for complex changes

@mikemcdougall mikemcdougall merged commit 758eddd into trunk Jan 23, 2026
10 of 11 checks passed
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.

Implement metadata resource model (ADR-0023)

2 participants