Skip to content

test: assert the lean engine module stays free of Apache POI#299

Merged
DemchaAV merged 1 commit into
2.0-devfrom
test/2.0-guard-engine-poi-free
Jul 5, 2026
Merged

test: assert the lean engine module stays free of Apache POI#299
DemchaAV merged 1 commit into
2.0-devfrom
test/2.0-guard-engine-poi-free

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Jul 5, 2026

Copy link
Copy Markdown
Owner

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 old no-poi CI 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-adds poi-ooxml to 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 to PdfBackendIsolationGuardTest). It walks src/main/java and src/test/java under com/demcha/compose and fails on any import org.apache.poi. or fully-qualified org.apache.poi. reference, mirroring PdfBackendIsolationGuardTest's grep-style walk/assert. Unlike the PDFBox sibling — which permits PDFBox under backend.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).
  • Proven the guard bites, not just the compiler: temporarily put poi-ooxml:5.5.1 back on the engine classpath and added import org.apache.poi.xwpf.usermodel.XWPFDocument; to GraphCompose.java so 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.

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.
@DemchaAV DemchaAV merged commit 8f6c3cf into 2.0-dev Jul 5, 2026
10 checks passed
@DemchaAV DemchaAV deleted the test/2.0-guard-engine-poi-free branch July 5, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant