Codebase review fix plan — specification-mapper (2026-07-16)
Whole-codebase thorough review of branch jakarta (modules mapper/ + starter/; site/ and target/ out of scope). Build gate green (mvn test, 214 tests). 43 findings CONFIRMED under adversarial verification (2 REFUTED and dropped), packaged into 14 work packages below.
Scorecard
Category
Grade
correctness
🟡 (1 high + 15 medium)
security
🟢 (1 medium)
performance
🟡 (1 high + 3)
testing
🟡 (8 medium)
dependencies
🟡 (4 medium)
maintainability
🟢 (2 medium + 7 low)
Top risks
COR-01 (high) — starter silently overrides every repository's base class → possible hard-delete data loss.
PERF-01 (high) — @JoinFetch + pagination forces Hibernate in-memory paging → OOM on large tables.
COR-05/06/07/10/11 (medium) — join resolvers silently return wrong results on realistic misconfigurations.
COR-15/16 (medium) — first-position field-level @Or/@And silently ignored; same annotation, opposite SQL by declaration order.
SEC-01 (medium) — LIKE-family specs don't escape %/_ wildcards → scoping-filter bypass + cheap DoS.
Work packages (recommended order)
Ordered: quick wins & high-severity first. Same-area packages (WP1/WP6 touch SpecMapperAutoConfiguration; WP13/WP14 touch domain/) run sequentially to avoid conflicts. Not flagged ready-for-agent — triage before build.
[WP1] Starter silently overrides every repository base class (data-loss risk) #173 — [WP1] Starter silently overrides every repository base class (data-loss risk)
[WP2] @JoinFetch on paged queries forces Hibernate in-memory pagination #174 — [WP2] @JoinFetch on paged queries forces Hibernate in-memory pagination
[WP13] Compound composition: first-position @Or/@And silently ignored (order-dependent boolean semantics) #175 — [WP13] Compound composition: first-position @Or/@and silently ignored (order-dependent boolean semantics)
[WP4] LIKE-family wildcard injection + unbounded IN expansion #176 — [WP4] LIKE-family wildcard injection + unbounded IN expansion
[WP5] Reflective spec construction masks TypeMismatchException + hidden context invariant #177 — [WP5] Reflective spec construction masks TypeMismatchException + hidden context invariant
[WP6] Starter auto-configuration robustness (fluent null-spec, BPP early-init, ordering, API parity) #178 — [WP6] Starter auto-configuration robustness (fluent null-spec, BPP early-init, ordering, API parity)
[WP14] Leaf-spec constructor validation & one-shot Iterable consumption #179 — [WP14] Leaf-spec constructor validation & one-shot Iterable consumption
[WP12] CI/CD supply-chain & gating: unpinned actions, auto-merge without in-repo build gate, dead branch guard #180 — [WP12] CI/CD supply-chain & gating: unpinned actions, auto-merge without in-repo build gate, dead branch guard
[WP3] Join machinery: silent-wrong-result edge cases + missing edge/error tests #181 — [WP3] Join machinery: silent-wrong-result edge cases + missing edge/error tests
[WP10] Mapper test-coverage gaps: concurrency, nested-AND typo, inherited fields #182 — [WP10] Mapper test-coverage gaps: concurrency, nested-AND typo, inherited fields
[WP11] Build config & dependency hygiene: unpinned plugins, no Maven update lane, EOL Boot line, jar build-info pollution #183 — [WP11] Build config & dependency hygiene: unpinned plugins, no Maven update lane, EOL Boot line, jar build-info pollution
[WP7] Mapper hot-path allocation: eager AST build + always-on DISTINCT #184 — [WP7] Mapper hot-path allocation: eager AST build + always-on DISTINCT
[WP8] Native-image / AOT: user-POJO hints uncovered + nativeTest never run in CI #185 — [WP8] Native-image / AOT: user-POJO hints uncovered + nativeTest never run in CI
[WP9] Dead Ordered/getOrder contract on custom resolvers #186 — [WP9] Dead Ordered/getOrder contract on custom resolvers
Report
Full review report: https://github.com/softleader/specification-mapper/blob/codebase-review-2026-07-16/codebase-review-2026-07-16.md
Codebase review fix plan — specification-mapper (2026-07-16)
Whole-codebase thorough review of branch
jakarta(modulesmapper/+starter/;site/andtarget/out of scope). Build gate green (mvn test, 214 tests). 43 findings CONFIRMED under adversarial verification (2 REFUTED and dropped), packaged into 14 work packages below.Scorecard
Top risks
@JoinFetch+ pagination forces Hibernate in-memory paging → OOM on large tables.@Or/@Andsilently ignored; same annotation, opposite SQL by declaration order.%/_wildcards → scoping-filter bypass + cheap DoS.Work packages (recommended order)
Ordered: quick wins & high-severity first. Same-area packages (WP1/WP6 touch
SpecMapperAutoConfiguration; WP13/WP14 touchdomain/) run sequentially to avoid conflicts. Not flaggedready-for-agent— triage before build.Report
Full review report: https://github.com/softleader/specification-mapper/blob/codebase-review-2026-07-16/codebase-review-2026-07-16.md