v0.4.2 (18 April 2026)
EffectBoundary, Claude Code Skills, and Spring HTTP Ergonomics
This release introduces EffectBoundary for gradual Spring adoption of Free-monad programs, delivers a complete hkj-spring order-processing showcase demonstrating the boundary pattern end-to-end, ships a suite of six Claude Code skills providing in-editor guidance to HKJ adopters, extends the Effect Path return-value handlers with @ResponseStatus honouring and a canonical @WebMvcTest slice-test recipe, widens the Effectful capability interface for cross-path error recovery, and adds EitherPath.bimap and Try.attempt(CheckedSupplier) alongside targeted bug fixes.
- EffectBoundary: Gradual adoption boundary bridging
Freeprograms into the Effect Path handler ecosystem via IO-target (production) and Id-target (test) interpreters. Spring integration adds@EnableEffectBoundary,@Interpretercomponent meta-annotation,@EffectTestslice,FreePathReturnValueHandler, andObservableEffectBoundary(Micrometer), letting teams adopt effects module-by-module without rewriting existing code - Effect Boundary Showcase: Complete Spring Boot order-processing example demonstrating the full boundary pattern: three effect algebras (
OrderOp,InventoryOp,NotifyOp) composed into programs, interpreters discovered as Spring beans via@Interpreter,OrderServicebuilding pureFree<F, A>programs,OrderControllerinvokingboundary.runIO()with the existingIOPathReturnValueHandler,TestBoundary+Idpure tests running in milliseconds, full MockMvc integration tests, andObservableEffectBoundarymetrics exposed via actuator - Claude Code Skills Suite: Six Claude Code skills (
/hkj-guide,/hkj-optics,/hkj-effects,/hkj-bridge,/hkj-spring,/hkj-arch) providing contextual guidance on Path selection, optics generation, Free monads and effect algebras, effects-optics bridging, Spring adoption ladder, and functional-core architecture; auto-triggered on keywords or invoked directly - @ResponseStatus Support: All nine Effect Path return-value handlers (
EitherPath,MaybePath,TryPath,ValidationPath,IOPath,CompletableFuturePath,VTaskPath,FreePath,VStreamPath) now honour@ResponseStatuson handler methods via the newSuccessStatusResolver, with controller-class fallback and meta-annotation support; POSTs can return canonical201, DELETEs can return204with body suppressed - @WebMvcTest Slice Recipe: Canonical slice-test pattern using
@ImportAutoConfiguration({HkjAutoConfiguration, HkjJacksonAutoConfiguration, HkjWebMvcAutoConfiguration})with@MockitoBean, coveringRight→200and tagged-errorLeft→404 - Effectful Capability Widening:
handleError,handleErrorWith, andguaranteenow live on the sealedEffectfulinterface;handleErrorWithacceptsFunction<? super Throwable, ? extends Effectful<A>>soIOPathandVTaskPathcan cross-recover while preserving the receiver's concrete type - EitherPath.bimap: Transform error and success values in a single call; equivalent to
.mapError(errorFn).map(successFn)with laziness on the unused branch - Try.attempt: New
Try.attempt(CheckedSupplier)entry point for Java APIs that throw checked exceptions (Files.readString,Class.forName, JDBC, reflection).CheckedSupplier<T, X extends Exception>inhkj-apideclaresthrows Xonget(), avoiding the lambda target-type ambiguity ofTry.of(Supplier) hkj-checkerregistered ontestAnnotationProcessorand every source-set annotation-processor classpath via the Gradle plugin; the Maven plugin defensively appends HKJ entries to user-suppliedtestAnnotationProcessorPaths, resolvingerror: plug-in not found: HKJCheckerduring test compilationhkj.web.either.default-error-statusproperty now binds and takes effect (#490); legacy flat pathhkj.web.default-error-statuspreserved as a backward-compatible alias, with end-to-end@WebMvcTestregression coverage- Test coverage uplift across
FocusProcessor,FoldProcessor,ForComprehensionProcessor, the optics processors,EffectAlgebra/ComposeEffects/Path processors, andKindFieldAnalyser, plus a new@ExcludeFromJacocoGeneratedReportutility