Skip to content

Demo: evidence for Jackson 3 issues in #189 (don't merge) - #194

Draft
chrishagglund-ship-it wants to merge 7 commits into
jackson3-conductor-clientfrom
demo/boot3-jackson-annotations
Draft

chrishagglund-ship-it wants to merge 7 commits into
jackson3-conductor-clientfrom
demo/boot3-jackson-annotations

Conversation

@chrishagglund-ship-it

@chrishagglund-ship-it chrishagglund-ship-it commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Testing out whether some of Claude's concerns should be considered as real.

Demo only, don't merge. This branch also contains the two demo workflows, a demo-only ci.yml trigger, and the demo/ folder. Cherry-pick the commits listed below instead.

I wanted evidence for a Spring Boot 3 compatibility issue Claude flagged in PR #189 as submitted, so we built a small demo: run - branch demo/boot3-jackson-annotations.

The issue: Jackson 3.1.7 needs jackson-annotations 2.21+. In a Spring Boot 3 app, Boot's dependency management decides that jar's version, and Boot 3.5.12 and older pin an older one. The app compiles, then fails at startup with NoClassDefFoundError. Our CI can't see this because plain Gradle always picks the highest version.

The matrix runs the Spring starter against Boot's own versions:

  • Boot 3.5.12: ❌ fails at startup (JsonSerializeAs missing, annotations 2.19.4)
  • Boot 3.5.13: ✅ passes, so Boot 3.5.13+ is the floor
  • Boot 3.5.16 with Jackson forced to 3.2.3: ❌ fails. Jackson 3.2+ needs newer annotations and Kotlin than any Boot 3 release ships, so bumping past 3.1.x would drop all Boot 3 users.

Suggested additions (all on the demo branch, so you can cherry-pick them):

  • 546dc4c: document the Boot 3.5.13+ floor and the jackson-bom.version override, plus a comment on jacksonBom warning about 3.2+
  • c249b89: turn the NoClassDefFoundError into a message that names the versions found and the fix
  • ec4e959 + c656bab: a bootCompatTest suite that runs in ./gradlew build on Boot 3.5.13, so a Jackson bump that breaks Boot 3 fails CI. Leave out the demo workflow and the demo-only ci.yml trigger.

Claude also flagged some serialization backward-compatibility concerns: Jackson 3 changed several defaults, so the same worker code receives and sends different data than with SDK 6.x. Enums with a custom toString() are read and written with it, Duration becomes "PT1M30S", getter-only lists and final fields stay empty, and a Jackson 2 JsonNode in a worker's output is sent as {"array":false,...}. Also, Jackson 3 ignores Jackson 2's @JsonNaming/@JsonSerialize on user classes.

We demoed it with the same 8 worker tests in 4 setups, with and without proposed fixes in the SDK and in user code: run

  1. SDK 6.0.2: 8/8
  2. PR #189 as submitted: 0/8
  3. PR + SDK fixes (ObjectMapperProvider restores the Jackson 2 defaults and writes Jackson 2 JsonNodes as JSON): 6/8
  4. PR + SDK fixes + user code with Jackson 3 annotations added next to the Jackson 2 ones: 8/8

The SDK fixes are commit ad997eb on demo/boot3-jackson-annotations (all 995 client tests pass). The two annotation cases can only be fixed in user code, so they'd go in the upgrade notes.

Adds a bootCompatTest suite to conductor-client-spring that resolves the
starter against a Spring Boot BOM via enforcedPlatform, the way a real Boot
app does, and a CI matrix that runs it three ways:

- Boot 3.5.12 + Jackson 3.1.7: fails at startup (annotations 2.19.4 lacks
  JsonSerializeAs)
- Boot 3.5.13 + Jackson 3.1.7: passes (annotations 2.21)
- Boot 3.5.16 + Jackson 3.2.3: starts, worker fails (Boot forces Kotlin
  1.9.25; jackson-module-kotlin 3.2 needs kotlin.time.Instant)

Throwaway branch for demonstration; not meant to merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ObjectMapperProvider now converts one small bean right after building the
mapper, so a missing Jackson, annotations or Kotlin class fails at startup
instead of on the first task. A LinkageError is rethrown as an
IllegalStateException that names the missing class, the jackson-databind,
jackson-annotations and kotlin-stdlib versions found, and the Spring Boot 3
fix (Boot 3.5.13+, or jackson-bom.version=2.21.x).

The demo workflow summary now shows that message for failing jobs. With the
self-check, the Boot 3.5.16 + Jackson 3.2.3 job fails at startup too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spring Boot 3.5.12 and earlier pin jackson-annotations below 2.21, which
Jackson 3.1 needs. Document Boot 3.5.13+ (or the jackson-bom.version
override) in the Boot 3 starter README, add a troubleshooting row for the
startup error, and note next to jacksonBom that Jackson 3.2+ drops Boot 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chrishagglund-ship-it
chrishagglund-ship-it marked this pull request as draft November 25, 2026 16:21
check now depends on bootCompatTest, so ./gradlew build runs it against the
default Boot 3.5.13 BOM (the oldest supported Boot 3). The CI test report
also picks up its results.

Demo only: ci.yml also runs on pushes to demo/boot3-jackson-annotations so
the build can be seen running the suite. Remove that trigger before merging.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds demo/worker-compat, a standalone Gradle build with ordinary worker
code compiled against a chosen conductor-client version, and a CI matrix
that runs it against the released 6.0.2 (Jackson 2) and against this
branch (published to a job-local Maven repo).

Each test asserts the 6.0.2 behavior: enum with custom toString(), getter-
only list, final field, Duration, Jackson 2 @JsonNaming/@JsonSerialize, and
a Jackson 2 JsonNode in the output. Outputs are checked on the JSON that
TaskClient.updateTask() sends to a fake server. Locally: 8/8 pass on 6.0.2,
8/8 fail on this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jackson 3 changed defaults that reshape worker inputs and outputs. The
SDK mapper now restores the Jackson 2 behavior:

- enums read and written by name, not toString()
- getter-only collections filled on input (USE_GETTERS_AS_SETTERS)
- final fields set on input (ALLOW_FINAL_FIELDS_AS_MUTATORS)
- Duration written as a number of seconds

It also writes a Jackson 2 JsonNode (for example a REST client response a
worker puts in its output) as the JSON it holds. Jackson 3 would otherwise
serialize its getters. The serializer is only registered when Jackson 2 is
on the classpath.

Jackson 2 databind annotations (@JsonNaming, @JsonSerialize) on user
classes are still ignored by Jackson 3; users add the Jackson 3 ones.

conductor-client: 995 tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The worker demo matrix now runs the same tests in four setups:

1. SDK 6.0.2 (Jackson 2), the baseline: 8/8
2. PR 189 as submitted, built from db7b12a: 0/8
3. PR 189 + SDK fixes (this branch): 6/8, only the two Jackson 2
   annotation tests fail
4. PR 189 + SDK fixes + migrated user code: 8/8

The two classes with Jackson 2 annotations move to
src/userCode/{jackson2,migrated}, picked with -PuserCode. The migrated
variant adds the Jackson 3 annotations next to the Jackson 2 ones, which
also passes on 6.0.2. The summary shows each setup's result against its
predicted pass count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chrishagglund-ship-it chrishagglund-ship-it changed the title Demo/boot3 jackson annotations Demo: evidence for Jackson 3 issues in #189 (don't merge) Nov 25, 2026

This branch has not been deployed

No deployments
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