Skip to content

Clarify GTS annotation scope and expand OP#12/OP#13 compatibility coverage#82

Merged
Artifizer merged 3 commits into
GlobalTypeSystem:mainfrom
aviator5:fix-tests
Jun 25, 2026
Merged

Clarify GTS annotation scope and expand OP#12/OP#13 compatibility coverage#82
Artifizer merged 3 commits into
GlobalTypeSystem:mainfrom
aviator5:fix-tests

Conversation

@aviator5

@aviator5 aviator5 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator
  • Clarifies that x-gts-* annotation keywords have GTS semantics only in Type Schema documents; same-named fields in instances are ordinary data unless constrained by the instance schema.
  • Adds conformance coverage for OP#12/OP#13 edge cases around closed descendant schemas, orphaned ancestor properties/traits, abstract trait-schema compatibility, and valid trait-schema narrowing.

Summary by CodeRabbit

  • Documentation

    • Clarified how certain GTS keywords are interpreted in instance documents.
    • Updated wording so these fields are treated as normal data unless a schema explicitly constrains them.
  • Tests

    • Added coverage for nested closure and ancestor-property validation rules.
    • Expanded trait-schema validation tests for abstract and non-abstract compatibility cases.
    • Removed tests that expected instance documents to be rejected solely for containing GTS keyword names.

aviator5 added 3 commits June 24, 2026 14:36
- Register concrete instances that carry schema-only trait fields before validating failure cases.
- Point entity validation at the invalid instance IDs instead of schema IDs.

Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
- Update README wording so GTS annotation keywords only carry semantics in Type Schemas.
- Remove conformance tests that required rejecting same-named fields in instance documents.

Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
- Add nested OP#12 coverage for closed descendant schemas orphaning ancestor properties.
- Add OP#13 abstract trait-schema cases for incompatible narrowing, closed descendants, nested traits, and valid narrowing without values.

Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ac54d9ad-2744-4bfc-9deb-0a5cddd9cdf2

📥 Commits

Reviewing files that changed from the base of the PR and between 148e146 and a42b477.

📒 Files selected for processing (4)
  • README.md
  • tests/test_op12_type_derivation_validation.py
  • tests/test_op13_schema_traits_validation.py
  • tests/test_refimpl_x_gts_final_abstract.py

📝 Walkthrough

Walkthrough

README wording now treats x-gts-traits-schema, x-gts-traits, x-gts-final, and x-gts-abstract as meaningful only in JSON Schema documents. The tests add closed-descendant and trait-schema compatibility cases, and remove instance-body rejection coverage for x-gts-final and x-gts-abstract.

Changes

GTS keyword semantics

Layer / File(s) Summary
Keyword placement semantics
README.md, tests/test_refimpl_x_gts_final_abstract.py
Updates the spec wording for x-gts-* keywords in instance documents and removes the x-gts-final / x-gts-abstract instance-body rejection tests.
Closed descendant validation
tests/test_op12_type_derivation_validation.py, tests/test_op13_schema_traits_validation.py
Adds the OP 12 nested closed-descendant failure case, imports register_instance, and expands OP 13 with abstract trait-schema compatibility and orphaning cases under allOf, plus removal of the instance-document trait keyword rejection tests.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • GlobalTypeSystem/gts-spec#61: Introduced the OP 13 trait keyword semantics and the x-gts-traits-schema / x-gts-traits README and test coverage that this PR updates.
  • GlobalTypeSystem/gts-spec#67: Added the x-gts-final / x-gts-abstract modifier support whose instance-body rejection tests are removed here.
  • GlobalTypeSystem/gts-spec#77: Defines the ADR-focused trait-schema compatibility and orphaning rules that the new OP 13 tests exercise.

Suggested reviewers

  • Artifizer

Poem

🐇 I nibbled the schema moonbeams bright,
and tucked old keyword rules out of sight.
Closed burrows now ask fields to stay aligned,
while instance leaves are just data defined.
Hop-hop—clean tests in the cool night!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 accurately summarizes the README scope clarification and the added OP#12/OP#13 compatibility tests.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 requested a review from Artifizer June 24, 2026 22:14
@Artifizer Artifizer merged commit 5d5ef1d into GlobalTypeSystem:main Jun 25, 2026
2 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