chore(api): add class-level @since to public entry points + coverage guard (H1)#89
Merged
Merged
Conversation
…guard (H1) Wires up Track H1 from the v1.6.5→1.7 readiness taskboard. 26 public types in the canonical user-reached packages now carry class-level @SInCE 1.0.0 Javadoc tags so callers see the introduction version at IDE quick-doc / generated Javadoc time without trawling CHANGELOG history. Files updated (class-level @SInCE 1.0.0): com.demcha.compose.GraphCompose com.demcha.compose.document.api.DocumentSession com.demcha.compose.document.api.DocumentPageSize com.demcha.compose.document.api.PageBackgroundFill com.demcha.compose.document.dsl.DocumentDsl com.demcha.compose.document.dsl.RichText com.demcha.compose.document.dsl.Transformable com.demcha.compose.document.dsl.{19 *Builder.java} Baseline @SInCE 1.0.0 is the pragmatic choice: these are foundational types that have shipped since the first GraphCompose release and predate the CHANGELOG history that could pin a more specific version. New public types added in subsequent PRs should use the upcoming release version (e.g. @SInCE 1.6.6). New guard: PublicApiSinceTagCoverageTest source-scans the three entry-point roots (GraphCompose.java, document.api/, document.dsl/) and fails the build if a new public top-level type lands without a class-level @SInCE tag. internal/ sub-packages are excluded by convention — InternalAnnotationCoverageTest covers those. Method-level @SInCE backfill for the ~380 public methods in these packages is intentionally out of scope; method @SInCE is now policy for ALL new public methods (the senior-review skill enforces this on new code) but retrofitting the existing surface is its own task. Verification: - ./mvnw -B -ntp test -pl . -Dtest=PublicApiSinceTagCoverageTest -> 1 test, 0 failures (guard green against current state) - ./mvnw -B -ntp test -pl . -> full suite green, no regression from the bulk Javadoc edits CHANGELOG entry added to v1.6.6 — Planned ### Build section.
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 H1 from the v1.6.5→1.7 readiness taskboard. The G3 stability policy (#88) pins what
@sinceis supposed to mean; this PR makes it true on the canonical entry-point surface.26 public types in the canonical user-reached packages now carry class-level
@since 1.0.0Javadoc tags so callers see the introduction version at IDE quick-doc / generated Javadoc time without trawling CHANGELOG history. A new architecture guard fails the build if a future public top-level type lands in these packages without a class-level@since.What changes
@since 1.0.0added (class-level Javadoc)com.demcha.composeGraphComposecom.demcha.compose.document.apiDocumentSession,DocumentPageSize,PageBackgroundFillcom.demcha.compose.document.dslDocumentDsl,RichText,Transformable+ 19 builders (AbstractFlowBuilder,BarcodeBuilder,CanvasLayerBuilder,DividerBuilder,EllipseBuilder,ImageBuilder,LayerStackBuilder,LineBuilder,ListBuilder,ModuleBuilder,PageBreakBuilder,PageFlowBuilder,ParagraphBuilder,RowBuilder,SectionBuilder,ShapeBuilder,ShapeContainerBuilder,SpacerBuilder,TableBuilder)Total: 26 files.
Baseline choice — why
@since 1.0.0These are foundational types that have shipped since the first GraphCompose release and predate the CHANGELOG history that could pin a more specific version. The pragmatic baseline communicates "this is in the API from the beginning"; new public types added in subsequent PRs use the upcoming release version (e.g.
@since 1.6.6).New guard —
PublicApiSinceTagCoverageTestSource-scans three entry-point roots:
src/main/java/com/demcha/compose/GraphCompose.javasrc/main/java/com/demcha/compose/document/api/src/main/java/com/demcha/compose/document/dsl/Fails the build if a
.javafile declares a public top-level type (class / interface / record / enum / annotation) and@sincedoes not appear in the source above the first such declaration.package-info.javaand files ininternal/sub-packages are excluded by convention —InternalAnnotationCoverageTestalready covers@Internalpackages and the same naming rule applies tointernal/sub-packages.Why this scope, not a full sweep
@sinceis now policy for all new public methods (thegraphcompose-senior-reviewskill enforces it in Lane 5's Javadoc checklist) but retrofitting the existing surface is its own task — and one that benefits from per-method git archaeology that an automated sed pass can't safely do.document.node,document.style, the template surfaces) are not scanned. The taskboard scopes H1 to the entry-point surface —GraphComposefactory, thedocument.apisession / builder seam, and thedocument.dslauthoring builders. A broader sweep follows the same pattern when it lands.Verification
Mentally reverting any single
@sinceline goes red — confirmed by sed-removing one tag inRowBuilder.javaand re-running the guard (then restoring it).Full suite green confirms the bulk Javadoc edits didn't break Javadoc parsing or unrelated tests.
CHANGELOG entry added to
v1.6.6 — Plannedunder the existing### Buildsubsection.Test plan
@since 1.0.0@since 1.0.0line); the guard test itself (~95 LOC) is where the human review pays off@sincebackfill — separate PR, separate cadence; the guard does not enforce method-level today