Add S-201 validation rule pack#121
Merged
Merged
Conversation
Implements the tenth and final GML-spec validation rule pack, closing the gap left after PRs #100–109. S-201 datasets opened in the viewer now populate the Validation tab (PR #115) automatically. Rules (all targeting S201AtonInventory): - S201-R-1.1 CoordinatesInWgs84Range (Error) — S-100 Part 10b §6.2 - S201-R-1.2 GmlIdsUnique (Error) — S-100 Part 10b §6.4 - S201-R-1.3 NavigableAtoNHasGeometry (Warning) — exempts Virtual AIS - S201-R-2.1 PhysicalAisHasMmsi (Error) — 9-digit MMSI required - S201-R-2.2 VirtualAisMmsiFormat (Warning) — when present, 9 digits - S201-R-3.1 ChangeTypesInEnumeration (Error) — codelist 1–4 - S201-R-4.1 DateRangeOrdered (Warning) — fixed/periodic range bounds - S201-R-5.1 EquipmentHasHostStructure (Warning) — StructureEquipment - S201-R-6.1 AggregationHasMembers (Warning) — ≥ 2 peers - S201-R-6.2 AggregationMembersResolved (Error) — peer xlink resolution Wires the rule pack into S201DatasetProcessor.Validate() via the shared ValidationRunner pattern, and adds 64 unit tests (in-memory inventory builders, pass+fail per rule, plus Default-rule-set smoke tests). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Performance Gate✅ PASSED — no regressions. Threshold: 10.0%, MAD multiplier (k): 3.0, retry-zone mult: 2.0× Scenario summary
exchange-set-openIteration statistics
Spans (sum of all iterations)
Metrics
s101-portray-coldIteration statistics
Spans (sum of all iterations)
Metrics
s101-portray-warmIteration statistics
Spans (sum of all iterations)
Metrics
s101-render-warmIteration statistics
Spans (sum of all iterations)
Metrics
s102-coverageIteration statistics
Spans (sum of all iterations)
Metrics
s102-coverage-openIteration statistics
Spans (sum of all iterations)
Metrics
s102-coverage-render-largeIteration statistics
Spans (sum of all iterations)
Metrics
s124-vectorIteration statistics
Spans (sum of all iterations)
Metrics
s201-vectorIteration statistics
Spans (sum of all iterations)
Metrics
Generated by EncDotNet.S100.PerfReport gate command |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
S-201 was the last GML product spec returning
nullfrom its processor'sValidate()method, so the viewer's new Validation tab (PR #115) showed "Validation rules not yet defined for S-201". This PR closes that gap with a ten-rule pack modelled onS125AtonRules, tuned for the IALA authority-to-authority exchange audience (tight conformance, inventory integrity, lifecycle correctness).The rules consume the typed
S201AtonInventoryprojection (no new model fields), and the processor wires them through the sharedValidationRunner.Runpattern used by the nine sibling packs. Once this lands, opening an S-201 dataset in the viewer automatically populates the Validation tab — no viewer changes required.Rules
S201-R-1.1CoordinatesInWgs84RangeS201-R-1.2GmlIdsUniquegml:iduniqueness across AtoNs, aggregations, associations, info typesS201-R-1.3NavigableAtoNHasGeometryS201-R-2.1PhysicalAisHasMmsiS201-R-2.2VirtualAisMmsiFormatS201-R-3.1ChangeTypesInEnumerationS201-R-4.1DateRangeOrderedS201-R-5.1EquipmentHasHostStructureS201Equipmentresolves to a host structureS201-R-6.1AggregationHasMembersS201-R-6.2AggregationMembersResolvedNotes / deviations from the kickoff
A few candidates in the kickoff didn't fit the typed model and were dropped or replaced:
S201AtonStatusIndication(that's S-125 only), so the status-indication position rule is omitted.S201AtonObjectitself (FixedDateRange/PeriodicDateRange), not onS201AtonStatusInformation, so the "lifecycle vs removal" rule is reframed asS201-R-4.1against those properties.ChangeTypesis a 4-value codelist in S-201 (vs 5 in S-125) — easy trap if mirroring S-125 verbatim.S201Equipment.HostStructureis type-system-locked toS201StructureObject?and structures have no host, so host-of-host cycles are impossible. The slot is repurposed asS201-R-6.2(aggregation xlink resolution), reconstructed by comparing typedPeers.Lengthagainst the rawpeer-roleFeatureReferencesto surface dropped references.Spec alignment
s100-framework)s101-enc)s102-bathymetry)s104-water-level)s111-surface-currents)s124-nav-warnings)s129-ukc)S-201 (no checkbox in the template, but the
s201-aton-informationskill was consulted).Spec section references cited in code/docs:
S201-R-1.1gml:iduniqueness) —S201-R-1.2ChangeTypes—S201-R-3.1Tests
tests/SkippableFactdotnet test --configuration Releasepasses locally64 new tests in
tests/EncDotNet.S100.Datasets.S201.Tests/Validation/S201AtonRulesTests.cs(pass + fail per rule, plus twoDefaultsmoke tests). S-201 test suite: 64 passed / 1 skipped (real-dataset gate) / 0 failed. Pipelines suite: 340 passed.Documentation
src/<project>/README.mddocs/if user-facing behaviour changedS201AtonRulesis public with full XML docs. No user-facing behaviour change beyond the Validation tab automatically populating.Dependencies
Directory.Packages.props(not in the.csproj)gh-advisory-databasesecurity check run for any new dependencyNone added.
Breaking changes
None.