Repository navigation
feat: align with gts-spec v0.17.0 (pattern engine, regex profile, reference keywords) - #6
Merged
Artifizer merged 4 commits intoOct 24, 2026
Conversation
Port the reference pattern engine (README section 10) and use it for OP#1 ID validation, OP#3 parsing, OP#4 matching and query wildcards. It enforces unsigned 32-bit version bounds, the 1024-char limit and the single-segment-instance rule, and decides coverage for pattern candidates. Signed-off-by: Artifizer <artifizer@gmail.com>
Check every pattern, patternProperties key and format: regex value against the ECMA-262 u / RE2 profile (README section 11.0.1, ADR-0006), including targets reached only through $ref. Supported expressions are translated to reference semantics (code-point atoms, ASCII \d \w \s, $ as end of input) and matched in linear time with the non-backtracking engine, replacing the 250 ms match timeout. additionalProperties no longer compiles sibling patternProperties with the ECMAScript engine, which rejected in-profile astral ranges. Signed-off-by: Artifizer <artifizer@gmail.com>
…ce keywords Implement x-gts-type-ref, x-gts-instance-ref and x-gts-pattern-ref (README section 9.6) and reject the removed x-gts-ref. Derivation and evolution checks include the reference dimension via semantic scope inclusion, and derived properties composed with allOf are flattened before comparison. Bump the gts-spec pin to v0.17.0. Harden reference resolution: - resolve local refs of an inlined document against that document; - cap inlining at 100,000 nodes so shared refs cannot grow exponentially; - leave literal data (const, enum, default, examples) untouched; - evaluate the structural part of a reference-bearing not; - key the recursive-ref guard by instance path so every level is checked; - accept unsigned 32-bit versions in /$id. Signed-off-by: Artifizer <artifizer@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Contributor
code-ranker: 1 finding View report ↗csharp: 1 finding🤖 Prompt for fix all with AIupdated 2026-10-24 17:11 UTC |
Signed-off-by: Artifizer <artifizer@gmail.com>
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
Brings gts-dotnet in line with gts-spec v0.17.0. The full spec suite passes:
./gts.sh gts-dotnetgives 2367 passed, 0 failed.GtsPatternhandles identifier matching and coverage. It is used for ID validation (OP#1), parsing (OP#3), matching (OP#4) and query wildcards. Versions are unsigned 32-bit and a single-segment instance ID is rejected.$ref. They are translated to reference semantics (code-point atoms, ASCII\d\w\s,$matching end of input) and run on the linear-time non-backtracking engine, replacing the 250 ms timeout.additionalPropertiesno longer recompilespatternPropertieswith the ECMAScript engine, which rejected astral ranges.x-gts-type-ref,x-gts-instance-refandx-gts-pattern-refreplacex-gts-ref, which is now rejected as an unknown keyword (breaking). Derivation and evolution checks now cover references by testing semantic scope inclusion.const,enum,default,examples) is left unchanged.notcontaining a reference keyword also checks its structural part, so values of another type are no longer wrongly rejected./$idaccepts unsigned 32-bit versions.Stacked on #4 (CI workflow); retarget to
mainonce #4 merges.Test plan
dotnet test(165 existing tests plus 5 new ones inReferenceResolutionHardeningTests)dotnet format whitespace|style --verify-no-changes./gts.sh gts-dotnetagainst gts-spec v0.17.0: 2367 passed