Skip to content

feat(devex): add a kotlin sdk module with a typed ledger client - #311

Merged
tiana-code merged 1 commit into
mainfrom
feat/E-09-kotlin-sdk
Jun 19, 2026
Merged

feat(devex): add a kotlin sdk module with a typed ledger client#311
tiana-code merged 1 commit into
mainfrom
feat/E-09-kotlin-sdk

Conversation

@tiana-code

Copy link
Copy Markdown
Owner

E-09 DevEx #304 (F-09.2) - a Kotlin SDK module.

What

New :libs:sdk-kotlin, a hand-written typed client over the REST API (JDK HttpClient + Jackson only, no coupling to service modules):

  • FincoreClient(baseUrl, token?, httpClient, mapper): listAccounts(page,size) -> Page, getAccount(id) -> Account.
  • Bearer auth applied only when a token is set; 30s request timeout; non-2xx -> FincoreException(status); id path-segment URL-encoded; deserializer tolerates unknown fields (forward-compat for new server fields).
  • SDK-owned DTOs Account/Page with type/status as String, so the SDK never breaks on a new ledger enum value.
  • maven-publish configured with NO remote target (local consumption + POM only, like decision-engine F-05.8 Library mode artifact #175) - nothing is pushed to a registry (§0-safe).
  • Embedding test: an in-process JDK HttpServer; covers list decode, bearer-sent, 404 -> FincoreException, and unknown-field tolerance.

Hand-written over openapi-generator: no codegen toolchain, fully reviewable, clean dependency footprint. Scope is a deliberate minimal first surface; #310 tracks the remaining read/write operations.

Evidence

./gradlew :libs:sdk-kotlin:build = BUILD SUCCESSFUL locally (detekt + spotlessCheck + 4 tests + jacoco).

Gate chain

  • critic: GO - no remote publish target anywhere; Account/Page match the ledger DTOs field-by-field; endpoints verified vs AccountController; catalog aliases resolve so full CI == local; embedding test real; clean-room clean.
  • security-auditor (opus): PASS - §0 no-publish confirmed, no hardcoded secrets (test-token is a fake fixture, bearer not logged), JDK TLS validates, SPDX on all files, 6/6 ACs.
  • evaluator: PASS (0.91). Both optional LOWs (id-encode, FAIL_ON_UNKNOWN=false) applied.

Closes #304

Add libs/sdk-kotlin, a hand-written typed client over the REST API that
depends only on the JDK HTTP client and Jackson, with no coupling to the
service modules. The first surface covers the ledger account reads, with
bearer auth applied only when a token is set, a request timeout, and a
typed FincoreException on a non-2xx response. The deserializer tolerates
unknown fields so a new server field does not break consumers. A maven
publication is configured for local consumption with no remote target,
so nothing is ever pushed to a registry. An embedding test exercises the
client against an in-process HTTP server.

Closes #304
@tiana-code tiana-code added this to the v0.4.0 milestone Jun 19, 2026
@tiana-code
tiana-code merged commit 6e86aee into main Jun 19, 2026
8 checks passed
@tiana-code
tiana-code deleted the feat/E-09-kotlin-sdk branch June 19, 2026 18:38
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.

DevEx: Kotlin SDK module (generated from OpenAPI, no publish)

1 participant