Skip to content

fix(spec): correct GTS version matching and enforce u32 bounds - #124

Merged
Artifizer merged 2 commits into
GlobalTypeSystem:mainfrom
aviator5:x-gts-pattern-ref-fix
Oct 13, 2026
Merged

Artifizer merged 2 commits into
GlobalTypeSystem:mainfrom
aviator5:x-gts-pattern-ref-fix

Conversation

@aviator5

@aviator5 aviator5 commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation
    • Clarified how reference patterns match identifiers, including omitted versus explicit minor versions, wildcard behavior, and selection coverage independent of registry contents.
    • Specified that major and minor versions range from 0 to 4,294,967,295, and clarified the distinction between concrete-reference fields and pattern-reference fields.
  • Bug Fixes
    • Pattern matching now checks whether a candidate’s full selection is covered and distinguishes omitted minor versions from explicit-minor wildcards.
    • Minor-flexible references match instances across minor versions of the same major; explicit minors and UUIDs must match exactly.
    • Identifier validation and parsing now reject version components above the supported limit.

Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
@aviator5
aviator5 marked this pull request as ready for review October 12, 2026 20:54
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cd89c463-d5cb-4069-82f0-b7fe1eb2f70f
📥 Commits

Reviewing files that changed from the base of the PR and between 8633d29 and 2e6a12d.

📒 Files selected for processing (11)
  • README.md
  • adr/0007-gts-pattern-ref.md
  • tests/README.md
  • tests/test_gts_id_pattern_syntax_unit.py
  • tests/test_id_version_bounds.py
  • tests/test_op10_query_execution.py
  • tests/test_op12_type_derivation_validation.py
  • tests/test_op4_id_match_pattern.py
  • tests/test_op8_compatibility_checking.py
  • tests/test_refimpl_x_gts_ref.py
  • tests/test_x_gts_pattern_ref.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5a32db77-3b10-4452-ac1a-2932878d0ee4
📥 Commits

Reviewing files that changed from the base of the PR and between 73bffc0 and 8633d29.

📒 Files selected for processing (6)
  • README.md
  • adr/0007-gts-pattern-ref.md
  • tests/README.md
  • tests/test_op10_query_execution.py
  • tests/test_op12_type_derivation_validation.py
  • tests/test_op8_compatibility_checking.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The specification now limits version components to unsigned 32-bit values and defines matching and coverage rules for concrete identifiers and patterns. Tests cover minor-version behavior, reference validation, pattern coverage, compatibility, derivation, and query results.

Changes: Identifier Matching

Layer / File(s) Summary
Unsigned 32-bit version bounds
README.md, tests/test_gts_id_pattern_syntax_unit.py, tests/test_x_gts_pattern_ref.py, tests/test_id_version_bounds.py
The specification and syntax checks limit numeric version components to 0–4294967295. Tests cover boundary values, overflow, and the 1024-character pattern limit.
Pattern matching and coverage
README.md, adr/0007-gts-pattern-ref.md, tests/test_op4_id_match_pattern.py, tests/test_x_gts_pattern_ref.py, tests/README.md
The specification and tests distinguish omitted minors from minor wildcards and define pattern coverage across valid identifiers. They also clarify x-gts-pattern-ref validation and OP#7 relationship reporting.
Concrete reference matching
README.md, tests/test_refimpl_x_gts_ref.py
Concrete reference matching allows omitted-minor variation within the same major and identifier structure. Explicit operand minors and UUID tails require exact matches. Tests check registry lookup behavior across validation modes.
Compatibility, derivation, and query conformance
tests/test_op8_compatibility_checking.py, tests/test_op12_type_derivation_validation.py, tests/test_op10_query_execution.py, tests/README.md
Tests check pattern-scope compatibility and derivation, and verify query results for base, derived, and instance identifiers under version wildcard rules.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Suggested reviewers: artifizer

Merge Risk: ⚪ Minimal · up to 8633d

No identified issue prevents merging after normal checks.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 61.54% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 8 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main changes: correcting GTS version matching and enforcing unsigned 32-bit version bounds.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 61.54% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 8 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aviator5
aviator5 force-pushed the x-gts-pattern-ref-fix branch 2 times, most recently from 73bffc0 to 8633d29 Compare October 13, 2026 07:56
@code-ranker-app

code-ranker-app Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

code-ranker

Built on a fork. View full report ↗

md
Metric Baseline Current Δ
Coupling
fan_out — Outgoing dependencies 2.5 2.6 +0.091

…unds

- Distinguish concrete matching from selector coverage and explain minor-version rules.
- Correct query expectations to include matching base types and add version-selection regressions.
- Cover minor-version narrowing and widening in compatibility and derivation tests.
- Clarify that optional relationship reporting cannot affect pattern validation.
- Limit major and minor versions to unsigned 32-bit values and update conformance vectors.

Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
@aviator5
aviator5 force-pushed the x-gts-pattern-ref-fix branch from 8633d29 to 2e6a12d Compare October 13, 2026 08:04
@Artifizer
Artifizer merged commit 2e150d6 into GlobalTypeSystem:main Oct 13, 2026
4 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.

2 participants