Skip to content

Releases: Cratis/Arc.Kotlin

Release v7.7.1

Choose a tag to compare

@github-actions github-actions released this 20 Oct 22:37
d42193b

Changed

  • Maven artifacts now use canonical Cratis Arc names and link to the Kotlin documentation on cratis.io (#296)

Release v7.7.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 22:37
5b6d796

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 arcReadModelNamingPolicy bean that adapts Arc's NamingPolicy into Chronicle's ReadModelNamingPolicy; Chronicle's starter hands it to the ChronicleOptions it builds. It names the container only; the read model identifier is unchanged.
  • The bean is registered only when exactly one Arc NamingPolicy exists and the application has not declared its own ReadModelNamingPolicy; 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 = false get 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-ChronicleOptions case, where the app calls withReadModelNamingPolicy itself (Cratis/Documentation#19).

Release v7.6.1

Choose a tag to compare

@github-actions github-actions released this 29 Sep 18:43
6ffc823

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: chronicleVersion goes 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-name and translator/unique-member-name snippets 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 Java unique overloads.
  • Time values: the automation slice's expiresAt and DailyTick.occurredAt are Instant, 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 (excluding typeScriptRuntimeTest, which CI runs separately) passes. The clean build variant 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-cli2 and verify-authoring.mjs pass.

Review: same-provider (Anthropic-only); I reviewed the diff directly.

Refs Cratis/Documentation#19

Release v7.6.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 01:48
23e0be9

Added

  • Opt into Name.proxy.ts filenames with cratisArc.proxies.useProxyFileSuffix or --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

Choose a tag to compare

@github-actions github-actions released this 19 Sep 17:05
3e066c4

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

Choose a tag to compare

@github-actions github-actions released this 19 Sep 07:45
a642693

Publish the io.cratis:cratis meta package (missed in v7.5.0).

Release v7.5.0

Choose a tag to compare

@github-actions github-actions released this 19 Sep 06:56
2f2c209

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-starter keeps 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-starter dependency 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

Choose a tag to compare

@github-actions github-actions released this 18 Sep 08:56

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

Choose a tag to compare

@github-actions github-actions released this 18 Sep 04:26
5fa1800

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>, a Flow.Publisher<T> that holds a current value, so an observable query written in Java can answer a snapshot GET the way a Kotlin query returning a StateFlow does.
  • cratis.arc.observable-queries.allowed-origins for 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, --port and --sign-in-required select 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 @Authorize can expose one @AllowAnonymous query, and an @AllowAnonymous class can close one operation with @Roles. ARCKSP0108 still rejects @AllowAnonymous combined with @Authorize or @Roles on 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

Choose a tag to compare

@github-actions github-actions released this 17 Sep 14:05

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 IsAuthorized from 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

  • @IgnoreValidation suppresses a validation edge before the member is read, so an opaque validator cannot observe the value.
  • Shared declarative fluent validation rules, plus Hibernate @Range/@Length and Jakarta @Digits projected 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 NamingPolicy aligned 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.
  • TenantContextMongoAccess resolves 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 MutableStateFlow and SubmissionPublisher as the JVM equivalents of .NET's ISubject<T>.
  • Optional arc-rxjava3 artifact 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.