chore(api): add @Beta annotation + apply to NodeDefinition SPI (H2)#90
Merged
Conversation
Wires up Track H2 from the v1.6.5->1.7 readiness taskboard. Adds the @beta annotation that the G3 stability policy (#88) referenced as the planned Extension SPI / Experimental marker, applies it to the first concrete Extension SPI seam, and lifts the 'pending' hedges in the policy doc. Changes: - New com.demcha.compose.document.api.Beta annotation, sibling to @internal. Same retention/target/contract shape as @internal so guard tests handle both uniformly; lives next to @internal so IDE autocomplete surfaces both markers. - @beta applied to com.demcha.compose.document.layout.NodeDefinition - the canonical custom-node-type seam carved out of the otherwise @internal document.layout package. The interface Javadoc now explains the Extension SPI contract and links the stability policy. - BetaAnnotationDocumentationTest pins the annotation contract (retention, @documented, target set, source-Javadoc invariants, same-package-as-@internal) in the same shape InternalAnnotationDocumentationTest pins @internal. - docs/api-stability.md: @beta annotation reference cells in section 1 are no longer hedged as 'pending'; the associated quote block lists both markers side-by-side with the guard tests. - docs/architecture/package-map.md: new intro paragraph documents the stability-marker convention; document.layout row now calls out NodeDefinition as the current @beta seam. Suite: 1029 tests, 0 failures, 0 errors (+5 from BetaAnnotationDocumentationTest).
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.
Summary
Wires up Track H2 from the v1.6.5→1.7 readiness taskboard. The G3 stability policy (#88) referenced
@Betaas the planned Extension SPI / Experimental marker; this PR ships the annotation, applies it to the first concrete Extension SPI seam, and lifts the "pending" hedges in the policy doc.Changes
New annotation —
com.demcha.compose.document.api.BetaSibling to the existing
@Internalmarker. Same shape —@Documented,@Retention(RUNTIME),@Target({TYPE, METHOD, FIELD, CONSTRUCTOR, PACKAGE})— so architecture guard tests can read both reflectively. Lives next to@Internalso IDE autocomplete surfaces both markers.The annotation's docstring documents two usages:
The distinction lives in the annotated element's own Javadoc, not in the annotation itself.
First application —
NodeDefinitionis now@Betacom.demcha.compose.document.layout.NodeDefinitionis the canonical Extension SPI seam — the interface library users implement to register custom node types. Its Javadoc now explicitly explains the seam ("carved out of the otherwise@Internaldocument.layoutpackage") and links the API stability policy § 1 Extension SPI row.Additional Extension SPI surfaces (render-handler interfaces, fragment-payload interfaces designed for extension) will gain the marker incrementally as their contract solidifies — tracked as follow-up.
Tests —
BetaAnnotationDocumentationTestPins the annotation's contract in the same shape
InternalAnnotationDocumentationTestpins@Internal:RUNTIMEretention@Betareflectively (matches@Internal).@Documented@Internal.docs/api-stability.md, directs users to the issue tracker.Beta.class.getPackage() == Internal.class.getPackage()— IDE autocomplete invariant.Documentation updates
docs/api-stability.md—@Betareference cells in § 1 are no longer hedged as "pending"; the associated quote block lists both markers side-by-side with the guard tests that pin them.NodeDefinitionnow linked from the Extension SPI row.docs/architecture/package-map.md— new intro paragraph documents the stability-marker convention; thedocument.layoutrow calls outNodeDefinitionas the current@Betaseam.Verification
CHANGELOG entry added to
v1.6.6 — Plannedunder new### Public APIand existing### Documentationsubsections.Test plan
BetaAnnotationDocumentationTest5/5 greenInternalAnnotationCoverageTest/InternalAnnotationDocumentationTestunchanged and still greendocument.layoutrow carry the marker convention@Betato the rest of the Extension SPI surface (render-handler interfaces, fragment-payload interfaces) as each seam's contract solidifies