Repository navigation
Refuse two providers claiming one attribute name on a node type - #533
Merged
Merged
Conversation
… node type (#527) The registry now records which provider registered each attribute and refuses a second provider's claim at composition, in TypeScript, Python, C#, Java and Kotlin. - Same (type, subType): ERR_PROVIDER_ATTR_CONFLICT, message now names the owner. - Shared <type>.base root or a descendant subtype: new ERR_PROVIDER_ATTR_SHADOW, checked in both directions so registration order does not matter. - The same provider repeating its own name, sibling subtypes, and registration outside a provider's turn stay legal. A refusal leaves nothing in the registry. - The rule is scoped to one node type so the JVM registry's metadata.base chain does not make Java stricter than the other ports; the shipped core has no collision. - meta types --detail prints the registering provider; JSON carries `provider`. - ADR-0062, extending-with-providers docs, authoring skill, CHANGELOG, and shared provider-composition fixtures (attr-shadow-*, attr-ownership/). No wire-name attribute is added. Fixes #527
…ment, provider-composition README code count, stray CHANGELOG blank line. Docs state the full ADR-0062 rule. No unresolved findings.
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.
Fixes #527
What this does
Two providers can no longer register the same attribute name on one node type. The registry now records which provider registered each attribute and refuses a second provider's claim at composition, in all five ports (TypeScript, Python, C#, Java, Kotlin).
(type, subType)keepsERR_PROVIDER_ATTR_CONFLICT. Its message now names the owning provider.<type>.baseroot, or on a subtype of it, is the newERR_PROVIDER_ATTR_SHADOW. This is checked in both directions, so registration order does not matter.meta types --detailprints the registering provider next to each attribute, and its JSON output has aproviderfield.This is how per-paradigm physical-name words (
@column,@field) stay safe as providers multiply (ADR-0007, ADR-0018). No wire-name attribute is added.Notes for review
@descriptionper type next to the documentation provider's common one. Those per-type entries duplicated the common one (same type, same meaning), so they are removed and the common attribute is the single owner.@descriptionis still accepted everywhere it was.<type>.basetometadata.base; no other port has that edge, and treating it as a collision would make Java stricter than the rest.extendTypeaccepted a name another provider owned on the inherited root. That is fixed, with a shared fixture so every port is held to it.docs/features/extending-with-providers.md, the authoring skill reference and the CHANGELOG (unreleased) are updated.fixtures/provider-composition-conformance/:attr-shadow-inherited,attr-shadow-descendant, theattr-ownership/set, and the common-attribute cases for both orders.Tests run
All on the rebased branch, serially:
scripts/ci-local.sh --quick: passedHow it was validated
The no-mistakes gate ran twice. Run 1 passed review (two rounds of fixes), test, document and lint on this change, then failed at push because GitHub Git Operations was degraded. Run 2 was refused at push because it had skipped review and so had no review-approved head. Neither run published. The captain then approved pushing from the working copy after the full local suites above; the head matches what run 1 validated, rebased onto the latest main.