feat(spec)!: enforce strict allOf form for derivation and redesign tr…#76
Closed
aviator5 wants to merge 1 commit into
Closed
feat(spec)!: enforce strict allOf form for derivation and redesign tr…#76aviator5 wants to merge 1 commit into
aviator5 wants to merge 1 commit into
Conversation
05003b8 to
beed95c
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…aits as URN-referenced types - Add §3.2.1 (Top-level composition rules): derived GTS Type Schemas MUST use the canonical single-item allOf with a \$ref to the immediate parent; overlay constraints live at the top level. Top-level anyOf/oneOf/not are forbidden on all GTS Type Schemas (nested usage is unaffected). Rationale captured in ADR-0002. - Rewrite §9.7 traits model: x-gts-traits-schema becomes a single GTS Type URN string referencing a registered trait-type; inline schema, \$ref, and composition forms are removed. Trait-types are first-class GTS Type Schemas with their own parallel-derivation chain. Shallow merge with immutable-once-set semantics preserved. - Make the trait-completeness rule explicit: a non-abstract host with unresolved required trait fields is invalid by definition; registry MUST reject it at registration and OP#6 MUST reject instances of it as defense in depth. - Extend OP#12 to enforce the structural rules from §3.2.1 in addition to the existing constraint-compatibility checks. - Migrate all examples in events/types/, mcp/types/, and typespec/vms/types/ to strict Form A and the new trait-type model. Add gts.x.core.traits.event_meta.v1~ as the canonical trait-type referenced by the base event schema. - Update the register_derived test helper to emit strict Form A (single-item allOf + overlay spread at top level). Add register_trait_type and register_host_with_trait_ref helpers. - Add 15 structural test classes to test_op12_* covering canonical form, rejections (Form B, 3+ items, no-\$ref, multi-\$ref, skip-level, wrong parent, hybrid, top-level union/negation, base-with-allOf), and accepted nested-union shapes. - Rewrite test_op13_* (38 classes) around URN-referenced trait-types: value validation cases, trait-type derivation (narrowing, loosening rejection, field extension, default inheritance), parallel-derivation rules, abstract vs concrete completeness, MAJOR-version pinning, cycle detection, and instance-validation defense-in-depth. - Migrate the three trait-aware tests in test_refimpl_x_gts_final_abstract.py to the URN model. - Add ADR-0002 (MADR) with worked Option-1..4 comparison, running example, and explicit payload behavior under each option. - Log change as version 0.12 (BREAKING). Signed-off-by: Aviator 5 <ai.agent.tor@gmail.com>
beed95c to
4d5d49e
Compare
Collaborator
Author
|
superseded with #77 |
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.
…aits as URN-referenced types