test: assert the lean engine module stays free of Apache POI#299
Merged
Conversation
EnginePoiIsolationGuardTest walks src/main/java and src/test/java under com/demcha/compose and fails on any org.apache.poi import or fully-qualified reference, mirroring PdfBackendIsolationGuardTest's grep-style walk/assert. The semantic DOCX/PPTX backend and Apache POI now live in graph-compose-render-docx; the retired no-poi CI job only ran the suite without POI on the classpath and never asserted the sources were POI-free. This freezes that module boundary at the source level so a future change cannot silently pull POI back into the lean core.
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.
Why
#298 extracted the semantic DOCX/PPTX backend and Apache POI into
graph-compose-render-docx, leaving the engine (root module) POI-free. Nothing machine-guards that invariant now: the oldno-poiCI job was removed, and even when it ran it only executed the suite without POI on the classpath — it never asserted POI was absent from the sources. A future change that re-addspoi-ooxmlto the engine pom (directly or transitively) and imports it would compile clean, silently pulling POI back into the lean core.What changed
Adds
EnginePoiIsolationGuardTest(test scope,com.demcha.documentation, next toPdfBackendIsolationGuardTest). It walkssrc/main/javaandsrc/test/javaundercom/demcha/composeand fails on anyimport org.apache.poi.or fully-qualifiedorg.apache.poi.reference, mirroringPdfBackendIsolationGuardTest's grep-style walk/assert. Unlike the PDFBox sibling — which permits PDFBox underbackend.fixed.pdf— this guard allows POI nowhere in the engine. Test-only; no production code changes.Verification
./mvnw test -Dtest=EnginePoiIsolationGuardTest -pl .→ green (1 test)../mvnw verify -pl .→ BUILD SUCCESS, 1368 tests, 0 failures (javadoc gate included).poi-ooxml:5.5.1back on the engine classpath and addedimport org.apache.poi.xwpf.usermodel.XWPFDocument;toGraphCompose.javaso it compiled; the guard then failed at its assertion —Expecting empty but was: {GraphCompose.java=[org.apache.poi.xwpf.usermodel.XWPFDocument]}— and went green again after reverting both edits.