Add @interfaceObject for interface default implementations - #233
michaelstaib wants to merge 7 commits into
Conversation
✅ Deploy Preview for composite-schemas ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
# Conflicts: # spec/Section 4 -- Composition.md
There was a problem hiding this comment.
🟡 Changes recommended
The new ProjectedFieldNames(interface) definition is inconsistent with the PR’s other “non-key field” semantics and can cause contradictory projection vs validation behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR extends the composition specification to support interface default implementations via @interfaceObject stand-ins and explicit replacement via @implement, including the corresponding merge, validation, and satisfiability rules.
Changes:
- Adds the
@interfaceObjectdirective to the Source Schema spec and documents how stand-ins contribute interface fields. - Introduces/updates Composition rules to validate stand-ins (e.g., key presence/matching) and to project stand-in field implementations onto implementing types with
@implement/@shareablesemantics. - Updates spelling dictionary to recognize new spec terminology used by the added algorithms.
File summaries
| File | Description |
|---|---|
| spec/Section 4 -- Composition.md | Adds new composition/validation/satisfiability algorithms for @interfaceObject and @implement, including projected field ownership and planning rules. |
| spec/Section 2 -- Source Schema.md | Defines @interfaceObject and documents stand-in behavior and interactions with @shareable/@override. |
| cspell.yml | Adds new spec terms used by the added algorithms. |
Review details
- Files reviewed: 2/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
@interfaceObject and @implement for interface default implementations@interfaceObject for interface default implementations
Supersedes #232