Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .agents/tasks/logging-jvmtest-triage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Triage and fix the 25 latent `:logging:jvmTest` failures

## Problem

Enabling the JUnit Platform on the KMP `jvmTest` task (see
`kmp-jvmtest-junit-platform.md`, branch `claude/angry-hugle-d62cfe`) surfaced
25 latent test failures in `:logging:jvmTest` (232 run, 207 pass) which
accumulated while the task silently discovered zero tests.

Reproduce with JDK 17:
`./gradlew :logging:jvmTest --rerun` (requires the `kmp-module.gradle.kts`
fix from that branch; a copy is applied in this worktree).

## Triage results

Production fixes (behavior drifted from the Flogger contract during the
Kotlin migration):

1. `MetadataKey.cast` — returned `null` on type mismatch; now throws
`ClassCastException` (Flogger parity; `null` input still passes through).
2. `checkCannotRepeat` — used `check` (ISE) with an inverted message; now
`require` (IAE) per the documented contract of `findValue`/`getSingleValue`.
3. `MetadataHandler.Builder.addRepeatedHandler` — called `checkCannotRepeat`,
the exact opposite of Flogger's `checkArgument(key.canRepeat())`; inverted.
4. `SimpleProcessor` — lost `Collections.unmodifiableList` in translation
(`e.setValue(e.value as List<*>)` is a no-op cast); repeated-value
iterators are now wrapped in a read-only `UnmodifiableIterator`.
5. `LogContext.log {}` — evaluated the message lambda *before*
`AbstractLogger.write`, escaping the recursion guard and error handling;
evaluation now happens inside `write(data, prepare)`.
Also, a `null` message now reaches the backend unmodified
(was string-concatenated into `"null"`).
6. `AbstractLogger` error-report timestamps — used `LocalDateTime.Formats.ISO`
(no offset, variable millis); now `yyyy-MM-dd'T'HH:mm:ss.SSSZ` equivalent.
7. `AbstractLogger.atConfig()` — mapped to `Level.INFO` (copy-paste);
now `Level.CONFIG`.
8. `LogPerBucketingStrategy.byClass()/byClassName()` — used
`key::class`/`qualifiedName!!` (identity not guaranteed; NPE for local and
anonymous classes); now `key.javaClass`/`key.javaClass.name`.
9. `ScopedLoggingContext.Builder.run(Runnable)` — missing member (silently
shadowed by stdlib `kotlin.run`, which never installs the context); added.

Test fixes (tests carried stale or Java-specific expectations):

- `AbstractLoggerSpec` — case-insensitive match for the recursion message.
- `LogContextSpec` — `log { null }` expects a `null` literal (rendered as
`"null"` by `SimpleMessageFormatter`), not `"<null>"`.
- `JvmLoggerSpec` — invocation counters moved out of lazy message lambdas
(lambdas only run for statements which log); the log-site method name is
the sanitized synthetic lambda method.
- `LogLevelMapSpec` — `String::class` registers as `kotlin.String`
(consistent with `LoggingFactory` logger names), not `java.lang.String`.
- `LoggingCompatibilityTest` — Kotlin requires `*` spread to pass an array
as `vararg`.
- `AnyExtsJvmSpec` — expect Spine's backtick diagnostic style.

## Status

- [x] All 25 failures reproduced and triaged
- [x] Production fixes applied
- [x] Test fixes applied
- [x] `:logging:jvmTest` green (232/232)
- [x] Full `./gradlew build --continue` green (all modules, detekt, Kover)

## Notes

- The `update-copyright` PostToolUse hook strips `The Flogger Authors; `
from headers; restored in all touched files (keep watching this).
- Delete this file on merge to master.
72 changes: 36 additions & 36 deletions docs/dependencies/dependencies.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


# Dependencies of `io.spine:spine-logging-context-tests:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-context-tests:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 26.1.0.
Expand Down Expand Up @@ -441,14 +441,14 @@

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:26 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-fixtures:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-fixtures:2.0.0-SNAPSHOT.423`

## Runtime
## Compile, tests, and tooling
Expand Down Expand Up @@ -1240,14 +1240,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:53 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-grpc-context:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-grpc-context:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -2094,14 +2094,14 @@ This report was generated on **Thu Jul 02 12:40:53 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:26 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-jul-backend:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-jul-backend:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -2932,14 +2932,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:26 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-jvm-default-platform:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-jvm-default-platform:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -3786,14 +3786,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:26 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-jvm-jul-backend-grpc-context:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-jvm-jul-backend-grpc-context:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -4692,14 +4692,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:26 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-jvm-jul-backend-std-context:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-jvm-jul-backend-std-context:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -5590,14 +5590,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-jvm-log4j2-backend-std-context:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-jvm-log4j2-backend-std-context:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -6508,14 +6508,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-jvm-slf4j-jdk14-backend-std-context:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-jvm-slf4j-jdk14-backend-std-context:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -7414,14 +7414,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:26 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-jvm-slf4j-reload4j-backend-std-context:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-jvm-slf4j-reload4j-backend-std-context:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -8324,14 +8324,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-log4j2-backend:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-log4j2-backend:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -9206,14 +9206,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:26 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging:2.0.0-SNAPSHOT.423`

## Runtime
## Compile, tests, and tooling
Expand Down Expand Up @@ -10013,14 +10013,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:53 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:logging-testlib:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine.tools:logging-testlib:2.0.0-SNAPSHOT.423`

## Runtime
## Compile, tests, and tooling
Expand Down Expand Up @@ -10832,14 +10832,14 @@ This report was generated on **Thu Jul 02 12:40:53 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-otel-backend:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-otel-backend:2.0.0-SNAPSHOT.423`

## Runtime
## Compile, tests, and tooling
Expand Down Expand Up @@ -11739,14 +11739,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:53 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-otel-backend-bootstrap:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-otel-backend-bootstrap:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1.
Expand Down Expand Up @@ -13157,14 +13157,14 @@ This report was generated on **Thu Jul 02 12:40:53 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-probe-backend:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-probe-backend:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1.
Expand Down Expand Up @@ -14015,14 +14015,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:26 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-smoke-test:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-smoke-test:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.22.0.
Expand Down Expand Up @@ -14921,14 +14921,14 @@ This report was generated on **Thu Jul 02 12:40:52 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:53 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-logging-std-context:2.0.0-SNAPSHOT.422`
# Dependencies of `io.spine:spine-logging-std-context:2.0.0-SNAPSHOT.423`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -15759,6 +15759,6 @@ This report was generated on **Thu Jul 02 12:40:53 WEST 2026** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Jul 02 12:40:53 WEST 2026** using
This report was generated on **Thu Jul 02 19:17:27 WEST 2026** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
2 changes: 1 addition & 1 deletion docs/dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject.
-->
<groupId>io.spine</groupId>
<artifactId>logging</artifactId>
<version>2.0.0-SNAPSHOT.422</version>
<version>2.0.0-SNAPSHOT.423</version>

<inceptionYear>2015</inceptionYear>

Expand Down
Loading
Loading