Repository navigation
chore: make the libraries publishable, add CI, fix repo hygiene and doc drift - #3
Merged
Merged
Conversation
…oc drift Phases 1 and 2 of the 2026-10-20 audit. Publishability of :crdt and :sync - Drop -Xexplicit-backing-fields: it marked every compiled class as built by a pre-release Kotlin compiler, so consumers of the published artifact would fail unless they passed -Xskip-prerelease-check (which :server did, under a wrong diagnosis). syncStatus now uses a private MutableStateFlow. - Enable explicitApi() and add public modifiers; API baselines are unchanged. - Pin the jvm() target to Java 11 bytecode like the Android target, instead of inheriting the level from the JDK running Gradle. - Configure Maven Central (Central Portal) publishing with signed publications. publishToMavenLocal still works without a signing key. - Remove two unused :sync dependencies and redundant hierarchy template calls. CI - ci.yml: library check (tests, apiCheck, lint), sample JVM tests, app compilation on Linux; iOS simulator tests on macOS. - publish.yml: publish both libraries on v* tags, version taken from the tag. - docs.yml: JDK 21 and a timeout. Hygiene - Untrack data/syncdo-state.json (runtime state) and ignore data/, server/data/. - Sample server state directory is a parameter of Application.module, so the test runs against a temp directory. Root log level trace -> info. - Desktop window title no longer contains an em dash. Docs - CLAUDE.md, sync/Module.md, README.md, crdt/README.md, CONTRIBUTING.md and CHANGELOG.md brought in line with the code (callback signatures, message shapes, JDK and Kotlin requirements, design file path, publishing status).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First two phases of the 2026-10-20 repository audit: repo hygiene, documentation drift, and everything that stood between the two libraries and a publishable artifact. No behaviour change in the sync protocol; that is a separate PR.
Publishability of
:crdtand:sync-Xexplicit-backing-fields. The flag marks every compiled class as produced by a pre-release Kotlin compiler (xi=50in the class metadata), so any consumer ofcom.doppio.syncdo:syncwould fail with "class compiled with a pre-release version of Kotlin". The sample:serveralready worked around it with-Xskip-prerelease-checkunder a wrong diagnosis; that flag is removed too.SyncEngine.syncStatusand the sample repository now use the classic privateMutableStateFlow+asStateFlow()pattern. Verified withjavap:xi=48on the rebuilt classes.explicitApi()on both libraries, withpublicon every declaration. The API baselines (api/*.api) are unchanged, which confirms nothing was accidentally public.jvm()target had nojvmTarget, so the published-jvmjar followed whichever JDK ran Gradle (Java 17 class files locally). It now targets Java 11 like the Android target (major version: 55verified).publishToMavenCentral(CENTRAL_PORTAL)+signAllPublications().publishToMavenLocalstill works with no signing key configured (verified).:syncdependencies (ktor-client-content-negotiation,ktor-serialization-kotlinx-json) and the redundantapplyDefaultHierarchyTemplate()calls.CI
ci.ymlon pull requests andmain: Linux job runs:crdt:check :sync:check(tests, apiCheck, Android lint), the sample JVM tests, and compiles the desktop and Android app; macOS job runs the iOS simulator tests of both libraries.publish.ymlonv*tags, publishing both libraries to Maven Central with the version taken from the tag. Needs theMAVEN_CENTRAL_USERNAME,MAVEN_CENTRAL_PASSWORD,SIGNING_KEYandSIGNING_KEY_PASSWORDsecrets.docs.ymlnow uses JDK 21 (the desktop app requires a 21 toolchain at configuration time, even for library-only tasks) and has a timeout.Hygiene
data/syncdo-state.jsonwas tracked runtime state, rewritten by every IDE run of the server from the repo root. It is removed from the index, anddata/plusserver/data/are ignored.Application.module, soApplicationTestruns against a temp directory instead of the developer's state. Root log level goes fromtracetoinfo..claude/settings.local.jsonand.claude/worktrees/ignored for other contributors.Docs
CLAUDE.md:getLocalClockis not suspending;design.penlives underdesign/.sync/Module.md:PullRequestandPushDeltacarry anodeId.README.md: the libraries are not on Maven Central yet, so the install snippet points atmavenLocal(); prerequisites say JDK 17+ (not 11+); the state directory doc explains theserver/data/path.crdt/README.md:kotlin.time.Instantis stable since Kotlin 2.2, not 2.1.CONTRIBUTING.md: mentions CI and explicit API mode.CHANGELOG.md: entries for the above.Verification
./gradlew :crdt:check :sync:check :composeApp:jvmJar(same as the Linux CI job, plus iOS simulator tests locally)./gradlew :shared:jvmTest :server:test :crdt:apiCheck :sync:apiCheck./gradlew :crdt:publishToMavenLocal :sync:publishToMavenLocalwithout a signing key./gradlew dokkaGeneratewith noUndocumentedwarningjavap -von the rebuilt classes:xi=48,major version: 55Not in this PR (later phases of the audit)
Sync correctness (lost pushes when the socket dies, in-memory outbox, status stuck in
Syncing, malformed frames, clock validation on the server), library API reshaping before 0.1.0 (LwwRegistersame-instant writes,OrSetinvariant on deserialization, data classes as ABI,SyncEngineconstructor), and the sample-app items.