Repository navigation
Releases: Cratis/Arc.Kotlin
Release list
Release v7.7.1
Changed
- Maven artifacts now use canonical Cratis Arc names and link to the Kotlin documentation on cratis.io (#296)
Release v7.7.0
With Arc's MongoDB integration and Chronicle together, a projected read model now lands in the collection Arc reads. For example, Author is written to Authors. Before this, Chronicle's JVM client named the container after the read model's identifier, which is not pluralized, and apps needed a NamingPolicy bean with pluralizeReadModelNames = false as a workaround.
Added
- An
arcReadModelNamingPolicybean that adapts Arc'sNamingPolicyinto Chronicle'sReadModelNamingPolicy; Chronicle's starter hands it to theChronicleOptionsit builds. It names the container only; the read model identifier is unchanged. - The bean is registered only when exactly one Arc
NamingPolicyexists and the application has not declared its ownReadModelNamingPolicy; an application policy wins. The auto-configuration now runs after the MongoDB one, so it sees Arc's default policy.
Changed
- Updated to Chronicle.Kotlin 6.10.0, which adds
ReadModelNamingPolicy(Cratis/Chronicle.Kotlin#105). - Apps on Arc's default Mongo policy now get the pluralized collection Arc was already reading. Apps using
pluralizeReadModelNames = falseget identical names, so the workaround can be removed. - Upgrade action: the kernel keeps the new container name but does not replay the projection for a container-only change, and the previous, unread collection is not deleted. Replay affected projections after upgrading and drop the old collection yourself. A running kernel may keep writing to the old container until its projection pipeline is rebuilt, for example on restart.
- The camel-casing setup snippets (Kotlin and Java) no longer include the workaround. The read-model naming documentation explains how the policy reaches Chronicle, the override, the case without Arc's policy, and the own-
ChronicleOptionscase, where the app callswithReadModelNamingPolicyitself (Cratis/Documentation#19).
Release v7.6.1
Moves Arc.Kotlin's Chronicle integration to Chronicle.Kotlin 6.9.0. That release fixes Cratis/Chronicle.Kotlin#101 (unique constraints over several properties), #104 (java.time values as ISO-8601 strings) and #106 (materialized paging off by one). This PR then removes the JVM workarounds those bugs forced.
- Version:
chronicleVersiongoes from 6.7.0 to 6.9.0. The version named in the docs index, the Chronicle guide and the ChronicleSpringBoot sample READMEs is updated too. - Unique constraints: the Kotlin and Java
vertical-slices/state-change/unique-author-nameandtranslator/unique-member-namesnippets were "does not support this workflow yet" placeholders. They are now real constraints over first and last name, with the same message as C# and TypeScript. The Java snippets use a block lambda, because an expression lambda is ambiguous between the Kotlin and Javauniqueoverloads. - Time values: the automation slice's
expiresAtandDailyTick.occurredAtareInstant, not epoch milliseconds, in the Kotlin and Java snippets and in the real-kernel contract-test slices. - Real-kernel probe: stays
@Disabled. It now cites only Cratis/Chronicle#4365, since #106 is fixed.
Checked locally:
./gradlew build --no-configuration-cache(excludingtypeScriptRuntimeTest, which CI runs separately) passes. Theclean buildvariant hit the local 600 s budget, so CI's clean build is the first full clean run.- The real-kernel test source set compiles (Kotlin and Java). The real-kernel run itself was not done locally.
validate-client-snippets.py, its--self-test,validate-doc-snippets.py,markdownlint-cli2andverify-authoring.mjspass.
Review: same-provider (Anthropic-only); I reviewed the diff directly.
Release v7.6.0
Added
- Opt into
Name.proxy.tsfilenames withcratisArc.proxies.useProxyFileSuffixor--use-proxy-file-suffix true. Generated imports and barrel exports follow the setting, while external mappings and routes stay unchanged. Switching either direction cleans up owned generated files when cleanup is enabled (#229).
Changed
- The JVM parity reference links to the shared C#/Kotlin/Java capability matrix while retaining its implementation evidence (#217).
Fixed
- Corrected the parity reference: Arc .NET rejects contradictory authorization attributes in either evaluator order, and its generated proxies support XML documentation comments.
Release v7.5.2
Fixed
- The Arc Chronicle integration now uses Chronicle Kotlin 6.3.2, which ensures a fresh application's event store exists before registering its artifacts.
Release v7.5.1
Publish the io.cratis:cratis meta package (missed in v7.5.0).
Release v7.5.0
Added
io.cratis:cratis— a new meta package for event-sourced Cratis applications: a pure aggregator bundling Arc, its Spring Boot wiring, and the Chronicle integration into one dependency, so a consumer no longer has to assemble the three by hand.arc-chronicle-spring-boot-starterkeeps its own coordinates for a consumer that wants Arc's Chronicle wiring specifically; both stay at the same version.
Changed
- Bump the
chronicle-spring-boot-starterdependency to 6.3.1, which fixes a kernel-side bug where an event type registration could be silently dropped while still reporting success (Cratis/Chronicle.Kotlin#86).
Release v7.4.1
Fixed
- Bump the default Chronicle client version pulled in by arc-chronicle-spring-boot-starter from 6.1.0 (contracts 18.4.1) to 6.3.0 (contracts 19.0.1), matching the currently shipping Chronicle server. Applications built with the previous pin failed every command and query against a fresh Chronicle development kernel with UNIMPLEMENTED: Service is unimplemented., because the client's compatibility preflight and artifact registration used a protocol contract several releases behind the server.
Release v7.4.0
Summary
The Kotlin and Java samples now carry the same feature set as the Arc .NET sample application, with a shared React frontend, and closing the gaps that stood in the way added three pieces of framework behavior.
Added
ObservableState<T>, aFlow.Publisher<T>that holds a current value, so an observable query written in Java can answer a snapshotGETthe way a Kotlin query returning aStateFlowdoes.cratis.arc.observable-queries.allowed-originsfor naming the browser origins allowed to open an observable-query WebSocket. Empty keeps the same-origin default.- A React frontend shared by both plain Arc samples, consuming only generated proxies, with pages for live queries, change streams, conditional queries, observable collections, authentication queries and cross-cutting authorization.
Samples/run.sh, which starts a backend, regenerates its proxies, and opens the frontend against them;--language,--database,--chronicle,--portand--sign-in-requiredselect what runs.- A selectable task-board store in both samples: in memory, Spring Data MongoDB, or Spring Data JPA, with no change to any command, query or read model.
- Guides for using the generated client from React and for applying cross-cutting rules with pipeline filters.
Changed
- Operation-level authorization metadata now replaces a class declaration wholesale rather than being rejected. A read model annotated
@Authorizecan expose one@AllowAnonymousquery, and an@AllowAnonymousclass can close one operation with@Roles.ARCKSP0108still rejects@AllowAnonymouscombined with@Authorizeor@Roleson the same declaration. - The Kotlin and Java samples resolve identity from a client principal supplied as a header or a cookie, so an authenticated observable subscription keeps its caller instead of dropping to anonymous.
Release v7.3.0
Arc parity epic #171 delivered in full, plus MongoDB/SQL support, observable queries, and route-convention safety.
Required actions when upgrading
Two changes stop an application rather than degrade it. See the migration guide in Documentation/reference/migration-next.md for the exact symptoms and fixes.
- Artifact manifest is now format 8 and rejects format 7. Producers and consumers must regenerate in lockstep; a stale consumer fails rather than reading a manifest it does not understand.
- The Chronicle integration requires kernel 18.4.0 or newer. Kernels 18.3.1 and earlier omit
IsAuthorizedfrom the wire when a command was authorized, which a proto3 JVM client decodes as a denial, so every append fails.
Also worth knowing before upgrading: proxy generation now records the endpoint options it used, and the Spring Boot starter fails startup when the build-time and runtime route settings disagree, naming both values. This surfaces latent mismatches that previously appeared only as a 404 in the browser.
Validation
@IgnoreValidationsuppresses a validation edge before the member is read, so an opaque validator cannot observe the value.- Shared declarative fluent validation rules, plus Hibernate
@Range/@Lengthand Jakarta@Digitsprojected to client rules — including on Java records, where they were previously ignored. - Annotation and DSL rules union rather than one overriding the other, so the generated client is never weaker than the server.
Identity, hosting and Java
- Automatic identity-details discovery, a trusted platform identity-header bridge, and blocking Java command/query facades.
- Spring Boot positioning enforced by a compiler metadata boundary check.
MongoDB and SQL
- Read-model
NamingPolicyaligned with the Chronicle kernel's pluralisation, including the cases where Evo Inflector and the kernel disagree. - Ambient tenancy as a coroutine context element, so the tenant survives a dispatcher switch.
TenantContextMongoAccessresolves the tenant per call, never captured at construction..observe*extensions for Mongo and JPA over one shared implementation.
Observable queries
- Documented for Kotlin and ordinary Java, presenting
MutableStateFlowandSubmissionPublisheras the JVM equivalents of .NET'sISubject<T>. - Optional
arc-rxjava3artifact for RxJava 3 sources.
Chronicle
- Upgraded to JVM SDK 6.1.0 on kernel 18.4.0, which restores persisted event metadata on the read path and adds checked empty-history concurrency.
Evidence
New gates run against real infrastructure: a digest-pinned MongoDB replica set proving change streams and tenant isolation, alongside the existing digest-pinned Chronicle kernel. Opt-in workflows now exist for the paired .NET/JVM HTTP conformance and for a Linux proxy capture.
Known limitations
- CodeQL analyses Java only until CodeQL 2.27.1 ships Kotlin 2.4.20 support (#195). This is reduced scope, not full coverage.
- .NET parity remains Partial; see
Documentation/reference/parity.md. - The Linux proxy capture workflow exists but has not been run yet.
- Chronicle aggregate lifecycle work (#177–#181) is no longer blocked upstream, but is not implemented.