feat(wfs): implement WFS 2.0 compatibility flow (#376)#459
feat(wfs): implement WFS 2.0 compatibility flow (#376)#459mikemcdougall merged 7 commits intotrunkfrom
Conversation
🤖 PR Template Validation✅ All checks passed! Your PR follows the template correctly. Next steps:
Automated validation powered by GitHub Actions |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e6e3e8cd4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var requestParam = request ?? context.Request.Query[Wfs20Utilities.ParameterNames.Request].FirstOrDefault(); | ||
|
|
||
| if (string.IsNullOrEmpty(requestParam)) | ||
| { | ||
| return StandardErrorHelpers.CreateBadRequest(context, |
There was a problem hiding this comment.
Parse POST WFS operations from XML bodies
MapMethods("/wfs", ["GET","POST"]) advertises POST support, but HandleWfsRequest only derives the operation from the bound/query request parameter and never inspects the XML request body. A standard XML-WFS POST (for example <wfs:GetFeature ...>...</wfs:GetFeature>) will therefore hit the missing-request branch and return a 400, even though capabilities metadata advertises POST bindings for operations.
Useful? React with 👍 / 👎.
| var version = query[ParameterNames.Version].FirstOrDefault(); | ||
| if (version != Version) | ||
| { | ||
| return $"Unsupported version. Expected '{Version}', got '{version}'"; |
There was a problem hiding this comment.
Allow GetCapabilities negotiation without VERSION
HandleGetCapabilities includes explicit ACCEPTVERSIONS handling, but ValidateRequestParameters rejects any request where VERSION is absent or different before that negotiation logic runs. This causes requests like SERVICE=WFS&REQUEST=GetCapabilities&ACCEPTVERSIONS=2.0.0 to fail with an unsupported version error, effectively breaking the version-negotiation path the handler is trying to support.
Useful? React with 👍 / 👎.
| return feature.Attributes.TryGetValue(valueReference.CanonicalName, out var value) | ||
| ? value | ||
| : null; |
There was a problem hiding this comment.
Return geometry in GetPropertyValue extraction
ResolveValueReference marks geometry requests (IsGeometry = true), but ExtractValue only returns feature.Id or an attribute lookup and never reads feature.Geometry. As a result, GetPropertyValue requests targeting a geometry property produce empty values in <wfs:member> elements instead of the requested geometry content.
Useful? React with 👍 / 👎.
🤖 LLM Architecture Review🏗️ Architecture Review Summary Process Checks:
Diff Review Chunks: 31 Chunk 1/31 (src/Honua.Core/Features/Catalog/Domain/CatalogMetadata.cs)Findings
Overall Assessment: APPROVED Chunk 2/31 (src/Honua.Core/Features/Catalog/Domain/ServiceProtocols.cs)Findings
Overall Assessment: APPROVED The changes in the diff are compliant with the architectural rules:
Chunk 3/31 (src/Honua.Core/Queries/Filters/Fes20/Fes20Parser.cs (part 1/3))Findings
Overall Assessment: NEEDS_ATTENTION Chunk 4/31 (src/Honua.Core/Queries/Filters/Fes20/Fes20Parser.cs (part 2/3))Findings
Overall Assessment: BLOCKING_ISSUES Chunk 5/31 (src/Honua.Core/Queries/Filters/Fes20/Fes20Parser.cs (part 3/3))Findings
Overall Assessment: APPROVED (Note: The provided diff does not contain any substantial code or changes that could be evaluated against the specified architectural rules. It appears to be an empty or incomplete file addition.) Chunk 6/31 (src/Honua.Server/Features/Infrastructure/Hosting/FeatureRegistrationExtensions.cs)Findings
Overall Assessment: APPROVED The changes in the diff are consistent with the architectural guidelines of Honua. The addition of Chunk 7/31 (src/Honua.Server/Features/Infrastructure/Models/ProtocolRequestClassifier.cs)Findings
Overall Assessment: APPROVED Chunk 8/31 (src/Honua.Server/Features/Infrastructure/Models/StandardErrorHelpers.cs)Findings
Overall Assessment: APPROVED The changes in the diff adhere to the architectural rules of Honua, focusing on encapsulation, AOT safety, and proper API patterns. The modifications enhance encapsulation by changing public methods to internal, which is in line with the requirement for infrastructure implementation types. There are no issues with dependency direction, excessive dependencies, or sync-over-async patterns in this diff. Chunk 9/31 (src/Honua.Server/Features/Infrastructure/Models/StandardErrorResponseFormatter.cs)Findings
Overall Assessment: BLOCKING_ISSUES The changes to method visibility are critical as they could break existing functionality if there are external dependencies on these methods. Additionally, the handling of XML through string manipulation in Chunk 10/31 (src/Honua.Server/Features/Infrastructure/Models/XmlResultSerializer.cs)Findings
Overall Assessment: BLOCKING_ISSUES The use of Chunk 11/31 (src/Honua.Server/Features/Wfs20/Models/Wfs20Models.cs (part 1/3))Findings
Overall Assessment: BLOCKING_ISSUES The use of Chunk 12/31 (src/Honua.Server/Features/Wfs20/Models/Wfs20Models.cs (part 2/3))Findings
Overall Assessment: BLOCKING_ISSUES The issues identified are critical as they directly violate the encapsulation and AOT-compliance rules of the Honua architecture. These must be addressed to ensure the system's integrity and compatibility with AOT environments. Chunk 13/31 (src/Honua.Server/Features/Wfs20/Models/Wfs20Models.cs (part 3/3))Findings
Overall Assessment: BLOCKING_ISSUES Chunk 14/31 (src/Honua.Server/Features/Wfs20/Services/Wfs20Handler.cs (part 1/6))Findings
Overall Assessment: BLOCKING_ISSUES Chunk 15/31 (src/Honua.Server/Features/Wfs20/Services/Wfs20Handler.cs (part 2/6))Findings
Overall Assessment: NEEDS_ATTENTION Note: The assessment is based on the provided diff. The visibility of Chunk 16/31 (src/Honua.Server/Features/Wfs20/Services/Wfs20Handler.cs (part 3/6))Findings
Overall Assessment: NEEDS_ATTENTION Chunk 17/31 (src/Honua.Server/Features/Wfs20/Services/Wfs20Handler.cs (part 4/6))Findings
Overall Assessment: NEEDS_ATTENTION Chunk 18/31 (src/Honua.Server/Features/Wfs20/Services/Wfs20Handler.cs (part 5/6))Findings
Overall Assessment: NEEDS_ATTENTION The usage of direct JSON serialization needs to be addressed to ensure AOT compatibility. Additionally, the design of the Chunk 19/31 (src/Honua.Server/Features/Wfs20/Services/Wfs20Handler.cs (part 6/6))Findings
Overall Assessment: BLOCKING_ISSUES The use of potentially reflection-based XML APIs and dynamic JSON serialization needs attention to ensure AOT compatibility. Additionally, the complexity of the handler may need to be reduced to adhere to architectural guidelines. Chunk 20/31 (src/Honua.Server/Features/Wfs20/Services/Wfs20QueryServices.cs)Findings
Overall Assessment: APPROVED The class is well-designed within the architectural guidelines of the Honua project, focusing on encapsulation, AOT compatibility, and proper documentation. No violations were found in the reviewed diff. Chunk 21/31 (src/Honua.Server/Features/Wfs20/Wfs20DispatcherEndpoint.cs (part 1/2))Findings
Overall Assessment: BLOCKING_ISSUES The use of sync-over-async patterns is a blocking issue as it can severely impact the scalability and responsiveness of the server. Additionally, the potential violation of architectural principles regarding separation of concerns needs to be addressed to maintain code quality and ease of maintenance. Chunk 22/31 (src/Honua.Server/Features/Wfs20/Wfs20DispatcherEndpoint.cs (part 2/2))Findings
Overall Assessment: APPROVED (Note: The provided diff does not contain any code or changes that can be evaluated against the specified architectural rules. It appears to be an empty or incomplete diff chunk.) Chunk 23/31 (src/Honua.Server/Features/Wfs20/Wfs20Endpoints.cs)Findings
Overall Assessment: APPROVED Explanation:
Chunk 24/31 (src/Honua.Server/Features/Wfs20/Wfs20Log.cs)Findings
Overall Assessment: APPROVED The diff shows the addition of a new internal static partial class Chunk 25/31 (src/Honua.Server/Features/Wfs20/Wfs20ServiceCollectionExtensions.cs)Findings
Overall Assessment: NEEDS_ATTENTION Chunk 26/31 (src/Honua.Server/Features/Wfs20/Wfs20Utilities.cs (part 1/2))Findings
Overall Assessment: APPROVED The diff adheres to the architectural rules specified:
Chunk 27/31 (src/Honua.Server/Features/Wfs20/Wfs20Utilities.cs (part 2/2))Findings
Overall Assessment: APPROVED The code adheres to the architectural rules set for Honua, including appropriate use of static methods, AOT-safe patterns, and sufficient documentation for public methods. There are no dependency direction issues or inappropriate API patterns (like ControllerBase or ApiController usage). The encapsulation and internal visibility rules are not violated as the methods are static utility functions, not infrastructure components requiring encapsulation. Chunk 28/31 (src/Honua.ServiceDefaults/HonuaTelemetry.cs)Findings
Overall Assessment: APPROVED The diff shows a simple addition of a constant string with appropriate XML documentation in a public static class, which does not violate any of the specified architectural rules. Chunk 29/31 (tests/Honua.Architecture.Tests/VerticalSliceIsolationTests.cs)Findings
Overall Assessment: APPROVED Explanation:
Chunk 30/31 (tests/Honua.Server.Tests/Features/Wfs20/Wfs20EndpointsTests.cs)Findings
Overall Assessment: APPROVED Explanation:
Chunk 31/31 (tests/Honua.TestKit/Constants/Protocols.cs)Findings
Overall Assessment: APPROVED Explanation:
Overall Assessment: NEEDS_ATTENTION Automated architectural analysis powered by OpenAI GPT-4 |
3cbcabb to
ef706f7
Compare
Pull Request
Issue Link
Fixes #376
Summary
Replace the placeholder WFS 2.0 implementation with a catalog-backed
/wfssurface, align advertised capabilities with actual behavior, and harden the local/CI CITE conformance flow so missing Team Engine results fail instead of reporting false success.Changes Made
/wfsto use real catalog layers and feature stores for capabilities, schema generation,GetFeature, andGetPropertyValueTesting
scripts/pre-pr-check.sh)Coverage Impact
Breaking Changes
None
Additional Context
cite-wfs20-results/and ad hoc XML captures underdocker/remain untracked and are not part of this PR.Pre-PR Checklist (for contributor)
scripts/pre-pr-check.shand all checks passedtype: description (#issue-number)Reviewer Checklist