Fix canonical names for ISO 26262 and IEC 61508 - #180
Merged
Conversation
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.
Follow-up to #179. Making ASIL and SIL findable exposed a pre-existing defect in the two parent nodes: the canonical SecID the resolver echoes back is unusable.
The symptom
Live, right now:
That name segment is the node's description, slugified — em dash, colon and all. Nobody can use it. The real identifier is
secid:control/iso.org/26262#ASIL, which resolves correctly; it is the canonical form returned to the caller that is wrong.The cause
SecID-Service derives a node's canonical name from
patterns[0], and falls back to slugifying the description whenpatterns[0]is not a clean literal. Compare, live:patterns[0]control/iso.org/14971(?i)^14971$secid:control/iso.org/14971control/iso.org/27017(?i)^27017$secid:control/iso.org/27017control/iec.ch/62061(?i)^62061$secid:control/iec.ch/62061control/iso.org/26262(?i)^26262(?:-(\d+))?$secid:control/iso.org/iso-26262-—-road-vehicles:-functional-safetycontrol/iec.ch/61508(?i)^61508(-\d+)?$secid:control/iec.ch/iec-61508-—-foundational-functional-safety-standardThe optional part-number group makes
patterns[0]a regex rather than a literal, so the fallback fires.The fix
Split the optional group into a second pattern, so
patterns[0]is a clean literal and the part-number form still matches — the same convention #134 used for version aliases:Matching behaviour is unchanged; verified
26262,26262-3,26262-11all still match andnopedoes not. Neither node'surlsuses a captured variable, so nothing depended on the capture group's position.Scope
This PR fixes only the two nodes #179 made user-facing. An audit found 170 source-level nodes across the registry with a non-literal
patterns[0], all returning description-slug canonicals today — concentrated inreference/cloudflare.com(25),control/iso.org(8),reference/nist.gov(7),reference/fedramp.gov(6),control/iec.ch(5). That is pre-existing and unrelated to ASIL/SIL, so it is filed separately rather than bundled here.Validation
validate-registry-schema.py,validate-urls.py,validate-subtypes.py,check-pattern-breadth.pyall pass. Two-line diff, no reformatting.Touches registry JSON — merging auto-deploys to the live resolver.