Skip to content

Reject and document impossible default-value time conversions (#39) - #197

Merged
alexander-yevsyukov merged 12 commits into
masterfrom
document-not-converting-default-values
Jul 1, 2026
Merged

Reject and document impossible default-value time conversions (#39)#197
alexander-yevsyukov merged 12 commits into
masterfrom
document-not-converting-default-values

Conversation

@alexander-yevsyukov

@alexander-yevsyukov alexander-yevsyukov commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses #39: converting a default Spine Time instance to a Java or Kotlin
Time counterpart silently failed with cryptic, inconsistent errors for types
that carry no meaningful default (no zero month/day, missing date, empty zone id).

Behavior

Impossible conversions now reject a default value explicitly:

  • Static Xs.toJavaTime(value) utilities validate the argument via
    DtPreconditions.checkNotDefaultIllegalArgumentException
    (LocalDates, YearMonths, OffsetDateTimes; ZonedDateTimes already did).
  • Instance mixin value.toJavaTime() methods validate the receiver state via
    the new DtPreconditions.checkNotDefaultStateIllegalStateException,
    matching the pre-existing LocalDateTemporal/LocalDateTest convention
    (LocalDateTemporal, LocalDateTimeTemporal, ZoneIdMixin).
  • Kotlin toKotlin* extensions validate the receiver via
    checkNotDefaultStateIllegalStateException (the extension receiver is the
    object being converted, like the Java mixins, so a default receiver is an
    illegal object state, not an illegal argument).

Conversions that are meaningful for a default are intentionally unchanged:
LocalTime→midnight, ZoneOffset→UTC, OffsetTime→00:00 UTC,
Timestamp→epoch, Duration→zero.

All impossible-conversion cases are documented in KDoc/Javadoc, and new
DefaultValueConversionSpec regression tests in time and time-kotlin cover
both the rejected and the meaningful defaults.

Also in this branch

  • Shared config sync via ./config/pull (skills, workflows, buildSrc,
    Gradle 9.6.1 wrapper).
  • Force Spine.format build fixes resolving the synced
    spine-format / jvm-tools / junit-bom version conflicts in both the main
    build and the nested tests/ integration build.
  • Incidental: fixed a pre-existing broken Dokka link
    (Durations2.ZERODurations.ZERO).

Verification

./gradlew build dokkaGenerate is green (including :integrationTests);
19 new tests pass; Dokka reports 0 warnings. Reviewed by spine-code-review,
kotlin-engineer, and review-docs.

Closes #39

🤖 Generated with Claude Code

alexander-yevsyukov and others added 7 commits June 30, 2026 00:24
Run './config/pull' to bring the 'config' submodule to the tip of
'origin/master' and propagate the updated shared configuration
(skills, guidelines, workflows, buildSrc, Gradle wrapper) into the repo.
Annotate every `serialVersionUID` field and `readResolve()` method in the `time` module with `@Serial` (importing `java.io.Serial`), consistent with the already-annotated `InstantConverter`. Also restore the `LocalTimes.of(...)` Javadoc wording fix ("from an hours" -> "from hours").

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address issue #39: converting a default Spine Time instance to a Java or
Kotlin Time counterpart silently failed with cryptic, inconsistent errors
for types that carry no meaningful default (no zero month, zero day,
missing date, or empty zone id).

These conversions now reject a default value explicitly:

- Static `Xs.toJavaTime(value)` utilities validate the argument via
  `checkNotDefault` -> `IllegalArgumentException` (`LocalDates`, `YearMonths`,
  `OffsetDateTimes`; `ZonedDateTimes` already did).
- Instance mixin `value.toJavaTime()` methods validate the receiver state via
  the new `DtPreconditions.checkNotDefaultState` -> `IllegalStateException`
  (`LocalDateTemporal`, `LocalDateTimeTemporal`, `ZoneIdMixin`), matching the
  pre-existing `LocalDateTemporal`/`LocalDateTest` convention.
- Kotlin `toKotlin*` extensions validate the receiver via `checkNotDefaultArg`.

Conversions that ARE meaningful for a default are intentionally left
unchanged: `LocalTime` -> midnight, `ZoneOffset` -> UTC, `OffsetTime` ->
00:00 UTC, `Timestamp` -> epoch, `Duration` -> zero.

All impossible-conversion cases are documented in KDoc/Javadoc, and new
`DefaultValueConversionSpec` regression tests in `time` and `time-kotlin`
cover both the rejected and the meaningful defaults.

Also fixes a pre-existing broken Dokka link (`Durations2.ZERO` ->
`Durations.ZERO`) in `DurationExts.kt`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The synced `config` bumped `Base` (spine-format), `ToolBase` (jvm-tools), and
JUnit, but the nested `tests` build did not force them, so its buildscript and
project classpaths failed `failOnVersionConflict` (spine-format `.421` vs
`.391`, jvm-tools `.402` vs `.381`, junit-bom `6.1.0` vs `6.0.3`).

Mirror the main build's `Force Spine.format` fix in the `tests` build:
force `Base.format` and `ToolBase.jvmTools` on the buildscript classpath, and
`Base.format` and `JUnit.bom` on the project configurations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 30, 2026 01:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes conversions from default Spine Time messages to Java Time / KotlinX counterparts fail fast with clear exceptions for types where a protobuf default has no meaningful representation (e.g., missing date parts or empty zone id), and documents these cases. It also includes a broad config/build sync (Gradle wrapper, workflows, build tooling, dependency versions, and agent metadata updates).

Changes:

  • Reject impossible default-value conversions (argument checks in Xs.toJavaTime(..), state checks in mixin toJavaTime() methods, Kotlin extensions) and add regression tests.
  • Add/refresh serialization metadata (@Serial, serialVersionUID, readResolve) for converters/stringifiers.
  • Sync build/config/tooling (version bump, Gradle wrapper + caching, dependency alignment, workflows, and agent/config scaffolding).

Reviewed changes

Copilot reviewed 259 out of 269 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
version.gradle.kts Snapshot version bump.
time/src/main/kotlin/io/spine/time/DurationExts.kt Fix Dokka link target (Durations2.ZERODurations.ZERO).
time/src/main/java/io/spine/time/ZoneOffsets.java Add @Serial metadata for converter singleton serialization.
time/src/main/java/io/spine/time/ZoneIds.java Add @Serial metadata for converter singleton serialization.
time/src/main/java/io/spine/time/ZoneIdMixin.java Reject default ZoneId receiver state on conversion to Java Time; document behavior.
time/src/main/java/io/spine/time/ZonedDateTimes.java Reject default argument on toJavaTime(..); add @Serial metadata.
time/src/main/java/io/spine/time/YearMonths.java Reject default argument on toJavaTime(..); add @Serial metadata.
time/src/main/java/io/spine/time/string/ZoneOffsetStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/ZoneIdStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/ZonedDateTimeStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/YearMonthStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/WebSafeTimestampStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/OffsetTimeStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/OffsetDateTimeStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/MonthStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/LocalTimeStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/LocalDateTimeStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/LocalDateStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/string/JtStringifier.java Add serialVersionUID for base stringifier type.
time/src/main/java/io/spine/time/string/DayOfWeekStringifier.java Add @Serial metadata for stringifier singleton serialization.
time/src/main/java/io/spine/time/OffsetTimes.java Add @Serial metadata for converter singleton serialization.
time/src/main/java/io/spine/time/OffsetDateTimes.java Reject default argument on toJavaTime(..); add @Serial metadata.
time/src/main/java/io/spine/time/Months.java Document rejection of MONTH_UNDEFINED; add @Serial metadata.
time/src/main/java/io/spine/time/LocalTimes.java Minor Javadoc wording; add @Serial metadata.
time/src/main/java/io/spine/time/LocalDateTimeTemporal.java Reject default receiver state on conversion to Java Time; document behavior.
time/src/main/java/io/spine/time/LocalDateTimes.java Add @Serial metadata for converter singleton serialization.
time/src/main/java/io/spine/time/LocalDateTemporal.java Reject default receiver state on conversion to Java Time; document behavior.
time/src/main/java/io/spine/time/LocalDates.java Reject default argument on toJavaTime(..); add @Serial metadata.
time/src/main/java/io/spine/time/DtPreconditions.java Add shared error message and checkNotDefaultState(..) helper.
time/src/main/java/io/spine/time/DaysOfWeek.java Document rejection of DOW_UNDEFINED; add @Serial metadata.
time/src/main/java/io/spine/time/AbstractConverter.java Add serialVersionUID to converter base.
tests/build.gradle.kts Dependency alignment additions for integration build (managed build sync).
settings.gradle.kts Root project name update.
gradlew.bat Gradle wrapper script update (generated).
gradlew Gradle wrapper script update (generated).
gradle/wrapper/gradle-wrapper.properties Gradle wrapper distribution URL bump.
gradle.properties Enable build cache; extend daemon JVM args for Error Prone on JDK16+.
docs/project.md Adds a placeholder project template doc (needs repo-specific fill/move).
CLAUDE.md Switch to referencing AGENTS.md and condensed agent notes.
buildSrc/src/test/kotlin/io/spine/gradle/publish/MavenMetadataSpec.kt New buildSrc test (managed build sync).
buildSrc/src/main/kotlin/write-manifest.gradle.kts Task metadata additions (managed build sync).
buildSrc/src/main/kotlin/uber-jar-module.gradle.kts ShadowJar DSL updates + publishing config tweak (managed build sync).
buildSrc/src/main/kotlin/Strings.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/module.gradle.kts Force Base.format dependency (managed build sync).
buildSrc/src/main/kotlin/LicenseSettings.kt Header formatting + doc wording (managed build sync).
buildSrc/src/main/kotlin/kmp-module.gradle.kts Skip forcing on Dokka configurations (managed build sync).
buildSrc/src/main/kotlin/jvm-module.gradle.kts Skip forcing on Dokka configurations; task group metadata (managed build sync).
buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts Deprecation notice + warning (managed build sync).
buildSrc/src/main/kotlin/jacoco-kmm-jvm.gradle.kts Deprecation notice + warning (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/testing/Tasks.kt Move tasks into Spine task group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/SpineTaskGroup.kt New shared task group constant (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/RunGradle.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ScopedDependency.kt Add system scope ordering and clarify comparator docs (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomGenerator.kt Add task group/description (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/report/license/Paths.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/report/license/ModuleDataExtensions.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/report/license/LicenseReporter.kt Ensure report inputs include project version; task metadata (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/repo/Repository.kt Minor doc formatting + whitespace cleanup (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/publish/PublicationHandler.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/publish/GitHubPackages.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/publish/CustomPublicationHandler.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt Build args refactor; scope ExperimentalPathApi opt-in to JVM only.
buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Webpack.kt Task group change to shared Spine group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Publish.kt Task group change to shared Spine group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/LicenseReport.kt Task group change to shared Spine group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/JsTasks.kt Remove JS-specific task group constants (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/IntegrationTest.kt Task group change to shared Spine group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Clean.kt Task group change to shared Spine group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Check.kt Task group change to shared Spine group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Assemble.kt Task group change to shared Spine group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsExtension.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsEnvironment.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/javadoc/ExcludeInternalDoclet.kt Task metadata + doc wording updates (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/java/Tasks.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/java/Linters.kt Error Prone DSL property update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/github/pages/TaskName.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/github/pages/SshKey.kt Fix log message text (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/github/pages/RepositoryExtensions.kt Seed gh-pages with CNAME on first create (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/dart/task/Publish.kt Task group change to shared Spine group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/dart/task/IntegrationTest.kt Task metadata + doc wording updates (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/dart/task/DartTasks.kt Remove Dart-specific task group constants (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/dart/task/Build.kt Task group change to shared Spine group (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/dart/DartExtension.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/dart/DartEnvironment.kt Minor doc wording update (managed build sync).
buildSrc/src/main/kotlin/io/spine/gradle/Cli.kt Ensure process output drain threads are joined before reading buffers.
buildSrc/src/main/kotlin/io/spine/dependency/test/Truth.kt Bump Truth version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/test/Testcontainers.kt New Testcontainers dependency object (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/test/Kover.kt Bump Kover version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt Bump Kotlin compile testing version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt Bump JUnit BOM + legacy JUnit version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/test/Jacoco.kt Bump JaCoCo version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/storage/QueryDsl.kt New QueryDSL dependency object (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/storage/PostgreSql.kt New PostgreSQL JDBC dependency object (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/storage/MySql.kt New MySQL JDBC dependency object (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/storage/HsqlDb.kt New HSQLDB dependency object (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/storage/Hikari.kt New HikariCP dependency object (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/storage/H2.kt New H2 dependency object (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt Update Validation versions and plugin coordinate constant (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt Update ToolBase versions (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt Update referenced Time version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt Update ProtoTap version and naming (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/McJava.kt Remove McJava dependency object (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt Update Logging version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt Update CoreJvmCompiler versions (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt Update CoreJvm version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt Update Compiler fallback versions (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt Update Base versions (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Slf4J.kt Update slf4j version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Roaster.kt Update Roaster version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt Update Protobuf versions (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Plexus.kt Update Plexus Utils version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/PerfMark.kt New PerfMark dependency object (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/PalantirJavaFormat.kt Update Palantir formatter version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Okio.kt Update Okio version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Netty.kt Update Netty version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Log4j2.kt Update Log4j2 version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinSemver.kt Update Kotlin Semver lib version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinPoet.kt Update KotlinPoet version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Kotlin.kt Update Kotlin runtime/embedded/annotations versions (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/JetBrainsAnnotations.kt Update JetBrains annotations version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaDiffUtils.kt Update JavaDiffUtils version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Jackson.kt Update Jackson BOM/version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/J2ObjC.kt Update J2ObjC annotations version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/IntelliJ.kt Doc update about repo names (managed build sync).
buildSrc/src/main/kotlin/io/spine/dependency/lib/HttpClient.kt Update google-http-client version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Guava.kt Update Guava version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Gson.kt Update Gson version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/GrpcKotlin.kt Update gRPC Kotlin version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt Update gRPC BOM version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleCloud.kt Update Google Cloud libs (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleApis.kt Update Google APIs libs (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Flogger.kt Update Flogger version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Firebase.kt Update Firebase Admin SDK version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsLogging.kt Update Commons Logging version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCodec.kt Update Commons Codec version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCli.kt Update Commons CLI version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Clikt.kt Update Clikt version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Caffeine.kt Update Caffeine version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Auto.kt Update AutoValue version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Asm.kt Update ASM version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/lib/Aedile.kt Update Aedile version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/Serialization.kt Header update (managed build sync).
buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/DateTime.kt Update kotlinx-datetime version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/Coroutines.kt Header update (managed build sync).
buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/AtomicFu.kt Header update (managed build sync).
buildSrc/src/main/kotlin/io/spine/dependency/Dependency.kt Add Configuration.isDokka helper to avoid forcing on Dokka classpaths.
buildSrc/src/main/kotlin/io/spine/dependency/build/Pmd.kt Update PMD version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/build/PluginPublishPlugin.kt Update plugin-publish plugin version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt Update KSP version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/build/GradleDoctor.kt Update Gradle Doctor plugin version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/build/ErrorProne.kt Update Error Prone plugin version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/build/CheckerFramework.kt Update Checker Framework version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/build/AnimalSniffer.kt Update Animal Sniffer version (managed dependency update).
buildSrc/src/main/kotlin/io/spine/dependency/boms/BomsPlugin.kt Exclude Dokka configs from forcing/BOM logic.
buildSrc/src/main/kotlin/DokkaExts.kt Add task metadata for docs JAR; doc wording update (managed build sync).
buildSrc/src/main/kotlin/dokka-setup.gradle.kts Disable Dokka Javadoc publication for KMP modules (managed build sync).
buildSrc/src/main/kotlin/DependencyResolution.kt Skip forcing versions on Dokka configurations.
buildSrc/src/main/kotlin/config-tester.gradle.kts Switch core repo reference; add clean task metadata (managed build sync).
buildSrc/src/main/kotlin/BuildExtensions.kt Remove McJava shortcut; doc wording update (managed build sync).
buildSrc/quality/pmd.xml Update PMD ruleset entry (managed build sync).
buildSrc/build.gradle.kts Align embedded Kotlin/Guava/ErrorProne/Protobuf/Kover versions.
build.gradle.kts Add Base.format to buildscript classpath (managed build sync).
.junie/guidelines.md Update link to guidelines TOC (managed agent metadata).
.idea/misc.xml IDE config adjustments (managed tooling sync).
.idea/live-templates/User.xml Fix date pattern token (YYYYyyyy) in template.
.idea/live-templates/README.md Spelling/whitespace fixes.
.gitmodules Add .agents/shared submodule.
.github/workflows/secret-scan.yml New secret scanning workflow (managed CI sync).
.github/workflows/revalidate-versions.yml New PR version revalidation workflow (managed CI sync).
.github/workflows/remove-obsolete-artifacts-from-packages.yaml Checkout action version bump.
.github/workflows/publish.yml Update actions versions; use setup-gradle; improve failure reporting.
.github/workflows/gradle-wrapper-validation.yml Checkout action version bump.
.github/workflows/ensure-reports-updated.yml Make license report check skippable on non-default branches; checkout bump.
.github/workflows/build-on-windows.yml Update actions; adjust checkout options; switch to setup-gradle.
.github/copilot-instructions.md Add repo-specific Copilot review scope rules.
.codecov.yml Update Codecov config keys/paths.
.claude/settings.json Update Claude Code hooks and permissions list.
.claude/commands/write-docs.md Removed (managed agent metadata).
.claude/commands/update-copyright.md Removed (managed agent metadata).
.claude/commands/run-build.md Removed (managed agent metadata).
.claude/commands/review-docs.md Removed (managed agent metadata).
.claude/commands/pre-pr.md Removed (managed agent metadata).
.claude/commands/move-files.md Removed (managed agent metadata).
.claude/commands/java-to-kotlin.md Removed (managed agent metadata).
.claude/commands/dependency-update.md Removed (managed agent metadata).
.claude/commands/bump-version.md Removed (managed agent metadata).
.claude/commands/bump-gradle.md Removed (managed agent metadata).
.claude/agents/review-docs.md Removed (managed agent metadata).
.claude/agents/kotlin-review.md Removed (managed agent metadata).
.claude/agents/dependency-audit.md Removed (managed agent metadata).
.agents/version-policy.md Removed (managed agent metadata).
.agents/testing.md Removed (managed agent metadata).
.agents/refactoring-guidelines.md Removed (managed agent metadata).
.agents/quick-reference-card.md Removed (managed agent metadata).
.agents/project-structure-expectations.md Removed (managed agent metadata).
.agents/documentation-tasks.md Removed (managed agent metadata).
.agents/documentation-guidelines.md Removed (managed agent metadata).
.agents/common-tasks.md Removed (managed agent metadata).
.agents/coding-guidelines.md Removed (managed agent metadata).
.agents/advanced-safety-rules.md Removed (managed agent metadata).
.agents/_TOC.md Removed (managed agent metadata).
.agents/running-builds.md Removed (managed agent metadata).
.agents/safety-rules.md Removed (managed agent metadata).
.agents/tasks/issue-39-default-value-conversion.md Add task/decision record for issue #39 changes.
.agents/skills/writer/assets/templates/kotlin-java-example.md Removed (managed agent metadata).
.agents/skills/writer/assets/templates/kdoc-example.md Removed (managed agent metadata).
.agents/skills/writer/assets/templates/doc-page.md Removed (managed agent metadata).
.agents/skills/writer/agents/openai.yaml Removed (managed agent metadata).
.agents/skills/update-copyright/SKILL.md Removed (managed agent metadata).
.agents/skills/update-copyright/agents/openai.yaml Removed (managed agent metadata).
.agents/skills/move-files/SKILL.md Removed (managed agent metadata).
.agents/skills/move-files/agents/openai.yaml Removed (managed agent metadata).
.agents/skills/kotlin-review/SKILL.md Removed (managed agent metadata).
.agents/skills/java-to-kotlin/SKILL.md Removed (managed agent metadata).
.agents/skills/java-to-kotlin/agents/openai.yaml Removed (managed agent metadata).
.agents/skills/dependency-update/agents/openai.yaml Removed (managed agent metadata).
.agents/skills/bump-version/agents/openai.yaml Removed (managed agent metadata).
.agents/skills/bump-gradle/agents/openai.yaml Removed (managed agent metadata).
Files not reviewed (3)
  • .idea/live-templates/README.md: Generated file
  • .idea/live-templates/User.xml: Generated file
  • .idea/misc.xml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread time/src/main/java/io/spine/time/DtPreconditions.java
Comment thread time/src/main/java/io/spine/time/DtPreconditions.java
Comment thread time/src/main/kotlin/io/spine/time/DurationExts.kt Outdated
Comment thread docs/project.md Outdated
Per review: the Kotlin `toKotlin*` extensions convert their receiver, so a
default/invalid receiver is an illegal object state, not an illegal argument.
Switch their guards from `checkNotDefaultArg` to `checkNotDefaultState` (and
`require` to `check` in `toKotlinLocalDateTime`) so every failure path throws
`IllegalStateException`, consistent with `toKotlinMonth`'s `error(...)` and the
Java mixin `toJavaTime()` methods. Tests and KDoc updated accordingly.

Also give the two `DtPreconditions` helpers distinct messages — "cannot have a
default value" for the argument check and "cannot be in the default state" for
the state check — removing the duplicated literal (and the constant added to
satisfy `MultipleStringLiterals`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alexander-yevsyukov alexander-yevsyukov self-assigned this Jun 30, 2026
@alexander-yevsyukov alexander-yevsyukov moved this to 🏗 In progress in v2.0 Jun 30, 2026
@alexander-yevsyukov
alexander-yevsyukov enabled auto-merge (squash) June 30, 2026 01:27
- `DtPreconditions.checkNotDefault`/`checkNotDefaultState`: add an explicit
  `checkNotNull` so a `null` argument throws a clean `NullPointerException`
  instead of dereferencing `getClass()` first; document `@throws NullPointerException`.
- `DurationExts.plus`: correct the `@return` KDoc — the receiver is non-null, so
  the "both values are `null`" case is unreachable; document only the `other`
  nullability contract.
- `docs/project.md`: fill the config template with this repository's actual
  overview and architecture (the file backs `.agents/project.md`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 30, 2026 01:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 259 out of 269 changed files in this pull request and generated 3 comments.

Files not reviewed (3)
  • .idea/live-templates/README.md: Generated file
  • .idea/live-templates/User.xml: Generated file
  • .idea/misc.xml: Generated file

Comment thread time/src/main/java/io/spine/time/ZoneOffsets.java
Comment thread gradle/wrapper/gradle-wrapper.properties
Comment thread docs/project.md Outdated
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.40%. Comparing base (0d0251c) to head (621f0e3).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #197      +/-   ##
============================================
+ Coverage     83.88%   84.40%   +0.52%     
- Complexity      304      306       +2     
============================================
  Files            60       60              
  Lines          1086     1103      +17     
  Branches         46       46              
============================================
+ Hits            911      931      +20     
+ Misses          165      163       -2     
+ Partials         10        9       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexander-yevsyukov alexander-yevsyukov moved this from 🏗 In progress to In Review in v2.0 Jun 30, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 30, 2026 17:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 259 out of 269 changed files in this pull request and generated 1 comment.

Files not reviewed (3)
  • .idea/live-templates/README.md: Generated file
  • .idea/live-templates/User.xml: Generated file
  • .idea/misc.xml: Generated file

Comment thread time/src/main/java/io/spine/time/ZoneOffsets.java
@alexander-yevsyukov
alexander-yevsyukov merged commit 8d82c81 into master Jul 1, 2026
10 of 11 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the document-not-converting-default-values branch July 1, 2026 08:24
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Time converters fail to convert Protobuf default values to Java counterparts

3 participants